mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
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:
parent
7335be9e47
commit
5560677aa7
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user