[gnome-control-center] wacom: Simplify widgets getting



commit e88053c2442780ab37146e80e5d5c8a1791ecda2
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Aug 26 10:43:08 2011 +0100

    wacom: Simplify widgets getting

 panels/wacom/cc-wacom-panel.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/panels/wacom/cc-wacom-panel.c b/panels/wacom/cc-wacom-panel.c
index a329554..34e0ca4 100644
--- a/panels/wacom/cc-wacom-panel.c
+++ b/panels/wacom/cc-wacom-panel.c
@@ -26,7 +26,7 @@
 
 #include <string.h>
 
-#define WID(x) (GtkWidget *) gtk_builder_get_object (dialog, x)
+#define WID(x) (GtkWidget *) gtk_builder_get_object (priv->builder, x)
 
 G_DEFINE_DYNAMIC_TYPE (CcWacomPanel, cc_wacom_panel, CC_TYPE_PANEL)
 
@@ -135,7 +135,6 @@ static void
 tabletmode_changed_cb (GtkComboBox *combo, gpointer user_data)
 {
 	CcWacomPanelPrivate	*priv	= CC_WACOM_PANEL(user_data)->priv;
-	GtkBuilder		*dialog	= GTK_BUILDER (priv->builder);
 	GtkListStore		*liststore;
 	GtkTreeIter		iter;
 	gint			mode;
@@ -254,7 +253,6 @@ static void
 button_changed_cb (GtkComboBox *combo, gpointer user_data)
 {
 	CcWacomPanelPrivate	*priv = CC_WACOM_PANEL(user_data)->priv;
-	GtkBuilder		*dialog = priv->builder;
 	GtkTreeIter		iter;
 	GtkListStore		*liststore;
 	gint			mapping_b2,
@@ -293,7 +291,6 @@ static void
 gnome_wacom_properties_init (CcWacomPanel *panel)
 {
 	CcWacomPanelPrivate	*priv = CC_WACOM_PANEL(panel)->priv;
-	GtkBuilder		*dialog = priv->builder;
 	GtkComboBox		*combo;
 
 	priv->wacom_settings  = g_settings_new ("org.gnome.settings-daemon.peripherals.wacom");
@@ -420,7 +417,7 @@ cc_wacom_panel_init (CcWacomPanel *self)
 
 	gnome_wacom_properties_init (self);
 
-	grid = (GtkWidget*) gtk_builder_get_object (priv->builder, "main-grid");
+	grid = WID ("main-grid");
 
 	gtk_widget_reparent (grid, GTK_WIDGET (self));
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]