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,3 +1,16 @@
|
|||||||
|
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>
|
2006-03-20 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtk.symbols:
|
* gtk/gtk.symbols:
|
||||||
|
@ -1,3 +1,16 @@
|
|||||||
|
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>
|
2006-03-20 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtk.symbols:
|
* gtk/gtk.symbols:
|
||||||
|
@ -111,7 +111,6 @@ struct _GtkComboBoxPrivate
|
|||||||
|
|
||||||
guint popup_in_progress : 1;
|
guint popup_in_progress : 1;
|
||||||
guint popup_shown : 1;
|
guint popup_shown : 1;
|
||||||
guint destroying : 1;
|
|
||||||
guint add_tearoffs : 1;
|
guint add_tearoffs : 1;
|
||||||
guint has_frame : 1;
|
guint has_frame : 1;
|
||||||
guint is_cell_renderer : 1;
|
guint is_cell_renderer : 1;
|
||||||
@ -1060,7 +1059,7 @@ gtk_combo_box_remove (GtkContainer *container,
|
|||||||
gtk_widget_unparent (widget);
|
gtk_widget_unparent (widget);
|
||||||
GTK_BIN (container)->child = NULL;
|
GTK_BIN (container)->child = NULL;
|
||||||
|
|
||||||
if (combo_box->priv->destroying)
|
if (GTK_OBJECT_FLAGS (combo_box) & GTK_IN_DESTRUCTION)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gtk_widget_queue_resize (GTK_WIDGET (container));
|
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_data = NULL;
|
||||||
combo_box->priv->row_separator_destroy = NULL;
|
combo_box->priv->row_separator_destroy = NULL;
|
||||||
|
|
||||||
combo_box->priv->destroying = 1;
|
|
||||||
|
|
||||||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||||
combo_box->priv->cell_view = NULL;
|
combo_box->priv->cell_view = NULL;
|
||||||
|
|
||||||
combo_box->priv->destroying = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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_tabs (GtkNotebook *notebook);
|
||||||
static void gtk_notebook_redraw_arrows (GtkNotebook *notebook);
|
static void gtk_notebook_redraw_arrows (GtkNotebook *notebook);
|
||||||
static void gtk_notebook_real_remove (GtkNotebook *notebook,
|
static void gtk_notebook_real_remove (GtkNotebook *notebook,
|
||||||
GList *list,
|
GList *list);
|
||||||
gboolean destroying);
|
|
||||||
static void gtk_notebook_update_labels (GtkNotebook *notebook);
|
static void gtk_notebook_update_labels (GtkNotebook *notebook);
|
||||||
static gint gtk_notebook_timer (GtkNotebook *notebook);
|
static gint gtk_notebook_timer (GtkNotebook *notebook);
|
||||||
static gint gtk_notebook_page_compare (gconstpointer a,
|
static gint gtk_notebook_page_compare (gconstpointer a,
|
||||||
@ -1257,22 +1256,12 @@ gtk_notebook_new (void)
|
|||||||
static void
|
static void
|
||||||
gtk_notebook_destroy (GtkObject *object)
|
gtk_notebook_destroy (GtkObject *object)
|
||||||
{
|
{
|
||||||
GList *children;
|
|
||||||
GtkNotebook *notebook = GTK_NOTEBOOK (object);
|
GtkNotebook *notebook = GTK_NOTEBOOK (object);
|
||||||
GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
|
GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
|
||||||
|
|
||||||
if (notebook->menu)
|
if (notebook->menu)
|
||||||
gtk_notebook_popup_disable (notebook);
|
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)
|
if (priv->source_targets)
|
||||||
{
|
{
|
||||||
gtk_target_list_unref (priv->source_targets);
|
gtk_target_list_unref (priv->source_targets);
|
||||||
@ -3183,7 +3172,7 @@ gtk_notebook_remove (GtkContainer *container,
|
|||||||
widget,
|
widget,
|
||||||
page_num);
|
page_num);
|
||||||
|
|
||||||
gtk_notebook_real_remove (notebook, children, FALSE);
|
gtk_notebook_real_remove (notebook, children);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
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_set_state (page->tab_label, GTK_STATE_NORMAL);
|
||||||
gtk_widget_unparent (page->tab_label);
|
gtk_widget_unparent (page->tab_label);
|
||||||
|
page->tab_label = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_notebook_real_remove (GtkNotebook *notebook,
|
gtk_notebook_real_remove (GtkNotebook *notebook,
|
||||||
GList *list,
|
GList *list)
|
||||||
gboolean destroying)
|
|
||||||
{
|
{
|
||||||
GtkNotebookPage *page;
|
GtkNotebookPage *page;
|
||||||
GList * next_list;
|
GList * next_list;
|
||||||
gint need_resize = FALSE;
|
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);
|
next_list = gtk_notebook_search_page (notebook, list, STEP_PREV, TRUE);
|
||||||
if (!next_list)
|
if (!next_list)
|
||||||
next_list = gtk_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
|
next_list = gtk_notebook_search_page (notebook, list, STEP_NEXT, TRUE);
|
||||||
|
Loading…
Reference in New Issue
Block a user