[gnome-utils/gsettings-tutorial: 6/22] [gsettings-tutorial] Remove the full path for the toolbar visibility key



commit 15830f5943b7052a2b13af27676f291aac089dcc
Author: Vincent Untz <vuntz gnome org>
Date:   Fri Apr 16 15:16:55 2010 -0400

    [gsettings-tutorial] Remove the full path for the toolbar visibility key
    
    It's not used via the gconf API, so we only need the basename now.
    
    We've now get rid of gconf for this part of the code.

 baobab/src/baobab.c |    4 ++--
 baobab/src/baobab.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/baobab/src/baobab.c b/baobab/src/baobab.c
index 57493a1..3596bac 100644
--- a/baobab/src/baobab.c
+++ b/baobab/src/baobab.c
@@ -839,10 +839,10 @@ baobab_init (void)
 	/* GSettings */
 	baobab.settings_ui = g_settings_new ("org.gnome.baobab.ui");
 
-	g_settings_bind (baobab.settings_ui, "toolbar_visible",
+	g_settings_bind (baobab.settings_ui, BAOBAB_TOOLBAR_VISIBLE_KEY,
 			 baobab.toolbar, "visible",
 			 G_SETTINGS_BIND_DEFAULT);
-	g_settings_bind (baobab.settings_ui, "toolbar_visible",
+	g_settings_bind (baobab.settings_ui, BAOBAB_TOOLBAR_VISIBLE_KEY,
 			 GTK_TOGGLE_ACTION (gtk_builder_get_object (baobab.main_ui, "view_tb")), "active",
 			 G_SETTINGS_BIND_DEFAULT);
 }
diff --git a/baobab/src/baobab.h b/baobab/src/baobab.h
index 701b8aa..0354de8 100644
--- a/baobab/src/baobab.h
+++ b/baobab/src/baobab.h
@@ -40,7 +40,7 @@ struct BaobabSearchOpt;
 #define BAOBAB_DIALOG_SCAN_UI_FILE PKGDATADIR "/baobab-dialog-scan-props.ui"
 
 #define BAOBAB_KEY_DIR "/apps/baobab"
-#define BAOBAB_TOOLBAR_VISIBLE_KEY	BAOBAB_KEY_DIR "/ui/toolbar_visible"
+#define BAOBAB_TOOLBAR_VISIBLE_KEY	"toolbar_visible"
 #define BAOBAB_STATUSBAR_VISIBLE_KEY	BAOBAB_KEY_DIR "/ui/statusbar_visible"
 #define BAOBAB_SUBFLSTIPS_VISIBLE_KEY   BAOBAB_KEY_DIR "/ui/baobab_subfoldertips_visible"
 #define PROPS_SCAN_KEY			BAOBAB_KEY_DIR "/properties/skip_scan_uri_list"



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