[gnome-control-center] info: Don't leak a dialog
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] info: Don't leak a dialog
- Date: Tue, 1 Oct 2013 08:06:17 +0000 (UTC)
commit 416de8af2ba6e59e57281de25e382f58e36c7deb
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Sep 17 14:32:30 2013 +0200
info: Don't leak a dialog
https://bugzilla.gnome.org/show_bug.cgi?id=708286
panels/info/cc-info-panel.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index c863f1f..04112e0 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]