diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-10-31 18:20:07 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-10-31 18:20:07 +0000 |
commit | 5560677aa7809ab424654a40e32a9fa012a07e36 (patch) | |
tree | e4efb289ba9690cf40a8d148fd774442e5bb791f /gtk/gtkcellrenderercombo.c | |
parent | 7335be9e47bd9eddc6b100f2ff8d96e6b5e2d21e (diff) | |
download | gtk+-5560677aa7809ab424654a40e32a9fa012a07e36.tar.gz |
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.
svn path=/trunk/; revision=21740
Diffstat (limited to 'gtk/gtkcellrenderercombo.c')
-rw-r--r-- | gtk/gtkcellrenderercombo.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/gtk/gtkcellrenderercombo.c b/gtk/gtkcellrenderercombo.c index 9fc93c8f61..941e9713bb 100644 --- a/gtk/gtkcellrenderercombo.c +++ b/gtk/gtkcellrenderercombo.c @@ -268,30 +268,16 @@ gtk_cell_renderer_combo_set_property (GObject *object, { 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 @@ gtk_cell_renderer_combo_editing_done (GtkCellEditable *combo, 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); |