gtk+ r21740 - in trunk: . gtk



Author: matthiasc
Date: Fri Oct 31 18:20:07 2008
New Revision: 21740
URL: http://svn.gnome.org/viewvc/gtk+?rev=21740&view=rev

Log:
Bug 558323 â glitches when popping up combos in treeviews

gtk/gtkcellrenderercombo.c (gtk_cell_renderer_combo_set_property):
Don't set the model property on the combo box, since that leads
to loops.



Modified:
   trunk/ChangeLog
   trunk/gtk/gtkcellrenderercombo.c

Modified: trunk/gtk/gtkcellrenderercombo.c
==============================================================================
--- trunk/gtk/gtkcellrenderercombo.c	(original)
+++ trunk/gtk/gtkcellrenderercombo.c	Fri Oct 31 18:20:07 2008
@@ -268,30 +268,16 @@
     {
     case PROP_MODEL:
       {
-	GObject *object;
         GtkCellRendererComboPrivate *priv;
 
         priv = GTK_CELL_RENDERER_COMBO_GET_PRIVATE (cell);
 
-	if (cell->model)
-	  {
-            if (priv->combo)
-              gtk_combo_box_set_model (GTK_COMBO_BOX (priv->combo), NULL);
-	    g_object_unref (cell->model);
-	    cell->model = NULL;
-	  }
-
-	object = g_value_get_object (value);
-        if (object)
-          {
-            g_return_if_fail (GTK_IS_TREE_MODEL (object));
-            g_object_ref (object);
-
-            cell->model = GTK_TREE_MODEL (object);
-            if (priv->combo)
-              gtk_combo_box_set_model (GTK_COMBO_BOX (priv->combo), cell->model);
-          }
-	break;
+        if (cell->model)
+          g_object_unref (cell->model);
+        cell->model = GTK_TREE_MODEL (g_value_get_object (value));
+        if (cell->model)
+          g_object_ref (cell->model);
+        break;
       }
     case PROP_TEXT_COLUMN:
       cell->text_column = g_value_get_int (value);
@@ -337,6 +323,7 @@
   gboolean canceled;
   GtkCellRendererComboPrivate *priv;
 
+  g_print ("combo cell editing done\n");
   cell = GTK_CELL_RENDERER_COMBO (data);
   priv = GTK_CELL_RENDERER_COMBO_GET_PRIVATE (data);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]