*** gtkcellrenderercombo.c.orig	Fri Mar 23 12:30:37 2007
--- gtkcellrenderercombo.c	Fri Mar 23 13:10:56 2007
***************
*** 20,25 ****
--- 20,26 ----
  #include <config.h>
  #include <string.h>
  
+ #include "gtkmarshalers.h"
  #include "gtkintl.h"
  #include "gtkbin.h"
  #include "gtkentry.h"
*************** enum {
*** 59,64 ****
--- 60,72 ----
    PROP_HAS_ENTRY
  };
  
+ enum {
+     SELECTED,
+     LAST_SIGNAL
+ };
+ 
+ static guint combo_cell_renderer_signals[LAST_SIGNAL];
+ 
  #define GTK_CELL_RENDERER_COMBO_PATH "gtk-cell-renderer-combo-path"
  
  G_DEFINE_TYPE (GtkCellRendererCombo, gtk_cell_renderer_combo, GTK_TYPE_CELL_RENDERER_TEXT)
*************** gtk_cell_renderer_combo_class_init (GtkC
*** 130,135 ****
--- 138,163 ----
  							 TRUE,
  							 GTK_PARAM_READWRITE));
  
+ 
+   /**
+    * GtkCellRendererCombo::selected:
+    * @renderer: the object which received the signal.
+    * @path: the path identifying the edited cell in the GtkTreeView
+    * @iter: a GtkTreeIter that points the row that was selected in the GtkCellRendererCombo's model
+    *
+    * If @renderer does <emphasis>not</emphasis> have an entry then this signal
+    * is emitted when the user selects an item from @renderer.
+    */
+   combo_cell_renderer_signals[SELECTED] =
+     g_signal_new("selected",
+ 		 G_OBJECT_CLASS_TYPE(object_class),
+ 		 G_SIGNAL_RUN_LAST,
+ 		 G_STRUCT_OFFSET (GtkCellRendererComboClass, selected),
+ 		 NULL, NULL,
+ 		 _gtk_marshal_VOID__STRING_BOXED,
+ 		 G_TYPE_NONE, 2,
+ 		 G_TYPE_STRING,
+ 		 GTK_TYPE_TREE_ITER);
  }
  
  static void
*************** gtk_cell_renderer_combo_editing_done (Gt
*** 270,275 ****
--- 298,305 ----
    if (canceled)
      return;
  
+   path = g_object_get_data (G_OBJECT (combo), GTK_CELL_RENDERER_COMBO_PATH);
+ 
    if (GTK_IS_COMBO_BOX_ENTRY (combo))
      {
        entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo)));
*************** gtk_cell_renderer_combo_editing_done (Gt
*** 279,288 ****
      {
        model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
        if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter))
  	gtk_tree_model_get (model, &iter, cell->text_column, &new_text, -1);
      }
  
-   path = g_object_get_data (G_OBJECT (combo), GTK_CELL_RENDERER_COMBO_PATH);
    g_signal_emit_by_name (cell, "edited", path, new_text);
  
    g_free (new_text);
--- 309,320 ----
      {
        model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
        if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter))
+       {
+ 	g_signal_emit( cell, combo_cell_renderer_signals[SELECTED], 0, path, &iter );
  	gtk_tree_model_get (model, &iter, cell->text_column, &new_text, -1);
+       }
      }
  
    g_signal_emit_by_name (cell, "edited", path, new_text);
  
    g_free (new_text);
