[gnome-control-center] wacom: Destroy button mapping dialogue on unplug
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] wacom: Destroy button mapping dialogue on unplug
- Date: Fri, 25 May 2012 10:21:01 +0000 (UTC)
commit aa161bacc9c11b9dfee2551ef03f294dd2d78aad
Author: Bastien Nocera <hadess hadess net>
Date: Fri May 25 11:19:37 2012 +0100
wacom: Destroy button mapping dialogue on unplug
https://bugzilla.gnome.org/show_bug.cgi?id=676790
panels/wacom/cc-wacom-page.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/panels/wacom/cc-wacom-page.c b/panels/wacom/cc-wacom-page.c
index 40ac167..a0cff9a 100644
--- a/panels/wacom/cc-wacom-page.c
+++ b/panels/wacom/cc-wacom-page.c
@@ -69,6 +69,7 @@ struct _CcWacomPagePrivate
/* Button mapping */
GtkBuilder *mapping_builder;
+ GtkWidget *button_map;
/* Display mapping */
GtkWidget *mapping;
@@ -679,6 +680,9 @@ map_buttons_button_clicked_cb (GtkButton *button,
G_CALLBACK (button_mapping_dialog_closed), page);
gtk_widget_show (dialog);
+
+ priv->button_map = dialog;
+ g_object_add_weak_pointer (G_OBJECT (dialog), (gpointer *) &priv->button_map);
}
static void
@@ -835,6 +839,11 @@ cc_wacom_page_dispose (GObject *object)
priv->area = NULL;
}
+ if (priv->button_map) {
+ gtk_widget_destroy (priv->button_map);
+ priv->button_map = NULL;
+ }
+
if (priv->builder) {
g_object_unref (priv->builder);
priv->builder = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]