Yasumichi Akahoshi
yasum****@users*****
2005年 5月 7日 (土) 03:42:23 JST
Index: cxplorer/src/cxplorer-window.c diff -u cxplorer/src/cxplorer-window.c:1.37 cxplorer/src/cxplorer-window.c:1.38 --- cxplorer/src/cxplorer-window.c:1.37 Sat May 7 03:21:54 2005 +++ cxplorer/src/cxplorer-window.c Sat May 7 03:42:22 2005 @@ -27,6 +27,7 @@ # include <config.h> #endif +#include <gconf/gconf-client.h> #include <cxp.h> #include <glib/gi18n.h> #include <sys/types.h> @@ -47,6 +48,7 @@ typedef struct { + GConfClient *client; GtkActionGroup *action_group; GtkUIManager *ui_manager; GtkWidget *menubar; @@ -189,10 +191,13 @@ gchar *preview_binary; gchar *filter; + private->client = gconf_client_get_default (); + gconf_client_add_dir (private->client, "/apps/cxp/cxplorer", GCONF_CLIENT_PRELOAD_NONE, NULL); + show_dot_file = gconf_client_get_bool (private->client, "/apps/cxp/cxplorer/ShowDotFile", NULL); + private->profile = cxp_profile_new ("cxplorer", "main"); private->bookmark = cxp_profile_new ("cxplorer", "bookmark"); private->sendto = cxp_profile_new ("common", "SendTo"); - show_dot_file = cxp_profile_get_integer(private->profile, "ShowDotFile"); filter = cxp_profile_get_string (private->profile, "FilenameFilter"); if(filter != NULL) { @@ -372,6 +377,7 @@ * the most simple solution is to unref all members on which you own a * reference. */ + g_object_unref (private->client); g_object_unref (private->profile); g_object_unref (private->bookmark); g_object_unref (private->action_group); @@ -714,7 +720,7 @@ gboolean show_dot_file; show_dot_file = gtk_toggle_action_get_active(action); - cxp_profile_set_integer(private->profile, "ShowDotFile", show_dot_file); + gconf_client_set_bool (private->client, "/apps/cxp/cxplorer/ShowDotFile", show_dot_file, NULL); cxp_dir_view_set_show_dot_file (CXP_DIR_VIEW(private->dirview), show_dot_file); cxp_right_pane_set_show_dot_file (CXP_RIGHT_PANE(private->right_pane), show_dot_file); cxp_dir_view_refresh (CXP_DIR_VIEW(private->dirview));