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
This commit is contained in:
Matthias Clasen 2008-10-31 18:20:07 +00:00
parent 7335be9e47
commit 5560677aa7
2 changed files with 15 additions and 20 deletions

View File

@ -1,3 +1,11 @@
2008-10-31 Matthias Clasen <mclasen@redhat.com>
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.
2008-10-31 Christian Dywan <christian@imendio.com>
Bug 347230 testicontheme shortcomings

View File

@ -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);