info: Don't leak a dialog
https://bugzilla.gnome.org/show_bug.cgi?id=708286
This commit is contained in:
parent
ea4f2b157d
commit
416de8af2b
1 changed files with 5 additions and 1 deletions
|
@ -92,6 +92,7 @@ typedef struct
|
|||
struct _CcInfoPanelPrivate
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *extra_options_dialog;
|
||||
char *gnome_version;
|
||||
char *gnome_distributor;
|
||||
char *gnome_date;
|
||||
|
@ -461,6 +462,7 @@ cc_info_panel_dispose (GObject *object)
|
|||
g_clear_object (&priv->pk_proxy);
|
||||
g_clear_object (&priv->pk_transaction_proxy);
|
||||
g_clear_pointer (&priv->graphics_data, graphics_data_free);
|
||||
g_clear_pointer (&priv->extra_options_dialog, gtk_widget_destroy);
|
||||
|
||||
G_OBJECT_CLASS (cc_info_panel_parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -1305,7 +1307,7 @@ on_extra_options_button_clicked (GtkWidget *button,
|
|||
GtkWidget *dialog;
|
||||
GtkWidget *combo_box;
|
||||
|
||||
dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "extra_options_dialog"));
|
||||
dialog = self->priv->extra_options_dialog;
|
||||
combo_box = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "media_other_type_combobox"));
|
||||
gtk_window_set_transient_for (GTK_WINDOW (dialog),
|
||||
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (self))));
|
||||
|
@ -1849,6 +1851,8 @@ cc_info_panel_init (CcInfoPanel *self)
|
|||
return;
|
||||
}
|
||||
|
||||
self->priv->extra_options_dialog = WID ("extra_options_dialog");
|
||||
|
||||
self->priv->graphics_data = get_graphics_data ();
|
||||
|
||||
widget = WID ("updates_button");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue