r23238 - gnucash/trunk/src - Gnc-Prefs: migrate GtkCheckbutton widgets (and associated preferences) - second batch
Geert Janssens
gjanssens at code.gnucash.org
Mon Oct 7 10:12:40 EDT 2013
Author: gjanssens
Date: 2013-10-07 10:12:39 -0400 (Mon, 07 Oct 2013)
New Revision: 23238
Trac: http://svn.gnucash.org/trac/changeset/23238
Modified:
gnucash/trunk/src/app-utils/gnc-ui-util.h
gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c
gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
gnucash/trunk/src/core-utils/gnc-prefs.h
gnucash/trunk/src/gnome-utils/account-quickfill.c
gnucash/trunk/src/gnome-utils/gnc-autosave.c
gnucash/trunk/src/gnome-utils/gnc-splash.c
gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c
gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c
gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
gnucash/trunk/src/gnome/dialog-print-check.c
gnucash/trunk/src/gnome/dialog-print-check2.c
gnucash/trunk/src/gnome/gnc-plugin-page-register.c
gnucash/trunk/src/gnome/gnc-plugin-page-register2.c
gnucash/trunk/src/gnome/gnc-split-reg.c
gnucash/trunk/src/gnome/reconcile-view.c
gnucash/trunk/src/gnome/window-reconcile.c
gnucash/trunk/src/gnome/window-reconcile2.c
gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c
gnucash/trunk/src/register/ledger-core/split-register-control.c
gnucash/trunk/src/register/ledger-core/split-register-model.c
gnucash/trunk/src/register/register-gnome/combocell-gnome.c
gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
gnucash/trunk/src/register/register-gnome/gnucash-sheet.h
Log:
Gnc-Prefs: migrate GtkCheckbutton widgets (and associated preferences) - second batch
Modified: gnucash/trunk/src/app-utils/gnc-ui-util.h
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.h 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.h 2013-10-07 14:12:39 UTC (rev 23238)
@@ -96,7 +96,7 @@
* base_account.
* @a name is either considered to be the name of the leaf in the account tree
* or to be the full account path, depending on the configuration parameter
- * general/register/show_leaf_account_names.
+ * general.register/show_leaf_account_names.
*
* @param base_account The account to start the search at.
* @param name The name to search for.
Modified: gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -975,6 +975,6 @@
priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(page);
reg = gnc_invoice_get_register(priv->iw);
- gnucash_register_refresh_from_gconf(GNUCASH_REGISTER(reg));
+ gnucash_register_refresh_from_prefs(GNUCASH_REGISTER(reg));
gtk_widget_queue_draw(priv->widget);
}
Modified: gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c
===================================================================
--- gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/business/business-ledger/gncEntryLedgerControl.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -33,13 +33,13 @@
#include "dialog-account.h"
#include "dialog-utils.h"
#include "gnc-component-manager.h"
+#include "gnc-prefs.h"
#include "gnc-ui.h"
#include "gnc-ui-util.h"
#include "gnc-gui-query.h"
#include "table-allgui.h"
#include "pricecell.h"
#include "dialog-tax-table.h"
-#include "gnc-gconf-utils.h"
#include "register/register-core/checkboxcell.h"
#include "gncEntryLedgerP.h"
@@ -620,8 +620,8 @@
gnc_resume_gui_refresh ();
/* now move to the non-empty amount column unless config setting says not */
- if ( !gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
- "tab_includes_transfer_on_memorised", NULL) )
+ if ( !gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_TAB_TRANS_MEMORISED) )
{
VirtualLocation new_virt_loc;
const char *cell_name = ENTRY_QTY_CELL;
Modified: gnucash/trunk/src/core-utils/gnc-prefs.h
===================================================================
--- gnucash/trunk/src/core-utils/gnc-prefs.h 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/core-utils/gnc-prefs.h 2013-10-07 14:12:39 UTC (rev 23238)
@@ -76,6 +76,13 @@
#define GNC_PREF_DATE_COMPLETION "date_completion"
#define GNC_PREF_DATE_BACKMONTHS "date_backmonths"
#define GNC_PREF_SHOW_LEAF_ACCT_NAMES "show_leaf_account_names"
+#define GNC_PREF_ENTER_MOVES_TO_END "enter_moves_to_end"
+/* Register preferences */
+#define GNC_PREF_DRAW_HOR_LINES "draw_horizontal_lines"
+#define GNC_PREF_DRAW_VERT_LINES "draw_vertical_lines"
+#define GNC_PREF_ALT_COLOR_BY_TRANS "alternate_color_by_transaction"
+#define GNC_PREF_USE_THEME_COLORS "use_theme_colors"
+#define GNC_PREF_TAB_TRANS_MEMORISED "tab_includes_transfer_on_memorised"
/** @name Early bird functions, needed before any backend has been set up
@{
Modified: gnucash/trunk/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome/dialog-print-check.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -82,9 +82,9 @@
#define KEY_CUSTOM_TRANSLATION "custom_translation"
#define KEY_CUSTOM_ROTATION "custom_rotation"
#define KEY_CUSTOM_UNITS "custom_units"
-#define KEY_PRINT_DATE_FMT "print_date_format"
+#define GNC_PREF_PRINT_DATE_FMT "print_date_format"
#define GNC_PREF_DEFAULT_FONT "default_font"
-#define KEY_BLOCKING_CHARS "blocking_chars"
+#define GNC_PREF_BLOCKING_CHARS "blocking_chars"
#define KEY_SPLITS_AMOUNT "splits_amount"
#define KEY_SPLITS_MEMO "splits_memo"
#define KEY_SPLITS_ACCOUNT "splits_account"
@@ -848,7 +848,7 @@
if (gnc_key_file_save_to_file(pathname, key_file, &error))
{
- if (!gnc_gconf_get_bool(GCONF_SECTION, KEY_PRINT_DATE_FMT, NULL))
+ if (!gnc_prefs_get_bool(GNC_PREFS_GROUP, GNC_PREF_PRINT_DATE_FMT))
/* Reload the format combo box and reselect the "custom" entry */
initialize_format_combobox(pcd);
@@ -1143,7 +1143,6 @@
&& (error->code == G_KEY_FILE_ERROR_KEY_NOT_FOUND)))
g_warning("Check file %s, group %s, key %s, error: %s",
file, KF_GROUP_ITEMS, key, error->message);
- //data->print_date_format = gnc_gconf_get_bool(GCONF_SECTION, KEY_PRINT_DATE_FMT, NULL);
data->print_date_format = format->print_date_format;
g_clear_error(&error);
}
@@ -1315,7 +1314,7 @@
&& (error->code == G_KEY_FILE_ERROR_KEY_NOT_FOUND)))
g_warning("Check file %s, group %s, key %s, error: %s",
file, KF_GROUP_TOP, KF_KEY_BLOCKING, error->message);
- if ( gnc_gconf_get_bool(GCONF_SECTION, KEY_BLOCKING_CHARS, NULL) )
+ if ( gnc_prefs_get_bool(GNC_PREFS_GROUP, GNC_PREF_BLOCKING_CHARS) )
{
format->blocking = TRUE;
}
@@ -1340,7 +1339,7 @@
&& (error->code == G_KEY_FILE_ERROR_KEY_NOT_FOUND)))
g_warning("Check file %s, group %s, key %s, error: %s",
file, KF_GROUP_TOP, KF_KEY_DATE_FORMAT, error->message);
- if ( gnc_gconf_get_bool(GCONF_SECTION, KEY_PRINT_DATE_FMT, NULL) )
+ if ( gnc_prefs_get_bool(GNC_PREFS_GROUP, GNC_PREF_PRINT_DATE_FMT) )
{
format->print_date_format = TRUE;
}
Modified: gnucash/trunk/src/gnome/dialog-print-check2.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check2.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome/dialog-print-check2.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -82,9 +82,9 @@
#define KEY_CUSTOM_TRANSLATION "custom_translation"
#define KEY_CUSTOM_ROTATION "custom_rotation"
#define KEY_CUSTOM_UNITS "custom_units"
-#define KEY_PRINT_DATE_FMT "print_date_format"
+#define GNC_PREF_PRINT_DATE_FMT "print_date_format"
#define GNC_PREF_DEFAULT_FONT "default_font"
-#define KEY_BLOCKING_CHARS "blocking_chars"
+#define GNC_PREF_BLOCKING_CHARS "blocking_chars"
#define KEY_SPLITS_AMOUNT "splits_amount"
#define KEY_SPLITS_MEMO "splits_memo"
#define KEY_SPLITS_ACCOUNT "splits_account"
@@ -848,7 +848,7 @@
if (gnc_key_file_save_to_file(pathname, key_file, &error))
{
- if (!gnc_gconf_get_bool(GCONF_SECTION, KEY_PRINT_DATE_FMT, NULL))
+ if (!gnc_prefs_get_bool(GNC_PREFS_GROUP, GNC_PREF_PRINT_DATE_FMT))
/* Reload the format combo box and reselect the "custom" entry */
initialize_format_combobox(pcd);
@@ -1143,7 +1143,6 @@
&& (error->code == G_KEY_FILE_ERROR_KEY_NOT_FOUND)))
g_warning("Check file %s, group %s, key %s, error: %s",
file, KF_GROUP_ITEMS, key, error->message);
- //data->print_date_format = gnc_gconf_get_bool(GCONF_SECTION, KEY_PRINT_DATE_FMT, NULL);
data->print_date_format = format->print_date_format;
g_clear_error(&error);
}
@@ -1315,7 +1314,7 @@
&& (error->code == G_KEY_FILE_ERROR_KEY_NOT_FOUND)))
g_warning("Check file %s, group %s, key %s, error: %s",
file, KF_GROUP_TOP, KF_KEY_BLOCKING, error->message);
- if ( gnc_gconf_get_bool(GCONF_SECTION, KEY_BLOCKING_CHARS, NULL) )
+ if ( gnc_prefs_get_bool(GNC_PREFS_GROUP, GNC_PREF_BLOCKING_CHARS) )
{
format->blocking = TRUE;
}
@@ -1340,7 +1339,7 @@
&& (error->code == G_KEY_FILE_ERROR_KEY_NOT_FOUND)))
g_warning("Check file %s, group %s, key %s, error: %s",
file, KF_GROUP_TOP, KF_KEY_DATE_FORMAT, error->message);
- if ( gnc_gconf_get_bool(GCONF_SECTION, KEY_PRINT_DATE_FMT, NULL) )
+ if ( gnc_prefs_get_bool(GNC_PREFS_GROUP, GNC_PREF_PRINT_DATE_FMT) )
{
format->print_date_format = TRUE;
}
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -67,6 +67,7 @@
#include "gnc-gui-query.h"
#include "gnc-icons.h"
#include "gnc-split-reg.h"
+#include "gnc-prefs.h"
#include "gnc-ui-util.h"
#include "gnc-window.h"
#include "gnc-main-window.h"
@@ -725,7 +726,7 @@
/* Init parent declared variables */
parent = GNC_PLUGIN_PAGE(plugin_page);
- use_new = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER, KEY_USE_NEW, NULL);
+ use_new = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_USE_NEW);
g_object_set(G_OBJECT(plugin_page),
"page-name", _("General Ledger"),
"page-uri", "default:",
@@ -3784,7 +3785,7 @@
else
{
/* forced updates */
- gnucash_register_refresh_from_gconf(priv->gsr->reg);
+ gnucash_register_refresh_from_prefs(priv->gsr->reg);
gtk_widget_queue_draw(priv->widget);
}
Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register2.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register2.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register2.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -77,6 +77,7 @@
#include "gnc-gobject-utils.h"
#include "gnc-gui-query.h"
#include "gnc-icons.h"
+#include "gnc-prefs.h"
#include "gnc-split-reg2.h"
#include "gnc-ui-util.h"
#include "gnc-window.h"
@@ -747,7 +748,7 @@
/* Init parent declared variables */
parent = GNC_PLUGIN_PAGE(plugin_page);
- use_new = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER, KEY_USE_NEW, NULL);
+ use_new = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_USE_NEW);
g_object_set(G_OBJECT(plugin_page),
"page-name", _("General Ledger2"),
"page-uri", "default:",
Modified: gnucash/trunk/src/gnome/gnc-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-split-reg.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome/gnc-split-reg.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -43,7 +43,7 @@
#include "gnc-date-edit.h"
#include "gnc-engine.h"
#include "gnc-euro.h"
-#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "gnc-gui-query.h"
#include "gnc-ledger-display.h"
#include "gnc-pricedb.h"
@@ -1800,8 +1800,8 @@
ENTER("gsr=%p, next_transaction=%s", gsr, next_transaction ? "TRUE" : "FALSE");
- goto_blank = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
- "enter_moves_to_end", NULL);
+ goto_blank = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_ENTER_MOVES_TO_END);
/* If we are in single or double line mode and we hit enter
* on the blank split, go to the blank split instead of the
Modified: gnucash/trunk/src/gnome/reconcile-view.c
===================================================================
--- gnucash/trunk/src/gnome/reconcile-view.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome/reconcile-view.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -33,11 +33,13 @@
#include "qof.h"
#include "Transaction.h"
#include "gnc-ui-util.h"
-#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "reconcile-view.h"
#include "search-param.h"
#include "gnc-component-manager.h"
+#define GNC_PREF_CHECK_CLEARED "check_cleared"
+
/* Signal codes */
enum
{
@@ -194,8 +196,7 @@
gnc_reconcile_view_construct (view, query);
/* find the list of splits to auto-reconcile */
- auto_check = gnc_gconf_get_bool (GCONF_RECONCILE_SECTION,
- "check_cleared", NULL);
+ auto_check = gnc_prefs_get_bool (GNC_PREFS_GROUP_RECONCILE, GNC_PREF_CHECK_CLEARED);
if (auto_check)
{
Modified: gnucash/trunk/src/gnome/window-reconcile.c
===================================================================
--- gnucash/trunk/src/gnome/window-reconcile.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome/window-reconcile.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -60,6 +60,9 @@
#include "window-reconcile.h"
#define WINDOW_RECONCILE_CM_CLASS "window-reconcile"
+#define GNC_PREF_AUTO_INTEREST_TRANSFER "auto_interest_transfer"
+#define GNC_PREF_AUTO_CC_PAYMENT "auto_cc_payment"
+#define GNC_PREF_ALWAYS_REC_TO_TODAY "always_reconcile_to_today"
/** STRUCTS *********************************************************/
@@ -378,8 +381,7 @@
{
gboolean auto_xfer;
- auto_xfer = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
- "auto_interest_transfer", NULL);
+ auto_xfer = gnc_prefs_get_bool(GNC_PREFS_GROUP_RECONCILE, GNC_PREF_AUTO_INTEREST_TRANSFER);
return xaccAccountGetAutoInterestXfer( account, auto_xfer );
}
@@ -1445,8 +1447,7 @@
g_date_clear(&date, 1);
- always_today = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
- "always_reconcile_to_today", NULL);
+ always_today = gnc_prefs_get_bool(GNC_PREFS_GROUP_RECONCILE, GNC_PREF_ALWAYS_REC_TO_TODAY);
if (!always_today &&
xaccAccountGetReconcileLastDate (account, statement_date))
@@ -2117,8 +2118,7 @@
gnc_reconcile_view_commit(GNC_RECONCILE_VIEW(recnData->credit), date);
gnc_reconcile_view_commit(GNC_RECONCILE_VIEW(recnData->debit), date);
- auto_payment = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
- "auto_cc_payment", NULL);
+ auto_payment = gnc_prefs_get_bool(GNC_PREFS_GROUP_RECONCILE, GNC_PREF_AUTO_CC_PAYMENT);
account = recn_get_account (recnData);
Modified: gnucash/trunk/src/gnome/window-reconcile2.c
===================================================================
--- gnucash/trunk/src/gnome/window-reconcile2.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome/window-reconcile2.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -60,6 +60,9 @@
#include "window-reconcile2.h"
#define WINDOW_RECONCILE_CM_CLASS "window-reconcile"
+#define GNC_PREF_AUTO_INTEREST_TRANSFER "auto_interest_transfer"
+#define GNC_PREF_AUTO_CC_PAYMENT "auto_cc_payment"
+#define GNC_PREF_ALWAYS_REC_TO_TODAY "always_reconcile_to_today"
/** STRUCTS *********************************************************/
@@ -378,8 +381,7 @@
{
gboolean auto_xfer;
- auto_xfer = gnc_gconf_get_bool (GCONF_RECONCILE_SECTION,
- "auto_interest_transfer", NULL);
+ auto_xfer = gnc_prefs_get_bool (GNC_PREFS_GROUP_RECONCILE, GNC_PREF_AUTO_INTEREST_TRANSFER);
return xaccAccountGetAutoInterestXfer (account, auto_xfer);
}
@@ -1445,8 +1447,7 @@
g_date_clear(&date, 1);
- always_today = gnc_gconf_get_bool (GCONF_RECONCILE_SECTION,
- "always_reconcile_to_today", NULL);
+ always_today = gnc_prefs_get_bool (GNC_PREFS_GROUP_RECONCILE, GNC_PREF_ALWAYS_REC_TO_TODAY);
if (!always_today &&
xaccAccountGetReconcileLastDate (account, statement_date))
@@ -2117,8 +2118,7 @@
gnc_reconcile_view_commit (GNC_RECONCILE_VIEW (recnData->credit), date);
gnc_reconcile_view_commit (GNC_RECONCILE_VIEW (recnData->debit), date);
- auto_payment = gnc_gconf_get_bool (GCONF_RECONCILE_SECTION,
- "auto_cc_payment", NULL);
+ auto_payment = gnc_prefs_get_bool (GNC_PREFS_GROUP_RECONCILE, GNC_PREF_AUTO_CC_PAYMENT);
account = recn_get_account (recnData);
Modified: gnucash/trunk/src/gnome-utils/account-quickfill.c
===================================================================
--- gnucash/trunk/src/gnome-utils/account-quickfill.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome-utils/account-quickfill.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -25,12 +25,16 @@
#include "account-quickfill.h"
#include "gnc-gconf-utils.h"
#include "gnc-engine.h"
+#include "gnc-prefs.h"
#include "gnc-ui-util.h"
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_REGISTER;
+/* FIXME to delete when gconf conversion is complete */
static void shared_quickfill_gconf_changed (GConfEntry *entry, gpointer qfb);
+/* FIXME delete until here */
+static void shared_quickfill_pref_changed (gpointer prefs, gchar *pref, gpointer qfb);
static void listen_for_account_events (QofInstance *entity, QofEventId event_type,
gpointer user_data, gpointer event_data);
@@ -68,9 +72,10 @@
gnc_gconf_general_remove_cb(KEY_ACCOUNT_SEPARATOR,
shared_quickfill_gconf_changed,
qfb);
- gnc_gconf_general_remove_cb(KEY_SHOW_LEAF_ACCOUNT_NAMES,
- shared_quickfill_gconf_changed,
- qfb);
+ gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_SHOW_LEAF_ACCT_NAMES,
+ shared_quickfill_pref_changed,
+ qfb);
gnc_quickfill_destroy (qfb->qf);
g_object_unref(qfb->list_store);
qof_event_unregister_handler (qfb->listener);
@@ -139,6 +144,7 @@
g_free(name);
}
+/* FIXME to delete when gconf conversion is complete */
static void
shared_quickfill_gconf_changed (GConfEntry *entry, gpointer user_data)
{
@@ -151,8 +157,23 @@
gnc_account_foreach_descendant(qfb->root, load_shared_qf_cb, qfb);
qfb->load_list_store = FALSE;
}
+/* FIXME delete until here */
+static void
+shared_quickfill_pref_changed (gpointer prefs, gchar *pref, gpointer user_data)
+{
+ QFB *qfb = user_data;
+
+ /* Reload the quickfill */
+ gnc_quickfill_purge(qfb->qf);
+ gtk_list_store_clear(qfb->list_store);
+ qfb->load_list_store = TRUE;
+ gnc_account_foreach_descendant(qfb->root, load_shared_qf_cb, qfb);
+ qfb->load_list_store = FALSE;
+}
+
+
/* Build the quickfill list out of account names.
* Essentially same loop as in gnc_load_xfer_cell() above.
*/
@@ -177,9 +198,10 @@
shared_quickfill_gconf_changed,
qfb);
- gnc_gconf_general_register_cb(KEY_SHOW_LEAF_ACCOUNT_NAMES,
- shared_quickfill_gconf_changed,
- qfb);
+ gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_SHOW_LEAF_ACCT_NAMES,
+ shared_quickfill_pref_changed,
+ qfb);
gnc_account_foreach_descendant(root, load_shared_qf_cb, qfb);
qfb->load_list_store = FALSE;
Modified: gnucash/trunk/src/gnome-utils/gnc-autosave.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-autosave.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome-utils/gnc-autosave.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -32,10 +32,11 @@
#include "gnc-file.h"
#include "gnc-window.h"
#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "gnc-main-window.h"
#include "gnc-gui-query.h"
-#define KEY_AUTOSAVE_SHOW_EXPLANATION "autosave_show_explanation"
+#define GNC_PREF_AUTOSAVE_SHOW_EXPLANATION "autosave_show_explanation"
#define KEY_AUTOSAVE_INTERVAL "autosave_interval_minutes"
#define AUTOSAVE_SOURCE_ID "autosave_source_id"
@@ -150,7 +151,7 @@
};
/* Should we show this explanation again? */
- gnc_gconf_set_bool(GCONF_GENERAL, KEY_AUTOSAVE_SHOW_EXPLANATION, show_expl_again, NULL);
+ gnc_prefs_set_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTOSAVE_SHOW_EXPLANATION, show_expl_again);
g_debug("autosave_timeout_cb: Show explanation again=%s\n",
(show_expl_again ? "TRUE" : "FALSE"));
@@ -184,9 +185,9 @@
/* Store the current toplevel window for later use. */
toplevel = gnc_ui_get_toplevel();
- /* Lookup gconf key to show an explanatory dialog, if wanted. */
+ /* Lookup preference to show an explanatory dialog, if wanted. */
show_explanation =
- gnc_gconf_get_bool(GCONF_GENERAL, KEY_AUTOSAVE_SHOW_EXPLANATION, NULL);
+ gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTOSAVE_SHOW_EXPLANATION);
if (show_explanation)
{
save_now = autosave_confirm(toplevel);
Modified: gnucash/trunk/src/gnome-utils/gnc-splash.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-splash.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome-utils/gnc-splash.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -28,9 +28,10 @@
#include "gnc-gnome-utils.h"
#include "gnc-splash.h"
#include "core-utils/gnc-version.h"
-#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#define MARKUP_STRING "<span size='small'>%s</span>"
+#define GNC_PREF_SHOW_SPLASH "show_splash_screen"
static GtkWidget * splash = NULL;
static GtkWidget * progress = NULL;
@@ -61,7 +62,7 @@
gchar *ver_string, *markup;
if (splash) return;
- if (!gnc_gconf_get_bool(GCONF_GENERAL, "show_splash_screen", NULL)) return;
+ if (!gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_SHOW_SPLASH)) return;
splash = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_decorated(GTK_WINDOW (splash), FALSE);
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-control-split-reg.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -38,6 +38,7 @@
#include "gnc-component-manager.h"
#include "gnc-ui.h"
#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "gnc-gdate-utils.h"
#include "dialog-utils.h"
#include "dialog-dup-trans.h"
@@ -796,8 +797,8 @@
model = gnc_tree_view_split_reg_get_model_from_view (view);
- goto_blank = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- "enter_moves_to_end", NULL);
+ goto_blank = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_ENTER_MOVES_TO_END);
ENTER("view=%p, goto_blank = %s", view, goto_blank ? "TRUE" : "FALSE");
@@ -1960,7 +1961,7 @@
return NULL;
/* Find the account */
- if (gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, "show_leaf_account_names", NULL))
+ if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SHOW_LEAF_ACCT_NAMES))
account = gnc_account_lookup_by_name (gnc_get_current_root_account(), name);
else
account = gnc_account_lookup_by_full_name (gnc_get_current_root_account(), name);
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-split-reg.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -519,8 +519,8 @@
/* Setup some config entries */
model->use_accounting_labels = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_ACCOUNTING_LABELS);
- model->use_theme_colors = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, "use_theme_colors", NULL);
- model->alt_colors_by_txn = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, "alternate_color_by_transaction", NULL);
+ model->use_theme_colors = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_USE_THEME_COLORS);
+ model->alt_colors_by_txn = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_ALT_COLOR_BY_TRANS);
model->read_only = FALSE;
/* Create the ListStores for the auto completion / combo's */
@@ -3124,7 +3124,7 @@
// Copy the accts, put it in full name order.
accts_cpy = g_list_copy (accts);
- if (gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, "show_leaf_account_names", NULL))
+ if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SHOW_LEAF_ACCT_NAMES))
accts_cpy = g_list_sort (accts_cpy, (GCompareFunc)gtm_sr_account_order_by_name);
else
accts_cpy = g_list_sort (accts_cpy, (GCompareFunc)gtm_sr_account_order_by_full_name);
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -76,7 +76,7 @@
static guint gnc_tree_view_split_reg_signals[LAST_SIGNAL] = {0};
-static void gnc_tree_view_split_reg_gconf_changed (GConfEntry *entry, gpointer user_data);
+static void gnc_tree_view_split_reg_pref_changed (gpointer prefs, gchar *pref, gpointer user_data);
static void gtv_sr_cdf0 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *s_model,
GtkTreeIter *s_iter, gpointer user_data);
@@ -290,6 +290,12 @@
#define YELLOWCELL "#FFEF98"
#define ORANGECELL "#F39536"
+
+#define GNC_PREF_SHOW_EXTRA_DATES "show_extra_dates"
+#define GNC_PREF_SHOW_EXTRA_DATES_ON_SEL "show_extra_dates_on_selection"
+#define GNC_PREF_SHOW_CAL_BUTTONS "show_calendar_buttons"
+#define GNC_PREF_SEL_TO_BLANK_ON_EXPAND "selection_to_blank_on_expand"
+
/* This could be a preference setting, show currency / commodity symbols */
#define SHOW_SYMBOL FALSE
@@ -468,26 +474,28 @@
view->priv->transfer_string = g_strdup ("Dummy");
view->priv->stop_cell_move = FALSE;
- view->priv->show_calendar_buttons = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, "show_calendar_buttons", NULL);
- view->show_extra_dates = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, "show_extra_dates", NULL);
- view->priv->show_extra_dates_on_selection = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, "show_extra_dates_on_selection", NULL);
- view->priv->selection_to_blank_on_expand = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, "selection_to_blank_on_expand", NULL);
+ view->priv->show_calendar_buttons = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SHOW_CAL_BUTTONS);
+ view->show_extra_dates = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SHOW_EXTRA_DATES);
+ view->priv->show_extra_dates_on_selection = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SHOW_EXTRA_DATES_ON_SEL);
+ view->priv->selection_to_blank_on_expand = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SEL_TO_BLANK_ON_EXPAND);
view->priv->key_length = gnc_gconf_get_float(GCONF_GENERAL_REGISTER, "key_length", NULL);
- view->priv->acct_short_names = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, "show_leaf_account_names", NULL);
+ view->priv->acct_short_names = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SHOW_LEAF_ACCT_NAMES);
view->priv->negative_in_red = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED);
- view->priv->use_horizontal_lines = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- "draw_horizontal_lines", NULL);
+ view->priv->use_horizontal_lines = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_HOR_LINES);
- view->priv->use_vertical_lines = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- "draw_vertical_lines", NULL);
+ view->priv->use_vertical_lines = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_VERT_LINES);
- gnc_gconf_general_register_cb ("draw_horizontal_lines",
- gnc_tree_view_split_reg_gconf_changed,
- view);
- gnc_gconf_general_register_cb ("draw_vertical_lines",
- gnc_tree_view_split_reg_gconf_changed,
- view);
+ gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_HOR_LINES,
+ gnc_tree_view_split_reg_pref_changed,
+ view);
+ gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_VERT_LINES,
+ gnc_tree_view_split_reg_pref_changed,
+ view);
}
@@ -522,12 +530,14 @@
if (view->priv->transfer_string)
g_free (view->priv->transfer_string);
- gnc_gconf_general_remove_cb ("draw_horizontal_lines",
- gnc_tree_view_split_reg_gconf_changed,
- view);
- gnc_gconf_general_remove_cb ("draw_vertical_lines",
- gnc_tree_view_split_reg_gconf_changed,
- view);
+ gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_HOR_LINES,
+ gnc_tree_view_split_reg_pref_changed,
+ view);
+ gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_VERT_LINES,
+ gnc_tree_view_split_reg_pref_changed,
+ view);
if (G_OBJECT_CLASS (parent_class)->dispose)
(* G_OBJECT_CLASS (parent_class)->dispose) (object);
@@ -563,13 +573,13 @@
model = gnc_tree_view_split_reg_get_model_from_view (view);
- model->use_theme_colors = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
- "use_theme_colors", NULL);
+ model->use_theme_colors = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_USE_THEME_COLORS);
model->use_accounting_labels = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL,
GNC_PREF_ACCOUNTING_LABELS);
- model->alt_colors_by_txn = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- "alternate_color_by_transaction", NULL);
+ model->alt_colors_by_txn = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_ALT_COLOR_BY_TRANS);
view->priv->negative_in_red = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL,
GNC_PREF_NEGATIVE_IN_RED);
@@ -577,22 +587,22 @@
static void
-gnc_tree_view_split_reg_gconf_changed (GConfEntry *entry, gpointer user_data)
+gnc_tree_view_split_reg_pref_changed (gpointer prefs, gchar *pref, gpointer user_data)
{
GncTreeViewSplitReg *view = user_data;
- g_return_if_fail (entry && entry->key);
+ g_return_if_fail (pref);
if (view == NULL)
return;
- if (g_str_has_suffix (entry->key, "draw_horizontal_lines") || g_str_has_suffix (entry->key, "draw_vertical_lines"))
+ if (g_str_has_suffix (pref, GNC_PREF_DRAW_HOR_LINES) || g_str_has_suffix (pref, GNC_PREF_DRAW_VERT_LINES))
{
- view->priv->use_horizontal_lines = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- "draw_horizontal_lines", NULL);
+ view->priv->use_horizontal_lines = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_HOR_LINES);
- view->priv->use_vertical_lines = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- "draw_vertical_lines", NULL);
+ view->priv->use_vertical_lines = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_VERT_LINES);
if (view->priv->use_horizontal_lines)
{
@@ -608,7 +618,7 @@
}
else
{
- g_warning("gnc_tree_view_split_reg_gconf_changed: Unknown gconf key %s", entry->key);
+ g_warning("gnc_tree_view_split_reg_pref_changed: Unknown preference %s", pref);
}
}
@@ -4007,8 +4017,8 @@
if (!spath)
return TRUE;
- goto_blank = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- "enter_moves_to_end", NULL);
+ goto_blank = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_ENTER_MOVES_TO_END);
model = gnc_tree_view_split_reg_get_model_from_view (view);
btrans = gnc_tree_model_split_get_blank_trans (model);
@@ -5536,8 +5546,8 @@
return TRUE;
}
- goto_blank = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- "enter_moves_to_end", NULL);
+ goto_blank = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_ENTER_MOVES_TO_END);
model = gnc_tree_view_split_reg_get_model_from_view (view);
btrans = gnc_tree_model_split_get_blank_trans (model);
Modified: gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
===================================================================
--- gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade 2013-10-07 14:12:39 UTC (rev 23238)
@@ -1891,7 +1891,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/show_splash_screen">
+ <object class="GtkCheckButton" id="pref/general/show_splash_screen">
<property name="label" translatable="yes">Show splash scree_n</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -1979,7 +1979,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/autosave_show_explanation">
+ <object class="GtkCheckButton" id="pref/general/autosave_show_explanation">
<property name="label" translatable="yes">Show auto-save confirmation _question</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2255,7 +2255,7 @@
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkCheckButton" id="gconf/dialogs/print_checks/print_date_format">
+ <object class="GtkCheckButton" id="pref/dialogs.checkprinting/print_date_format">
<property name="label" translatable="yes">Print _date format</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2323,7 +2323,7 @@
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkCheckButton" id="gconf/dialogs/print_checks/blocking_chars">
+ <object class="GtkCheckButton" id="pref/dialogs.checkprinting/blocking_chars">
<property name="label" translatable="yes">Print _blocking chars</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2417,7 +2417,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/enter_moves_to_end">
+ <object class="GtkCheckButton" id="pref/general.register/enter_moves_to_end">
<property name="label" translatable="yes">'_Enter' moves to blank transaction</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2451,7 +2451,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/auto_raise_lists">
+ <object class="GtkCheckButton" id="pref/general.register/auto_raise_lists">
<property name="label" translatable="yes">_Auto-raise lists</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2501,7 +2501,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/dialogs/reconcile/check_cleared">
+ <object class="GtkCheckButton" id="pref/dialogs.reconcile/check_cleared">
<property name="label" translatable="yes">Check cleared _transactions</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2522,7 +2522,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/dialogs/reconcile/auto_interest_transfer">
+ <object class="GtkCheckButton" id="pref/dialogs.reconcile/auto_interest_transfer">
<property name="label" translatable="yes">Automatic _interest transfer</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2543,7 +2543,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/dialogs/reconcile/auto_cc_payment">
+ <object class="GtkCheckButton" id="pref/dialogs.reconcile/auto_cc_payment">
<property name="label" translatable="yes">Automatic credit card _payment</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2564,7 +2564,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/dialogs/reconcile/always_reconcile_to_today">
+ <object class="GtkCheckButton" id="pref/dialogs.reconcile/always_reconcile_to_today">
<property name="label" translatable="yes">Always reconcile to t_oday</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2585,7 +2585,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/draw_vertical_lines">
+ <object class="GtkCheckButton" id="pref/general.register/draw_vertical_lines">
<property name="label" translatable="yes">Draw _vertical lines between columns</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2606,7 +2606,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/draw_horizontal_lines">
+ <object class="GtkCheckButton" id="pref/general.register/draw_horizontal_lines">
<property name="label" translatable="yes">Draw hori_zontal lines between rows</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2627,7 +2627,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/alternate_color_by_transaction">
+ <object class="GtkCheckButton" id="pref/general.register/alternate_color_by_transaction">
<property name="label" translatable="yes">Double _mode colors alternate with transactions</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2648,7 +2648,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/use_theme_colors">
+ <object class="GtkCheckButton" id="pref/general.register/use_theme_colors">
<property name="label" translatable="yes">_Use system theme colors</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2685,7 +2685,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/tab_includes_transfer_on_memorised">
+ <object class="GtkCheckButton" id="pref/general.register/tab_includes_transfer_on_memorised">
<property name="label" translatable="yes">Tab order in_cludes Transfer on Memorised Transactions</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2932,7 +2932,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/double_line_mode">
+ <object class="GtkCheckButton" id="pref/general.register/double_line_mode">
<property name="label" translatable="yes">_Double line mode</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2953,7 +2953,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/use_new_window">
+ <object class="GtkCheckButton" id="pref/general.register/use_new_window">
<property name="label" translatable="yes">Register opens in a new _window</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2974,7 +2974,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/show_leaf_account_names">
+ <object class="GtkCheckButton" id="pref/general.register/show_leaf_account_names">
<property name="label" translatable="yes">_Only display leaf account names</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -3040,7 +3040,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/show_extra_dates">
+ <object class="GtkCheckButton" id="pref/general.register/show_extra_dates">
<property name="label" translatable="yes">Show the _entered and reconcile dates</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -3060,7 +3060,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/show_calendar_buttons">
+ <object class="GtkCheckButton" id="pref/general.register/show_calendar_buttons">
<property name="label" translatable="yes">Show the calendar b_uttons</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -3080,7 +3080,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/selection_to_blank_on_expand">
+ <object class="GtkCheckButton" id="pref/general.register/selection_to_blank_on_expand">
<property name="label" translatable="yes">_Move the selection to the blank split on expand</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -3100,7 +3100,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/register/show_extra_dates_on_selection">
+ <object class="GtkCheckButton" id="pref/general.register/show_extra_dates_on_selection">
<property name="label" translatable="yes">_Show entered and reconciled dates on selection</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -36,6 +36,7 @@
#include "gnc-event.h"
#include "gnc-gconf-utils.h"
#include "gnc-ledger-display.h"
+#include "gnc-prefs.h"
#include "gnc-ui-util.h"
#include "split-register-control.h"
#include "split-register-model.h"
@@ -46,7 +47,9 @@
#define REGISTER_GL_CM_CLASS "register-gl"
#define REGISTER_TEMPLATE_CM_CLASS "register-template"
+#define GNC_PREF_DOUBLE_LINE_MODE "double_line_mode"
+
struct gnc_ledger_display
{
GncGUID leader;
@@ -348,7 +351,7 @@
gnc_ledger_display_default_double_line (GNCLedgerDisplay *gld)
{
return (gld->use_double_line_default ||
- gnc_gconf_get_bool(GCONF_GENERAL_REGISTER, "double_line_mode", NULL));
+ gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_DOUBLE_LINE_MODE));
}
/* Opens up a register window to display a single account */
Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -37,6 +37,7 @@
#include "gnc-event.h"
#include "gnc-gconf-utils.h"
#include "gnc-ledger-display2.h"
+#include "gnc-prefs.h"
#include "gnc-ui-util.h"
#include "split-register-control.h"
@@ -50,7 +51,9 @@
#define REGISTER_GL_CM_CLASS "register-gl"
#define REGISTER_TEMPLATE_CM_CLASS "register-template"
+#define GNC_PREF_DOUBLE_LINE_MODE "double_line_mode"
+
struct gnc_ledger_display2
{
GncGUID leader;
@@ -358,7 +361,7 @@
gnc_ledger_display2_default_double_line (GNCLedgerDisplay2 *gld)
{
return (gld->use_double_line_default ||
- gnc_gconf_get_bool(GCONF_GENERAL_REGISTER, "double_line_mode", NULL));
+ gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_DOUBLE_LINE_MODE));
}
/* Opens up a register window to display a single account */
Modified: gnucash/trunk/src/register/ledger-core/split-register-control.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-control.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/register/ledger-core/split-register-control.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -28,7 +28,7 @@
#include "Scrub.h"
#include "combocell.h"
#include "gnc-component-manager.h"
-#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "gnc-ui.h"
#include "pricecell.h"
#include "datecell.h"
@@ -923,8 +923,8 @@
gnc_resume_gui_refresh ();
/* now move to the non-empty amount column unless config setting says not */
- if ( !gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
- "tab_includes_transfer_on_memorised", NULL) )
+ if ( !gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_TAB_TRANS_MEMORISED) )
{
amount = xaccSplitGetAmount (blank_split);
cell_name = (gnc_numeric_negative_p (amount)) ? CRED_CELL : DEBT_CELL;
Modified: gnucash/trunk/src/register/ledger-core/split-register-model.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/split-register-model.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/register/ledger-core/split-register-model.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -28,7 +28,6 @@
#include "datecell.h"
#include "dialog-utils.h"
#include "gnc-engine.h"
-#include "gnc-gconf-utils.h"
#include "gnc-prefs.h"
#include "gnc-ui.h"
#include "pricecell.h"
@@ -596,9 +595,8 @@
g_strcmp0 (cursor_name, CURSOR_DOUBLE_LEDGER) == 0 ||
g_strcmp0 (cursor_name, CURSOR_DOUBLE_LEDGER_NUM_ACTN) == 0)
{
- double_alternate_virt = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
- "alternate_color_by_transaction",
- NULL);
+ double_alternate_virt = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_ALT_COLOR_BY_TRANS);
if (is_current)
{
if (double_alternate_virt)
@@ -681,9 +679,8 @@
g_strcmp0 (cursor_name, CURSOR_DOUBLE_LEDGER) == 0 ||
g_strcmp0 (cursor_name, CURSOR_DOUBLE_LEDGER_NUM_ACTN) == 0)
{
- double_alternate_virt = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
- "alternate_color_by_transaction",
- NULL);
+ double_alternate_virt = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_ALT_COLOR_BY_TRANS);
if (is_current)
{
if (double_alternate_virt)
Modified: gnucash/trunk/src/register/register-gnome/combocell-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/combocell-gnome.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/register/register-gnome/combocell-gnome.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -40,14 +40,14 @@
#include "QuickFill.h"
#include "combocell.h"
-#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "gnucash-item-edit.h"
#include "gnucash-item-list.h"
#include "gnucash-sheet.h"
#include "gnucash-sheetP.h"
#include "table-allgui.h"
-#define KEY_AUTO_RAISE_LISTS "auto_raise_lists"
+#define GNC_PREF_AUTO_RAISE_LISTS "auto_raise_lists"
typedef struct _PopBox
{
@@ -90,24 +90,22 @@
static void
-gnc_combo_cell_set_autopop (GConfEntry *entry, gpointer user_data)
+gnc_combo_cell_set_autopop (gpointer prefs, gchar *pref, gpointer user_data)
{
- GConfValue *value;
-
- value = gconf_entry_get_value(entry);
- auto_pop_combos = gconf_value_get_bool(value);
+ auto_pop_combos = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_AUTO_RAISE_LISTS);
}
static gpointer
gnc_combo_cell_autopop_init (gpointer unused)
{
- auto_pop_combos = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER,
- KEY_AUTO_RAISE_LISTS,
- NULL);
+ auto_pop_combos = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_AUTO_RAISE_LISTS);
- gnc_gconf_general_register_cb(KEY_AUTO_RAISE_LISTS,
- gnc_combo_cell_set_autopop,
- NULL);
+ gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_AUTO_RAISE_LISTS,
+ gnc_combo_cell_set_autopop,
+ NULL);
return NULL;
}
Modified: gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-sheet.c 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/register/register-gnome/gnucash-sheet.c 2013-10-07 14:12:39 UTC (rev 23238)
@@ -38,7 +38,7 @@
#include "gnucash-sheetP.h"
#include "dialog-utils.h"
-#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "gnucash-color.h"
#include "gnucash-grid.h"
#include "gnucash-cursor.h"
@@ -1557,21 +1557,21 @@
}
static void
-gnucash_sheet_refresh_from_gconf (GnucashSheet *sheet)
+gnucash_sheet_refresh_from_prefs (GnucashSheet *sheet)
{
g_return_if_fail(sheet != NULL);
g_return_if_fail(GNUCASH_IS_SHEET(sheet));
- sheet->use_theme_colors = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
- "use_theme_colors", NULL);
- sheet->use_horizontal_lines = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
- "draw_horizontal_lines", NULL);
- sheet->use_vertical_lines = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
- "draw_vertical_lines", NULL);
+ sheet->use_theme_colors = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_USE_THEME_COLORS);
+ sheet->use_horizontal_lines = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_HOR_LINES);
+ sheet->use_vertical_lines = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER,
+ GNC_PREF_DRAW_VERT_LINES);
}
void
-gnucash_register_refresh_from_gconf (GnucashRegister *reg)
+gnucash_register_refresh_from_prefs (GnucashRegister *reg)
{
GnucashSheet *sheet;
@@ -1579,7 +1579,7 @@
g_return_if_fail(GNUCASH_IS_REGISTER(reg));
sheet = GNUCASH_SHEET(reg->sheet);
- gnucash_sheet_refresh_from_gconf(sheet);
+ gnucash_sheet_refresh_from_prefs(sheet);
}
static gboolean
@@ -2857,7 +2857,7 @@
G_CALLBACK(gnucash_sheet_realize_entry),
sheet->entry);
- gnucash_sheet_refresh_from_gconf(sheet);
+ gnucash_sheet_refresh_from_prefs(sheet);
gnucash_sheet_create_color_hack(sheet);
return GTK_WIDGET(sheet);
Modified: gnucash/trunk/src/register/register-gnome/gnucash-sheet.h
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-sheet.h 2013-10-07 14:12:13 UTC (rev 23237)
+++ gnucash/trunk/src/register/register-gnome/gnucash-sheet.h 2013-10-07 14:12:39 UTC (rev 23238)
@@ -133,7 +133,7 @@
void gnucash_register_cut_clipboard (GnucashRegister *reg);
void gnucash_register_copy_clipboard (GnucashRegister *reg);
void gnucash_register_paste_clipboard (GnucashRegister *reg);
-void gnucash_register_refresh_from_gconf (GnucashRegister *reg);
+void gnucash_register_refresh_from_prefs (GnucashRegister *reg);
void gnucash_register_set_moved_cb (GnucashRegister *reg,
GFunc cb, gpointer cb_data);
More information about the gnucash-changes
mailing list