+Fri Feb 27 21:42:28 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c (gtk_combo_box_relayout):
+ * gtk/gtkcombobox.c (gtk_combo_box_style_set): Simplify, only
+ create a new setup if appearance actually changed.
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_clear):
+ * gtk/gtkcombobox.c (gtk_combo_box_get_cell_info): Make
+ these more robust. (#127623, Damon Chaplin)
+
Fri Feb 27 15:06:00 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): remove
+Fri Feb 27 21:42:28 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c (gtk_combo_box_relayout):
+ * gtk/gtkcombobox.c (gtk_combo_box_style_set): Simplify, only
+ create a new setup if appearance actually changed.
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_clear):
+ * gtk/gtkcombobox.c (gtk_combo_box_get_cell_info): Make
+ these more robust. (#127623, Damon Chaplin)
+
Fri Feb 27 15:06:00 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): remove
+Fri Feb 27 21:42:28 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c (gtk_combo_box_relayout):
+ * gtk/gtkcombobox.c (gtk_combo_box_style_set): Simplify, only
+ create a new setup if appearance actually changed.
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_clear):
+ * gtk/gtkcombobox.c (gtk_combo_box_get_cell_info): Make
+ these more robust. (#127623, Damon Chaplin)
+
Fri Feb 27 15:06:00 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): remove
+Fri Feb 27 21:42:28 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c (gtk_combo_box_relayout):
+ * gtk/gtkcombobox.c (gtk_combo_box_style_set): Simplify, only
+ create a new setup if appearance actually changed.
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_clear):
+ * gtk/gtkcombobox.c (gtk_combo_box_get_cell_info): Make
+ these more robust. (#127623, Damon Chaplin)
+
Fri Feb 27 15:06:00 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): remove
+Fri Feb 27 21:42:28 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkcombobox.c (gtk_combo_box_relayout):
+ * gtk/gtkcombobox.c (gtk_combo_box_style_set): Simplify, only
+ create a new setup if appearance actually changed.
+ * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_clear):
+ * gtk/gtkcombobox.c (gtk_combo_box_get_cell_info): Make
+ these more robust. (#127623, Damon Chaplin)
+
Fri Feb 27 15:06:00 2004 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): remove
/* TRUE is windows style */
if (appearance)
{
+ /* Destroy all the menu mode widgets, if they exist. */
if (GTK_IS_MENU (combo_box->priv->popup_widget))
- gtk_combo_box_menu_destroy (combo_box);
- else
- gtk_combo_box_unset_model (combo_box);
-
- gtk_combo_box_list_setup (combo_box);
+ gtk_combo_box_menu_destroy (combo_box);
+
+ /* Create the list mode widgets, if they don't already exist. */
+ if (!GTK_IS_TREE_VIEW (combo_box->priv->tree_view))
+ gtk_combo_box_list_setup (combo_box);
}
else
{
+ /* Destroy all the list mode widgets, if they exist. */
if (GTK_IS_TREE_VIEW (combo_box->priv->tree_view))
- gtk_combo_box_list_destroy (combo_box);
- else
- gtk_combo_box_unset_model (combo_box);
-
- gtk_combo_box_menu_setup (combo_box, TRUE);
+ gtk_combo_box_list_destroy (combo_box);
+
+ /* Create the menu mode widgets, if they don't already exist. */
+ if (!GTK_IS_MENU (combo_box->priv->popup_widget))
+ gtk_combo_box_menu_setup (combo_box, TRUE);
}
}
{
ComboCellInfo *info = (ComboCellInfo *)i->data;
- if (info->cell == cell)
+ if (info && info->cell == cell)
return info;
}
{
GtkWidget *box;
+ /* Unset any existing model. */
+ gtk_combo_box_unset_model (combo_box);
+
if (combo_box->priv->cell_view)
{
combo_box->priv->button = gtk_toggle_button_new ();
/* ensure we are in menu style */
if (combo_box->priv->tree_view)
gtk_combo_box_list_destroy (combo_box);
- else
- gtk_combo_box_unset_model (combo_box);
menu = combo_box->priv->popup_widget;
GSList *i;
GtkTreeSelection *sel;
+ /* Unset any existing model. */
+ gtk_combo_box_unset_model (combo_box);
+
combo_box->priv->button = gtk_toggle_button_new ();
gtk_widget_set_parent (combo_box->priv->button,
GTK_BIN (combo_box)->child->parent);
gtk_combo_box_cell_layout_clear_attributes (layout, info->cell);
g_object_unref (G_OBJECT (info->cell));
g_free (info);
+ i->data = NULL;
}
g_slist_free (combo_box->priv->cells);
combo_box->priv->cells = NULL;