datetime: Explicitly destroy toplevel dialogs
https://bugzilla.gnome.org/show_bug.cgi?id=709443
This commit is contained in:
parent
47fb0c426f
commit
24faa84d05
1 changed files with 11 additions and 0 deletions
|
@ -73,6 +73,7 @@ struct _CcDateTimePanelPrivate
|
|||
|
||||
GList *listboxes;
|
||||
GList *listboxes_reverse;
|
||||
GList *toplevels;
|
||||
|
||||
TzLocation *current_location;
|
||||
|
||||
|
@ -145,6 +146,12 @@ cc_date_time_panel_dispose (GObject *object)
|
|||
priv->am_pm_visiblity_changed_id = 0;
|
||||
}
|
||||
|
||||
if (priv->toplevels)
|
||||
{
|
||||
g_list_free_full (priv->toplevels, (GDestroyNotify) gtk_widget_destroy);
|
||||
priv->toplevels = NULL;
|
||||
}
|
||||
|
||||
g_clear_object (&priv->builder);
|
||||
g_clear_object (&priv->clock_tracker);
|
||||
g_clear_object (&priv->dtm);
|
||||
|
@ -1289,6 +1296,10 @@ cc_date_time_panel_init (CcDateTimePanel *self)
|
|||
|
||||
priv->date = g_date_time_new_now_local ();
|
||||
|
||||
/* Top level windows from GtkBuilder that need to be destroyed explicitly */
|
||||
priv->toplevels = g_list_append (priv->toplevels, W ("datetime-dialog"));
|
||||
priv->toplevels = g_list_append (priv->toplevels, W ("timezone-dialog"));
|
||||
|
||||
setup_timezone_dialog (self);
|
||||
setup_datetime_dialog (self);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue