diff options
author | Matthias Clasen <maclas@gmx.de> | 2004-07-03 03:37:44 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-07-03 03:37:44 +0000 |
commit | 6a9e67331f80e1e7ed2e7ac155200e44643407e9 (patch) | |
tree | ab938102dca9a88325088eb1b048976b79bb7806 /gtk | |
parent | 1b7efe47fe0ccd3fe42dd4af0ac6258b33956756 (diff) | |
download | gtk+-6a9e67331f80e1e7ed2e7ac155200e44643407e9.tar.gz |
Unset the displayed row when unsetting the model. (#138560, Christian
Fri Jul 2 23:34:33 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed
row when unsetting the model. (#138560, Christian Persch)
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcombobox.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 2e286dbda6..613b12f934 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1266,7 +1266,7 @@ update_menu_sensitivity (GtkComboBox *combo_box) children = gtk_container_get_children (GTK_CONTAINER (menu)); child = children; - if (GTK_IS_TEAROFF_MENU_ITEM (child->data)) + if (child && GTK_IS_TEAROFF_MENU_ITEM (child->data)) child = child->next; for (i = 0; i < items; i++, child = child->next) @@ -1692,6 +1692,9 @@ gtk_combo_box_unset_model (GtkComboBox *combo_box) g_object_unref (G_OBJECT (combo_box->priv->model)); combo_box->priv->model = NULL; } + + if (combo_box->priv->cell_view) + gtk_cell_view_set_displayed_row (GTK_CELL_VIEW (combo_box->priv->cell_view), NULL); } static void |