r23257 - gnucash/trunk/src/gnome-utils - Gnc-Prefs: cleanup gconf wiring in main summarybar
Geert Janssens
gjanssens at code.gnucash.org
Mon Oct 7 10:25:40 EDT 2013
Author: gjanssens
Date: 2013-10-07 10:25:39 -0400 (Mon, 07 Oct 2013)
New Revision: 23257
Trac: http://svn.gnucash.org/trac/changeset/23257
Modified:
gnucash/trunk/src/gnome-utils/window-main-summarybar.c
Log:
Gnc-Prefs: cleanup gconf wiring in main summarybar
Modified: gnucash/trunk/src/gnome-utils/window-main-summarybar.c
===================================================================
--- gnucash/trunk/src/gnome-utils/window-main-summarybar.c 2013-10-07 14:23:52 UTC (rev 23256)
+++ gnucash/trunk/src/gnome-utils/window-main-summarybar.c 2013-10-07 14:25:39 UTC (rev 23257)
@@ -33,7 +33,6 @@
#include "gnc-component-manager.h"
#include "gnc-euro.h"
#include "gnc-event.h"
-#include "gnc-gconf-utils.h"
#include "gnc-prefs.h"
#include "gnc-locale-utils.h"
#include "gnc-ui-util.h"
@@ -50,9 +49,6 @@
#define WINDOW_SUMMARYBAR_CM_CLASS "summary-bar"
-#define GCONF_SECTION "window/pages/account_tree/summary"
-#define KEY_NON_CURRENCY "non_currency"
-
#define GNC_PREFS_GROUP "window.pages.account_tree.summary"
#define GNC_PREF_GRAND_TOTAL "grand_total"
#define GNC_PREF_NON_CURRENCY "non_currency"
@@ -448,7 +444,7 @@
static void
gnc_main_window_summary_destroy_cb(GNCMainSummary *summary, gpointer data)
{
- gnc_gconf_remove_anon_notification(GCONF_SECTION, summary->cnxn_id);
+ gnc_prefs_remove_cb_by_id (GNC_PREFS_GROUP, summary->cnxn_id);
gnc_unregister_gui_component(summary->component_id);
g_free(summary);
}
@@ -461,10 +457,7 @@
}
static void
-gconf_client_notify_cb (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
+prefs_changed_cb (gpointer prefs, gchar *pref, gpointer user_data)
{
GNCMainSummary * summary = user_data;
gnc_main_window_summary_refresh(summary);
@@ -518,9 +511,8 @@
gnc_main_window_summary_refresh(retval);
- retval->cnxn_id = gnc_gconf_add_anon_notification(GCONF_SECTION,
- gconf_client_notify_cb,
- retval);
+ retval->cnxn_id = gnc_prefs_register_cb (GNC_PREFS_GROUP, NULL,
+ prefs_changed_cb, retval);
return retval->hbox;
}
More information about the gnucash-changes
mailing list