r23227 - gnucash/trunk/src - Gnc-Prefs: migrate first preference option (first_user) to new preference system
Geert Janssens
gjanssens at code.gnucash.org
Mon Oct 7 10:07:51 EDT 2013
Author: gjanssens
Date: 2013-10-07 10:07:50 -0400 (Mon, 07 Oct 2013)
New Revision: 23227
Trac: http://svn.gnucash.org/trac/changeset/23227
Modified:
gnucash/trunk/src/bin/gnucash-bin.c
gnucash/trunk/src/gnome/dialog-new-user.c
gnucash/trunk/src/gnome/dialog-new-user.h
Log:
Gnc-Prefs: migrate first preference option (first_user) to new preference system
Modified: gnucash/trunk/src/bin/gnucash-bin.c
===================================================================
--- gnucash/trunk/src/bin/gnucash-bin.c 2013-10-07 14:07:28 UTC (rev 23226)
+++ gnucash/trunk/src/bin/gnucash-bin.c 2013-10-07 14:07:50 UTC (rev 23227)
@@ -770,8 +770,7 @@
gnc_file_open_file(fn, /*open_readonly*/ FALSE);
g_free(fn);
}
- else if (gnc_gconf_get_bool("dialogs/new_user", "first_startup", &error)
- && !error)
+ else if (gnc_prefs_get_bool(GNC_PREFS_GROUP_NEW_USER, GNC_PREF_FIRST_STARTUP))
{
gnc_destroy_splash_screen();
gnc_ui_new_user_dialog();
Modified: gnucash/trunk/src/gnome/dialog-new-user.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-new-user.c 2013-10-07 14:07:28 UTC (rev 23226)
+++ gnucash/trunk/src/gnome/dialog-new-user.c 2013-10-07 14:07:50 UTC (rev 23227)
@@ -30,18 +30,15 @@
#include "dialog-file-access.h"
#include "assistant-hierarchy.h"
#include "gnc-engine.h"
-#include "gnc-gconf-utils.h"
#include "gnc-hooks.h"
#include "gnc-ui.h"
#include "gnc-file.h"
+#include "gnc-prefs.h"
#include "gnc-main-window.h"
#include "gnc-plugin-page-account-tree.h"
#include "gnc-session.h"
#include "app-utils/gnc-ui-util.h" // for gnc_get_current_book
-#define GCONF_SECTION "dialogs/new_user"
-#define FIRST_STARTUP "first_startup"
-
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUI;
@@ -60,7 +57,7 @@
void
gnc_set_first_startup (gboolean first_startup)
{
- gnc_gconf_set_bool(GCONF_SECTION, FIRST_STARTUP, first_startup, NULL);
+ gnc_prefs_set_bool (GNC_PREFS_GROUP_NEW_USER, GNC_PREF_FIRST_STARTUP, first_startup);
}
static void
Modified: gnucash/trunk/src/gnome/dialog-new-user.h
===================================================================
--- gnucash/trunk/src/gnome/dialog-new-user.h 2013-10-07 14:07:28 UTC (rev 23226)
+++ gnucash/trunk/src/gnome/dialog-new-user.h 2013-10-07 14:07:50 UTC (rev 23227)
@@ -23,6 +23,9 @@
#ifndef DIALOG_NEW_USER_H
#define DIALOG_NEW_USER_H
+#define GNC_PREFS_GROUP_NEW_USER "dialogs.new_user"
+#define GNC_PREF_FIRST_STARTUP "first_startup"
+
void gnc_ui_new_user_dialog (void);
void gnc_set_first_startup (gboolean first_startup);
More information about the gnucash-changes
mailing list