mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
Don't leave page->tab_label dangling. (gtk_notebook_real_remove): Use
2006-03-20 Matthias Clasen <mclasen@redhat.com> * gtk/gtknotebook.c (gtk_notebook_remove_tab_label): Don't leave page->tab_label dangling. (gtk_notebook_real_remove): Use GTK_IN_DESTRUCTION. (gtk_notebook_destroy): Leave the removal of the children to the container destroy method. (#319032, Yevgen Muntyan) 2006-03-20 Matthias Clasen <mclasen@redhat.com> * gtk/gtkcombobox.c (gtk_combo_box_remove): Use the existing GTK_IN_DESTRUCTION flag, rather than roll our own.
This commit is contained in:
parent
2d281ed53d
commit
7ae595b99e
13
ChangeLog
13
ChangeLog
@ -1,5 +1,18 @@
|
||||
2006-03-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_remove_tab_label): Don't leave
|
||||
page->tab_label dangling.
|
||||
(gtk_notebook_real_remove): Use GTK_IN_DESTRUCTION.
|
||||
(gtk_notebook_destroy): Leave the removal of the children
|
||||
to the container destroy method. (#319032, Yevgen Muntyan)
|
||||
|
||||
2006-03-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_remove): Use the existing
|
||||
GTK_IN_DESTRUCTION flag, rather than roll our own.
|
||||
|
||||
2006-03-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk.symbols:
|
||||
* gtk/gtkscrolledwindow.h:
|
||||
* gtk/gtkscrolledwindow.c: Add a window-placement-set property
|
||||
|
@ -1,5 +1,18 @@
|
||||
2006-03-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c (gtk_notebook_remove_tab_label): Don't leave
|
||||
page->tab_label dangling.
|
||||
(gtk_notebook_real_remove): Use GTK_IN_DESTRUCTION.
|
||||
(gtk_notebook_destroy): Leave the removal of the children
|
||||
to the container destroy method. (#319032, Yevgen Muntyan)
|
||||
|
||||
2006-03-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_remove): Use the existing
|
||||
GTK_IN_DESTRUCTION flag, rather than roll our own.
|
||||
|
||||
2006-03-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtk.symbols:
|
||||
* gtk/gtkscrolledwindow.h:
|
||||
* gtk/gtkscrolledwindow.c: Add a window-placement-set property
|
||||
|
@ -111,7 +111,6 @@ struct _GtkComboBoxPrivate
|
||||
|
||||
guint popup_in_progress : 1;
|
||||
guint popup_shown : 1;
|
||||
guint destroying : 1;
|
||||
guint add_tearoffs : 1;
|
||||
guint has_frame : 1;
|
||||
guint is_cell_renderer : 1;
|
||||
@ -1060,7 +1059,7 @@ gtk_combo_box_remove (GtkContainer *container,
|
||||
gtk_widget_unparent (widget);
|
||||
GTK_BIN (container)->child = NULL;
|
||||
|
||||
if (combo_box->priv->destroying)
|
||||
if (GTK_OBJECT_FLAGS (combo_box) & GTK_IN_DESTRUCTION)
|
||||
return;
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (container));
|
||||
@ -4956,12 +4955,8 @@ gtk_combo_box_destroy (GtkObject *object)
|
||||
combo_box->priv->row_separator_data = NULL;
|
||||
combo_box->priv->row_separator_destroy = NULL;
|
||||
|
||||
combo_box->priv->destroying = 1;
|
||||
|
||||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||
combo_box->priv->cell_view = NULL;
|
||||
|
||||
combo_box->priv->destroying = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -304,8 +304,7 @@ static gint gtk_notebook_real_insert_page (GtkNotebook *notebook,
|
||||
static void gtk_notebook_redraw_tabs (GtkNotebook *notebook);
|
||||
static void gtk_notebook_redraw_arrows (GtkNotebook *notebook);
|
||||
static void gtk_notebook_real_remove (GtkNotebook *notebook,
|
||||
GList *list,
|
||||
gboolean destroying);
|
||||
GList *list);
|
||||
static void gtk_notebook_update_labels (GtkNotebook *notebook);
|
||||
static gint gtk_notebook_timer (GtkNotebook *notebook);
|
||||
static gint gtk_notebook_page_compare (gconstpointer a,
|
||||
@ -1257,22 +1256,12 @@ gtk_notebook_new (void)
|
||||
static void
|
||||
gtk_notebook_destroy (GtkObject *object)
|
||||
{
|
||||
GList *children;
|
||||
GtkNotebook *notebook = GTK_NOTEBOOK (object);
|
||||
GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
|
||||
|
||||
if (notebook->menu)
|
||||
gtk_notebook_popup_disable (notebook);
|
||||
|
||||
children = notebook->children;
|
||||
while (children)
|
||||
{
|
||||
GList *child = children;
|
||||
children = child->next;
|
||||
|
||||
gtk_notebook_real_remove (notebook, child, TRUE);
|
||||
}
|
||||
|
||||
if (priv->source_targets)
|
||||
{
|
||||
gtk_target_list_unref (priv->source_targets);
|
||||
@ -3183,7 +3172,7 @@ gtk_notebook_remove (GtkContainer *container,
|
||||
widget,
|
||||
page_num);
|
||||
|
||||
gtk_notebook_real_remove (notebook, children, FALSE);
|
||||
gtk_notebook_real_remove (notebook, children);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -3735,18 +3724,22 @@ gtk_notebook_remove_tab_label (GtkNotebook *notebook,
|
||||
|
||||
gtk_widget_set_state (page->tab_label, GTK_STATE_NORMAL);
|
||||
gtk_widget_unparent (page->tab_label);
|
||||
page->tab_label = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_real_remove (GtkNotebook *notebook,
|
||||
GList *list,
|
||||
gboolean destroying)
|
||||
GList *list)
|
||||
{
|
||||
GtkNotebookPage *page;
|
||||
GList * next_list;
|
||||
gint need_resize = FALSE;
|
||||
|
||||
gboolean destroying;
|
||||
|
||||
destroying = GTK_OBJECT_FLAGS (notebook) & GTK_IN_DESTRUCTION;
|
||||
|
||||
next_list = gtk_notebook_search_page (notebook, list, STEP_PREV, TRUE);
|
||||
if (!next_list)
|
||||
next_list = gtk_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
|
||||
|
Loading…
Reference in New Issue
Block a user