mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Gnc-Prefs: migrate GtkSpinbutton widgets (and associated preferences)
All GtkSpinkButtons now use the new preferences backend so drop the GtkSpinkButton-Gconf wiring as well. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23240 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
2291ef5249
commit
f9e0da38f4
@ -40,9 +40,9 @@ static QofLogModule log_module = G_LOG_DOMAIN;
|
||||
* Initialization *
|
||||
***************************************************************/
|
||||
static void
|
||||
file_retain_changed_cb(GConfEntry *entry, gpointer user_data)
|
||||
file_retain_changed_cb(gpointer gsettings, gchar *key, gpointer user_data)
|
||||
{
|
||||
gint days = (int)gnc_gconf_get_float(GCONF_GENERAL, KEY_RETAIN_DAYS, NULL);
|
||||
gint days = (int)gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_DAYS);
|
||||
gnc_prefs_set_file_retention_days (days);
|
||||
}
|
||||
|
||||
@ -82,13 +82,14 @@ void gnc_prefs_init (void)
|
||||
gnc_gsettings_load_backend();
|
||||
|
||||
/* Add hooks to update core preferences whenever the associated gconf key changes */
|
||||
gnc_gconf_general_register_cb(KEY_RETAIN_DAYS, file_retain_changed_cb, NULL);
|
||||
gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_DAYS,
|
||||
(GCallback) file_retain_changed_cb, NULL);
|
||||
gnc_gconf_general_register_cb(KEY_RETAIN_TYPE, file_retain_type_changed_cb, NULL);
|
||||
gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_FILE_COMPRESSION,
|
||||
(GCallback) file_compression_changed_cb, NULL);
|
||||
(GCallback) file_compression_changed_cb, NULL);
|
||||
|
||||
/* Call the hooks once manually to initialize the core preferences */
|
||||
file_retain_changed_cb (NULL, NULL);
|
||||
file_retain_changed_cb (NULL, NULL, NULL);
|
||||
file_retain_type_changed_cb (NULL, NULL);
|
||||
file_compression_changed_cb (NULL, NULL, NULL);
|
||||
|
||||
|
@ -2279,16 +2279,18 @@ xaccParseAmountExtended (const char * in_str, gboolean monetary,
|
||||
|
||||
/* enable/disable the auto_decimal_enabled option */
|
||||
static void
|
||||
gnc_set_auto_decimal_enabled (GSettings *settings, gchar *key, gpointer user_data)
|
||||
gnc_set_auto_decimal_enabled (gpointer settings, gchar *key, gpointer user_data)
|
||||
{
|
||||
auto_decimal_enabled = g_settings_get_boolean (settings, key);
|
||||
auto_decimal_enabled =
|
||||
gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTO_DECIMAL_POINT);
|
||||
}
|
||||
|
||||
/* set the number of auto decimal places to use */
|
||||
static void
|
||||
gnc_set_auto_decimal_places (GSettings *settings, gchar *key, gpointer user_data)
|
||||
gnc_set_auto_decimal_places (gpointer settings, gchar *key, gpointer user_data)
|
||||
{
|
||||
auto_decimal_places = g_settings_get_int (settings, key);
|
||||
auto_decimal_places =
|
||||
gnc_prefs_get_float (GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTO_DECIMAL_PLACES);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "dialog-utils.h"
|
||||
#include "gnc-component-manager.h"
|
||||
#include "gnc-ui.h"
|
||||
#include "gnc-gconf-utils.h"
|
||||
#include "gnc-gui-query.h"
|
||||
#include "gnc-prefs.h"
|
||||
#include "gnc-ui-util.h"
|
||||
@ -89,6 +88,7 @@
|
||||
#define GNC_PREFS_GROUP_SEARCH "dialogs.business.invoice_search"
|
||||
#define GNC_PREF_NOTIFY_WHEN_DUE "notify_when_due"
|
||||
#define GNC_PREF_ACCUM_SPLITS "accumulate_splits"
|
||||
#define GNC_PREF_DAYS_IN_ADVANCE "days_in_advance"
|
||||
|
||||
#define LAST_POSTED_TO_ACCT "last-posted-to-acct"
|
||||
|
||||
@ -3217,7 +3217,7 @@ gnc_invoice_remind_bills_due (void)
|
||||
|
||||
if (!gnc_current_session_exist()) return;
|
||||
book = qof_session_get_book(gnc_get_current_session());
|
||||
days = gnc_gconf_get_float(GCONF_SECTION_BILL, "days_in_advance", NULL);
|
||||
days = gnc_prefs_get_float(GNC_PREFS_GROUP_BILL, GNC_PREF_DAYS_IN_ADVANCE);
|
||||
|
||||
gnc_invoice_show_bills_due(book, days);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/dialogs/business/bill/days_in_advance">
|
||||
<object class="GtkSpinButton" id="pref/dialogs.business.bill/days_in_advance">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -97,7 +97,7 @@
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Days in advance:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/dialogs/business/bill/days_in_advance</property>
|
||||
<property name="mnemonic_widget">pref/dialogs.business.bill/days_in_advance</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
|
@ -752,79 +752,6 @@ gnc_prefs_connect_radio_button_gconf (GtkRadioButton *button)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/** The user updated a spin button. Update gconf. Spin button
|
||||
* choices are stored as a float.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param button A pointer to the spin button that was clicked.
|
||||
*
|
||||
* @param user_data Unused.
|
||||
*/
|
||||
static void
|
||||
gnc_prefs_spin_button_user_cb_gconf (GtkSpinButton *spin,
|
||||
gpointer user_data)
|
||||
{
|
||||
const gchar *name;
|
||||
gdouble value;
|
||||
|
||||
g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
|
||||
name = gtk_buildable_get_name(GTK_BUILDABLE(spin)) + PREFIX_LEN;
|
||||
value = gtk_spin_button_get_value(spin);
|
||||
DEBUG("Spin button %s has value %f", name, value);
|
||||
gnc_gconf_set_float(name, NULL, value, NULL);
|
||||
}
|
||||
|
||||
|
||||
/** A spin button choice was updated in gconf. Update the user
|
||||
* visible dialog.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param button A pointer to the spin button that changed.
|
||||
*
|
||||
* @param value The new value of the spin button.
|
||||
*/
|
||||
static void
|
||||
gnc_prefs_spin_button_gconf_cb_gconf (GtkSpinButton *spin,
|
||||
gdouble value)
|
||||
{
|
||||
g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
|
||||
ENTER("button %p, value %f", spin, value);
|
||||
g_signal_handlers_block_by_func(G_OBJECT(spin),
|
||||
G_CALLBACK(gnc_prefs_spin_button_user_cb_gconf), NULL);
|
||||
gtk_spin_button_set_value(spin, value);
|
||||
g_signal_handlers_unblock_by_func(G_OBJECT(spin),
|
||||
G_CALLBACK(gnc_prefs_spin_button_user_cb_gconf), NULL);
|
||||
LEAVE(" ");
|
||||
}
|
||||
|
||||
|
||||
/** Connect a spin button widget to the user callback function. Set
|
||||
* the starting state of the button from its value in gconf.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param button A pointer to the spin button that should be
|
||||
* connected.
|
||||
*/
|
||||
static void
|
||||
gnc_prefs_connect_spin_button_gconf (GtkSpinButton *spin)
|
||||
{
|
||||
const gchar *name;
|
||||
gdouble value;
|
||||
|
||||
g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
|
||||
name = gtk_buildable_get_name(GTK_BUILDABLE(spin)) + PREFIX_LEN;
|
||||
value = gnc_gconf_get_float(name, NULL, NULL);
|
||||
gtk_spin_button_set_value(spin, value);
|
||||
DEBUG(" Spin button %s has initial value %f", name, value);
|
||||
g_signal_connect(G_OBJECT(spin), "value-changed",
|
||||
G_CALLBACK(gnc_prefs_spin_button_user_cb_gconf), NULL);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/** The user changed a combo box. Update gconf. Combo box
|
||||
* choices are stored as an int.
|
||||
*
|
||||
@ -1307,6 +1234,35 @@ gnc_prefs_connect_check_button (GtkCheckButton *button)
|
||||
g_free (pref);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/** Connect a GtkSpinButton widget to its stored value in the preferences database.
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param button A pointer to the spin button that should be
|
||||
* connected.
|
||||
*/
|
||||
static void
|
||||
gnc_prefs_connect_spin_button (GtkSpinButton *spin)
|
||||
{
|
||||
gchar *group, *pref;
|
||||
gdouble value;
|
||||
|
||||
g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
|
||||
|
||||
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(spin)), &group, &pref);
|
||||
|
||||
// value = gnc_prefs_get_float (group, pref);
|
||||
// gtk_spin_button_set_value(spin, value);
|
||||
// DEBUG(" Spin button %s/%s has initial value %f", group, pref, value);
|
||||
|
||||
gnc_prefs_bind (group, pref, G_OBJECT (spin), "value");
|
||||
|
||||
g_free (group);
|
||||
g_free (pref);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
@ -1382,11 +1338,6 @@ gnc_prefs_connect_one_gconf (const gchar *name,
|
||||
DEBUG(" %s - radio button", name);
|
||||
gnc_prefs_connect_radio_button_gconf(GTK_RADIO_BUTTON(widget));
|
||||
}
|
||||
else if (GTK_IS_SPIN_BUTTON(widget))
|
||||
{
|
||||
DEBUG(" %s - spin button", name);
|
||||
gnc_prefs_connect_spin_button_gconf(GTK_SPIN_BUTTON(widget));
|
||||
}
|
||||
else if (GTK_IS_COMBO_BOX(widget))
|
||||
{
|
||||
DEBUG(" %s - combo box", name);
|
||||
@ -1460,6 +1411,11 @@ gnc_prefs_connect_one (const gchar *name,
|
||||
DEBUG(" %s - check button", name);
|
||||
gnc_prefs_connect_check_button(GTK_CHECK_BUTTON(widget));
|
||||
}
|
||||
else if (GTK_IS_SPIN_BUTTON(widget))
|
||||
{
|
||||
DEBUG(" %s - spin button", name);
|
||||
gnc_prefs_connect_spin_button(GTK_SPIN_BUTTON(widget));
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG(" %s - unsupported %s", name,
|
||||
@ -1713,12 +1669,6 @@ gnc_preferences_gconf_changed (GConfClient *client,
|
||||
DEBUG("widget %p - radio button", widget);
|
||||
gnc_prefs_radio_button_gconf_cb_gconf(GTK_RADIO_BUTTON(widget));
|
||||
}
|
||||
else if (GTK_IS_SPIN_BUTTON(widget))
|
||||
{
|
||||
DEBUG("widget %p - spin button", widget);
|
||||
gnc_prefs_spin_button_gconf_cb_gconf(GTK_SPIN_BUTTON(widget),
|
||||
gconf_value_get_float(entry->value));
|
||||
}
|
||||
else if (GTK_IS_COMBO_BOX(widget))
|
||||
{
|
||||
DEBUG("widget %p - combo_box", widget);
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "gnc-gui-query.h"
|
||||
|
||||
#define GNC_PREF_AUTOSAVE_SHOW_EXPLANATION "autosave_show_explanation"
|
||||
#define KEY_AUTOSAVE_INTERVAL "autosave_interval_minutes"
|
||||
#define GNC_PREF_AUTOSAVE_INTERVAL "autosave_interval_minutes"
|
||||
#define AUTOSAVE_SOURCE_ID "autosave_source_id"
|
||||
|
||||
#ifdef G_LOG_DOMAIN
|
||||
@ -80,7 +80,7 @@ static gboolean autosave_confirm(GtkWidget *toplevel)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
guint interval_mins =
|
||||
gnc_gconf_get_float(GCONF_GENERAL, KEY_AUTOSAVE_INTERVAL, NULL);
|
||||
gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTOSAVE_INTERVAL);
|
||||
gboolean switch_off_autosave, show_expl_again, save_now;
|
||||
gint response;
|
||||
|
||||
@ -158,7 +158,7 @@ static gboolean autosave_confirm(GtkWidget *toplevel)
|
||||
/* Should we switch off autosave? */
|
||||
if (switch_off_autosave)
|
||||
{
|
||||
gnc_gconf_set_float(GCONF_GENERAL, KEY_AUTOSAVE_INTERVAL, 0, NULL);
|
||||
gnc_prefs_set_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTOSAVE_INTERVAL, 0);
|
||||
g_debug("autosave_timeout_cb: User chose to disable auto-save.\n");
|
||||
}
|
||||
|
||||
@ -253,7 +253,7 @@ void gnc_autosave_remove_timer(QofBook *book)
|
||||
static void gnc_autosave_add_timer(QofBook *book)
|
||||
{
|
||||
guint interval_mins =
|
||||
gnc_gconf_get_float(GCONF_GENERAL, KEY_AUTOSAVE_INTERVAL, NULL);
|
||||
gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTOSAVE_INTERVAL);
|
||||
|
||||
/* Interval zero means auto-save is turned off. */
|
||||
if ( interval_mins > 0
|
||||
|
@ -168,8 +168,8 @@ gnc_configure_date_completion (void)
|
||||
{
|
||||
char *date_completion = gnc_gconf_get_string(GCONF_GENERAL,
|
||||
KEY_DATE_COMPLETION, NULL);
|
||||
int backmonths = gnc_gconf_get_float(GCONF_GENERAL,
|
||||
KEY_DATE_BACKMONTHS, NULL);
|
||||
int backmonths = gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL,
|
||||
GNC_PREF_DATE_BACKMONTHS);
|
||||
QofDateCompletion dc;
|
||||
|
||||
if (backmonths < 0)
|
||||
@ -196,7 +196,7 @@ gnc_configure_date_completion (void)
|
||||
dc = QOF_DATE_COMPLETION_THISYEAR;
|
||||
backmonths = 6;
|
||||
gnc_gconf_set_string (GCONF_GENERAL, KEY_DATE_COMPLETION, "thisyear", NULL);
|
||||
gnc_gconf_set_float (GCONF_GENERAL, KEY_DATE_BACKMONTHS, 6.0, NULL);
|
||||
gnc_prefs_set_float (GNC_PREFS_GROUP_GENERAL, GNC_PREF_DATE_BACKMONTHS, 6.0);
|
||||
}
|
||||
qof_date_completion_set(dc, backmonths);
|
||||
|
||||
@ -647,8 +647,10 @@ gnc_gui_init(void)
|
||||
KEY_DATE_FORMAT, (GncGconfGeneralCb)gnc_configure_date_format, NULL);
|
||||
gnc_gconf_general_register_cb(
|
||||
KEY_DATE_COMPLETION, (GncGconfGeneralCb)gnc_configure_date_completion, NULL);
|
||||
gnc_gconf_general_register_cb(
|
||||
KEY_DATE_BACKMONTHS, (GncGconfGeneralCb)gnc_configure_date_completion, NULL);
|
||||
gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
|
||||
GNC_PREF_DATE_BACKMONTHS,
|
||||
gnc_configure_date_completion,
|
||||
NULL);
|
||||
gnc_gconf_general_register_any_cb(
|
||||
(GncGconfGeneralAnyCb)gnc_gui_refresh_all, NULL);
|
||||
|
||||
|
@ -96,7 +96,7 @@ enum
|
||||
#define GNC_PREF_SHOW_CLOSE_BUTTON "tab_close_buttons"
|
||||
#define GNC_PREF_TAB_NEXT_RECENT "tab_next_recent"
|
||||
#define KEY_TAB_POSITION "tab_position"
|
||||
#define KEY_TAB_WIDTH "tab_width"
|
||||
#define GNC_PREF_TAB_WIDTH "tab_width"
|
||||
#define GNC_PREF_TAB_COLOR "show_account_color_tabs"
|
||||
|
||||
#define GNC_MAIN_WINDOW_NAME "GncMainWindow"
|
||||
@ -1883,8 +1883,9 @@ gnc_main_window_update_tab_close_one_page (GncPluginPage *page,
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param entry A pointer to the GConfEntry which describes the new
|
||||
* state of whether close buttons should be visible on notebook tabs.
|
||||
* @param prefs Unused.
|
||||
*
|
||||
* @param pref Unused.
|
||||
*
|
||||
* @param user_data Unused.
|
||||
*/
|
||||
@ -1947,13 +1948,14 @@ gnc_main_window_update_tab_color_one_page (GncPluginPage *page,
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param entry A pointer to the GConfEntry which describes the new
|
||||
* state of whether the account color should be visible on notebook tabs.
|
||||
* @param prefs Unused.
|
||||
*
|
||||
* @param pref Name of the preference that was changed.
|
||||
*
|
||||
* @param user_data GncMainWindow.
|
||||
*/
|
||||
static void
|
||||
gnc_main_window_update_tab_color (gpointer gsettings, gchar *key, gpointer user_data)
|
||||
gnc_main_window_update_tab_color (gpointer gsettings, gchar *pref, gpointer user_data)
|
||||
{
|
||||
GncMainWindowPrivate *priv;
|
||||
GncMainWindow *window;
|
||||
@ -1962,7 +1964,7 @@ gnc_main_window_update_tab_color (gpointer gsettings, gchar *key, gpointer user_
|
||||
g_return_if_fail(GNC_IS_MAIN_WINDOW(user_data));
|
||||
window = user_data;
|
||||
priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
|
||||
if (g_strcmp0 (GNC_PREF_TAB_COLOR, key) == 0)
|
||||
if (g_strcmp0 (GNC_PREF_TAB_COLOR, pref) == 0)
|
||||
priv->show_color_tabs = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_COLOR);
|
||||
gnc_main_window_foreach_page (gnc_main_window_update_tab_color_one_page, window);
|
||||
LEAVE(" ");
|
||||
@ -1972,7 +1974,7 @@ gnc_main_window_update_tab_color (gpointer gsettings, gchar *key, gpointer user_
|
||||
/** Update the width of the label in the tab of a notebook page. This
|
||||
* function adjusts both the width and the ellipsize mode so that the tab
|
||||
* label looks correct. The special check for a zero value handles the
|
||||
* case where a user hasn't set a tab width and the gconf default isn't
|
||||
* case where a user hasn't set a tab width and the preference default isn't
|
||||
* detected.
|
||||
*
|
||||
* @internal
|
||||
@ -2016,18 +2018,19 @@ gnc_main_window_update_tab_width_one_page (GncPluginPage *page,
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* @param entry A pointer to the GConfEntry which describes the new
|
||||
* size of the tab label width.
|
||||
* @param prefs Unused.
|
||||
*
|
||||
* @param pref Unused.
|
||||
*
|
||||
* @param user_data Unused.
|
||||
*/
|
||||
static void
|
||||
gnc_main_window_update_tab_width (GConfEntry *entry, gpointer user_data)
|
||||
gnc_main_window_update_tab_width (gpointer prefs, gchar *pref, gpointer user_data)
|
||||
{
|
||||
gint new_value;
|
||||
|
||||
ENTER(" ");
|
||||
new_value = gconf_value_get_float(entry->value);
|
||||
new_value = gnc_prefs_get_float (GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_WIDTH);
|
||||
gnc_main_window_foreach_page(
|
||||
gnc_main_window_update_tab_width_one_page,
|
||||
&new_value);
|
||||
@ -2435,9 +2438,10 @@ gnc_main_window_class_init (GncMainWindowClass *klass)
|
||||
GNC_PREF_SHOW_CLOSE_BUTTON,
|
||||
gnc_main_window_update_tab_close,
|
||||
NULL);
|
||||
gnc_gconf_general_register_cb (KEY_TAB_WIDTH,
|
||||
gnc_main_window_update_tab_width,
|
||||
NULL);
|
||||
gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
|
||||
GNC_PREF_TAB_WIDTH,
|
||||
gnc_main_window_update_tab_width,
|
||||
NULL);
|
||||
|
||||
gnc_hook_add_dangler(HOOK_BOOK_SAVED,
|
||||
(GFunc)gnc_main_window_update_all_titles, NULL);
|
||||
@ -2468,7 +2472,7 @@ gnc_main_window_init (GncMainWindow *window,
|
||||
priv->event_handler_id =
|
||||
qof_event_register_handler(gnc_main_window_event_handler, window);
|
||||
|
||||
/* Get the show_color_tabs value from gconf */
|
||||
/* Get the show_color_tabs value preference */
|
||||
priv->show_color_tabs = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_COLOR);
|
||||
|
||||
gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
|
||||
@ -2829,7 +2833,7 @@ gnc_main_window_open_page (GncMainWindow *window,
|
||||
/*
|
||||
* The page tab.
|
||||
*/
|
||||
width = gnc_gconf_get_float(GCONF_GENERAL, KEY_TAB_WIDTH, NULL);
|
||||
width = gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_WIDTH);
|
||||
icon = GNC_PLUGIN_PAGE_GET_CLASS(page)->tab_icon;
|
||||
label = gtk_label_new (gnc_plugin_page_get_page_name(page));
|
||||
if (width != 0)
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include "gnc-tree-util-split-reg.h"
|
||||
#include "gnc-ui.h"
|
||||
#include "dialog-utils.h"
|
||||
#include "gnc-gconf-utils.h"
|
||||
#include "gnc-prefs.h"
|
||||
#include "Transaction.h"
|
||||
#include "engine-helpers.h"
|
||||
@ -295,6 +294,7 @@ struct GncTreeViewSplitRegPrivate
|
||||
#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"
|
||||
#define GNC_PREF_KEY_LENGTH "key_length"
|
||||
|
||||
/* This could be a preference setting, show currency / commodity symbols */
|
||||
#define SHOW_SYMBOL FALSE
|
||||
@ -478,7 +478,7 @@ gnc_tree_view_split_reg_init (GncTreeViewSplitReg *view)
|
||||
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->key_length = gnc_prefs_get_float (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_KEY_LENGTH);
|
||||
|
||||
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);
|
||||
@ -567,7 +567,7 @@ gnc_tree_view_split_reg_finalize (GObject *object)
|
||||
|
||||
/* Update internal settings based on preferences */
|
||||
void
|
||||
gnc_tree_view_split_reg_refresh_from_gconf (GncTreeViewSplitReg *view)
|
||||
gnc_tree_view_split_reg_refresh_from_prefs (GncTreeViewSplitReg *view)
|
||||
{
|
||||
GncTreeModelSplitReg *model;
|
||||
|
||||
|
@ -139,7 +139,7 @@ void gnc_tree_view_split_reg_set_uiupdate_cb (GncTreeViewSplitReg *view, GFunc c
|
||||
|
||||
gboolean gnc_tree_view_split_reg_call_uiupdate_cb(GncTreeViewSplitReg *view);
|
||||
|
||||
void gnc_tree_view_split_reg_refresh_from_gconf (GncTreeViewSplitReg *view);
|
||||
void gnc_tree_view_split_reg_refresh_from_prefs (GncTreeViewSplitReg *view);
|
||||
|
||||
GtkWidget * gnc_tree_view_split_reg_get_parent (GncTreeViewSplitReg *view);
|
||||
|
||||
|
@ -1392,7 +1392,7 @@ many months before the current month:</property>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/general/date_backmonths">
|
||||
<object class="GtkSpinButton" id="pref/general/date_backmonths">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -1610,7 +1610,7 @@ many months before the current month:</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/general/retain_days">
|
||||
<object class="GtkSpinButton" id="pref/general/retain_days">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -1728,7 +1728,7 @@ many months before the current month:</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Decimal places:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/general/auto_decimal_places</property>
|
||||
<property name="mnemonic_widget">pref/general/auto_decimal_places</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">9</property>
|
||||
@ -1739,7 +1739,7 @@ many months before the current month:</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/general/auto_decimal_places">
|
||||
<object class="GtkSpinButton" id="pref/general/auto_decimal_places">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -1855,7 +1855,7 @@ many months before the current month:</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">New search _limit:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/dialogs/search/new_search_limit</property>
|
||||
<property name="mnemonic_widget">pref/dialogs.search/new_search_limit</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">21</property>
|
||||
@ -1866,7 +1866,7 @@ many months before the current month:</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/dialogs/search/new_search_limit">
|
||||
<object class="GtkSpinButton" id="pref/dialogs.search/new_search_limit">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -1918,7 +1918,7 @@ many months before the current month:</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Auto-save time _interval:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/general/autosave_interval_minutes</property>
|
||||
<property name="mnemonic_widget">pref/general/autosave_interval_minutes</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">14</property>
|
||||
@ -1934,7 +1934,7 @@ many months before the current month:</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/general/autosave_interval_minutes">
|
||||
<object class="GtkSpinButton" id="pref/general/autosave_interval_minutes">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -2893,7 +2893,7 @@ many months before the current month:</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Number of _transactions:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/general/register/max_transactions</property>
|
||||
<property name="mnemonic_widget">pref/general.register/max_transactions</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">9</property>
|
||||
@ -2904,7 +2904,7 @@ many months before the current month:</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/general/register/max_transactions">
|
||||
<object class="GtkSpinButton" id="pref/general.register/max_transactions">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -3001,7 +3001,7 @@ many months before the current month:</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Number of _characters for auto complete:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/general/register/key_length</property>
|
||||
<property name="mnemonic_widget">pref/general.register/key_length</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">10</property>
|
||||
@ -3012,7 +3012,7 @@ many months before the current month:</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/general/register/key_length">
|
||||
<object class="GtkSpinButton" id="pref/general.register/key_length">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -3836,7 +3836,7 @@ many months before the current month:</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/general/tab_width">
|
||||
<object class="GtkSpinButton" id="pref/general/tab_width">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -3921,7 +3921,7 @@ many months before the current month:</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="max_transactions_adj">
|
||||
<property name="upper">999999</property>
|
||||
<property name="value">1</property>
|
||||
<property name="value">0</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
|
@ -72,22 +72,22 @@ G_GNUC_UNUSED static QofLogModule log_module = "gnc.printing.checks";
|
||||
#define KEY_CHECK_POSITION "check_position"
|
||||
#define KEY_FIRST_PAGE_COUNT "first_page_count"
|
||||
#define KEY_DATE_FORMAT_USER "date_format_custom"
|
||||
#define KEY_CUSTOM_PAYEE "custom_payee"
|
||||
#define KEY_CUSTOM_DATE "custom_date"
|
||||
#define KEY_CUSTOM_WORDS "custom_amount_words"
|
||||
#define KEY_CUSTOM_NUMBER "custom_amount_number"
|
||||
#define KEY_CUSTOM_ADDRESS "custom_address"
|
||||
#define KEY_CUSTOM_NOTES "custom_memo" /* historically misnamed */
|
||||
#define KEY_CUSTOM_MEMO "custom_memo2"
|
||||
#define KEY_CUSTOM_TRANSLATION "custom_translation"
|
||||
#define KEY_CUSTOM_ROTATION "custom_rotation"
|
||||
#define GNC_PREF_CUSTOM_PAYEE "custom_payee"
|
||||
#define GNC_PREF_CUSTOM_DATE "custom_date"
|
||||
#define GNC_PREF_CUSTOM_WORDS "custom_amount_words"
|
||||
#define GNC_PREF_CUSTOM_NUMBER "custom_amount_number"
|
||||
#define GNC_PREF_CUSTOM_ADDRESS "custom_address"
|
||||
#define GNC_PREF_CUSTOM_NOTES "custom_notes"
|
||||
#define GNC_PREF_CUSTOM_MEMO "custom_memo"
|
||||
#define GNC_PREF_CUSTOM_TRANSLATION "custom_translation"
|
||||
#define GNC_PREF_CUSTOM_ROTATION "custom_rotation"
|
||||
#define KEY_CUSTOM_UNITS "custom_units"
|
||||
#define GNC_PREF_PRINT_DATE_FMT "print_date_format"
|
||||
#define GNC_PREF_DEFAULT_FONT "default_font"
|
||||
#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"
|
||||
#define GNC_PREF_SPLITS_AMOUNT "splits_amount"
|
||||
#define GNC_PREF_SPLITS_MEMO "splits_memo"
|
||||
#define GNC_PREF_SPLITS_ACCOUNT "splits_account"
|
||||
|
||||
|
||||
#define DEFAULT_FONT "sans 12"
|
||||
@ -357,39 +357,30 @@ find_existing_format (GtkListStore *store, gchar *guid, GtkTreeIter *iter_out)
|
||||
|
||||
|
||||
/* This function is used by the custom format dialog to save position values
|
||||
* to the GConf database.
|
||||
* in the preferences database.
|
||||
*/
|
||||
static void
|
||||
save_float_pair (const char *section, const char *key, double a, double b)
|
||||
save_float_pair (const char *group, const char *pref, double a, double b)
|
||||
{
|
||||
GSList *coord_list = NULL;
|
||||
|
||||
coord_list = g_slist_append(coord_list, &a);
|
||||
coord_list = g_slist_append(coord_list, &b);
|
||||
gnc_gconf_set_list(section, key, GCONF_VALUE_FLOAT, coord_list, NULL);
|
||||
g_slist_free(coord_list);
|
||||
GVariant *coords = g_variant_new ("(dd)", a, b);
|
||||
gnc_prefs_set_value (group, pref, coords);
|
||||
}
|
||||
|
||||
|
||||
/* This function is used by the custom format dialog to restore position
|
||||
* values from the GConf database.
|
||||
* values from the preferences database.
|
||||
*/
|
||||
static void
|
||||
get_float_pair (const char *section, const char *key, double *a, double *b)
|
||||
get_float_pair (const char *group, const char *pref, double *a, double *b)
|
||||
{
|
||||
GSList *coord_list;
|
||||
GVariant *coords = gnc_prefs_get_value (group, pref);
|
||||
|
||||
coord_list = gnc_gconf_get_list (section, key, GCONF_VALUE_FLOAT, NULL);
|
||||
if (NULL == coord_list)
|
||||
{
|
||||
*a = 0;
|
||||
*b = 0;
|
||||
return;
|
||||
}
|
||||
*a = 0;
|
||||
*b = 0;
|
||||
|
||||
*a = *(gdouble*)g_slist_nth_data(coord_list, 0);
|
||||
*b = *(gdouble*)g_slist_nth_data(coord_list, 1);
|
||||
g_slist_free(coord_list);
|
||||
if (g_variant_is_of_type (coords, (const GVariantType *) "(dd)") )
|
||||
g_variant_get (coords, "(dd)", a, b);
|
||||
g_variant_unref (coords);
|
||||
}
|
||||
|
||||
|
||||
@ -594,42 +585,41 @@ gnc_ui_print_save_dialog(PrintCheckDialog *pcd)
|
||||
}
|
||||
|
||||
/* Custom format page */
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_PAYEE,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_PAYEE,
|
||||
gtk_spin_button_get_value(pcd->payee_x),
|
||||
gtk_spin_button_get_value(pcd->payee_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_DATE,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_DATE,
|
||||
gtk_spin_button_get_value(pcd->date_x),
|
||||
gtk_spin_button_get_value(pcd->date_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_WORDS,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_WORDS,
|
||||
gtk_spin_button_get_value(pcd->words_x),
|
||||
gtk_spin_button_get_value(pcd->words_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_NUMBER,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NUMBER,
|
||||
gtk_spin_button_get_value(pcd->number_x),
|
||||
gtk_spin_button_get_value(pcd->number_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_NOTES,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NOTES,
|
||||
gtk_spin_button_get_value(pcd->notes_x),
|
||||
gtk_spin_button_get_value(pcd->notes_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_MEMO,
|
||||
gtk_spin_button_get_value(pcd->memo_x),
|
||||
gtk_spin_button_get_value(pcd->memo_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_ADDRESS,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ADDRESS,
|
||||
gtk_spin_button_get_value(pcd->address_x),
|
||||
gtk_spin_button_get_value(pcd->address_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_SPLITS_AMOUNT,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_AMOUNT,
|
||||
gtk_spin_button_get_value(pcd->splits_amount_x),
|
||||
gtk_spin_button_get_value(pcd->splits_amount_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_SPLITS_MEMO,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_MEMO,
|
||||
gtk_spin_button_get_value(pcd->splits_memo_x),
|
||||
gtk_spin_button_get_value(pcd->splits_memo_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_SPLITS_ACCOUNT,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_ACCOUNT,
|
||||
gtk_spin_button_get_value(pcd->splits_account_x),
|
||||
gtk_spin_button_get_value(pcd->splits_account_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_TRANSLATION,
|
||||
gtk_spin_button_get_value(pcd->translation_x),
|
||||
gtk_spin_button_get_value(pcd->translation_y));
|
||||
gnc_gconf_set_float(GCONF_SECTION, KEY_CUSTOM_ROTATION,
|
||||
gtk_spin_button_get_value(pcd->check_rotation),
|
||||
NULL);
|
||||
gnc_prefs_set_float(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ROTATION,
|
||||
gtk_spin_button_get_value(pcd->check_rotation));
|
||||
active = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->units_combobox));
|
||||
gnc_gconf_set_int(GCONF_SECTION, KEY_CUSTOM_UNITS, active, NULL);
|
||||
}
|
||||
@ -690,41 +680,41 @@ gnc_ui_print_restore_dialog(PrintCheckDialog *pcd)
|
||||
}
|
||||
|
||||
/* Custom format page */
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_PAYEE, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_PAYEE, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->payee_x, x);
|
||||
gtk_spin_button_set_value(pcd->payee_y, y);
|
||||
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_DATE, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_DATE, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->date_x, x);
|
||||
gtk_spin_button_set_value(pcd->date_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_WORDS, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_WORDS, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->words_x, x);
|
||||
gtk_spin_button_set_value(pcd->words_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_NUMBER, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NUMBER, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->number_x, x);
|
||||
gtk_spin_button_set_value(pcd->number_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_ADDRESS, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ADDRESS, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->address_x, x);
|
||||
gtk_spin_button_set_value(pcd->address_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_NOTES, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NOTES, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->notes_x, x);
|
||||
gtk_spin_button_set_value(pcd->notes_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_MEMO, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->memo_x, x);
|
||||
gtk_spin_button_set_value(pcd->memo_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_SPLITS_AMOUNT, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_AMOUNT, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->splits_amount_x, x);
|
||||
gtk_spin_button_set_value(pcd->splits_amount_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_SPLITS_MEMO, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_MEMO, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->splits_memo_x, x);
|
||||
gtk_spin_button_set_value(pcd->splits_memo_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_SPLITS_ACCOUNT, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_ACCOUNT, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->splits_account_x, x);
|
||||
gtk_spin_button_set_value(pcd->splits_account_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_TRANSLATION, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->translation_x, x);
|
||||
gtk_spin_button_set_value(pcd->translation_y, y);
|
||||
x = gnc_gconf_get_float(GCONF_SECTION, KEY_CUSTOM_ROTATION, NULL);
|
||||
x = gnc_prefs_get_float(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ROTATION);
|
||||
gtk_spin_button_set_value(pcd->check_rotation, x);
|
||||
active = gnc_gconf_get_int(GCONF_SECTION, KEY_CUSTOM_UNITS, NULL);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(pcd->units_combobox), active);
|
||||
|
@ -72,22 +72,22 @@ G_GNUC_UNUSED static QofLogModule log_module = "gnc.printing.checks";
|
||||
#define KEY_CHECK_POSITION "check_position"
|
||||
#define KEY_FIRST_PAGE_COUNT "first_page_count"
|
||||
#define KEY_DATE_FORMAT_USER "date_format_custom"
|
||||
#define KEY_CUSTOM_PAYEE "custom_payee"
|
||||
#define KEY_CUSTOM_DATE "custom_date"
|
||||
#define KEY_CUSTOM_WORDS "custom_amount_words"
|
||||
#define KEY_CUSTOM_NUMBER "custom_amount_number"
|
||||
#define KEY_CUSTOM_ADDRESS "custom_address"
|
||||
#define KEY_CUSTOM_NOTES "custom_memo" /* historically misnamed */
|
||||
#define KEY_CUSTOM_MEMO "custom_memo2"
|
||||
#define KEY_CUSTOM_TRANSLATION "custom_translation"
|
||||
#define KEY_CUSTOM_ROTATION "custom_rotation"
|
||||
#define GNC_PREF_CUSTOM_PAYEE "custom_payee"
|
||||
#define GNC_PREF_CUSTOM_DATE "custom_date"
|
||||
#define GNC_PREF_CUSTOM_WORDS "custom_amount_words"
|
||||
#define GNC_PREF_CUSTOM_NUMBER "custom_amount_number"
|
||||
#define GNC_PREF_CUSTOM_ADDRESS "custom_address"
|
||||
#define GNC_PREF_CUSTOM_NOTES "custom_notes"
|
||||
#define GNC_PREF_CUSTOM_MEMO "custom_memo"
|
||||
#define GNC_PREF_CUSTOM_TRANSLATION "custom_translation"
|
||||
#define GNC_PREF_CUSTOM_ROTATION "custom_rotation"
|
||||
#define KEY_CUSTOM_UNITS "custom_units"
|
||||
#define GNC_PREF_PRINT_DATE_FMT "print_date_format"
|
||||
#define GNC_PREF_DEFAULT_FONT "default_font"
|
||||
#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"
|
||||
#define GNC_PREF_SPLITS_AMOUNT "splits_amount"
|
||||
#define GNC_PREF_SPLITS_MEMO "splits_memo"
|
||||
#define GNC_PREF_SPLITS_ACCOUNT "splits_account"
|
||||
|
||||
|
||||
#define DEFAULT_FONT "sans 12"
|
||||
@ -357,39 +357,31 @@ find_existing_format (GtkListStore *store, gchar *guid, GtkTreeIter *iter_out)
|
||||
|
||||
|
||||
/* This function is used by the custom format dialog to save position values
|
||||
* to the GConf database.
|
||||
* in the preferences database.
|
||||
*/
|
||||
static void
|
||||
save_float_pair (const char *section, const char *key, double a, double b)
|
||||
save_float_pair (const char *group, const char *pref, double a, double b)
|
||||
{
|
||||
GSList *coord_list = NULL;
|
||||
|
||||
coord_list = g_slist_append(coord_list, &a);
|
||||
coord_list = g_slist_append(coord_list, &b);
|
||||
gnc_gconf_set_list(section, key, GCONF_VALUE_FLOAT, coord_list, NULL);
|
||||
g_slist_free(coord_list);
|
||||
GVariant *coords = g_variant_new ("(dd)", a, b);
|
||||
gnc_prefs_set_value (group, pref, coords);
|
||||
g_variant_unref (coords);
|
||||
}
|
||||
|
||||
|
||||
/* This function is used by the custom format dialog to restore position
|
||||
* values from the GConf database.
|
||||
* values from the preferences database.
|
||||
*/
|
||||
static void
|
||||
get_float_pair (const char *section, const char *key, double *a, double *b)
|
||||
get_float_pair (const char *group, const char *pref, double *a, double *b)
|
||||
{
|
||||
GSList *coord_list;
|
||||
GVariant *coords = gnc_prefs_get_value (group, pref);
|
||||
|
||||
coord_list = gnc_gconf_get_list (section, key, GCONF_VALUE_FLOAT, NULL);
|
||||
if (NULL == coord_list)
|
||||
{
|
||||
*a = 0;
|
||||
*b = 0;
|
||||
return;
|
||||
}
|
||||
*a = 0;
|
||||
*b = 0;
|
||||
|
||||
*a = *(gdouble*)g_slist_nth_data(coord_list, 0);
|
||||
*b = *(gdouble*)g_slist_nth_data(coord_list, 1);
|
||||
g_slist_free(coord_list);
|
||||
if (g_variant_is_of_type (coords, (const GVariantType *) "(dd)") )
|
||||
g_variant_get (coords, "(dd)", a, b);
|
||||
g_variant_unref (coords);
|
||||
}
|
||||
|
||||
|
||||
@ -594,42 +586,41 @@ gnc_ui_print_save_dialog(PrintCheckDialog *pcd)
|
||||
}
|
||||
|
||||
/* Custom format page */
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_PAYEE,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_PAYEE,
|
||||
gtk_spin_button_get_value(pcd->payee_x),
|
||||
gtk_spin_button_get_value(pcd->payee_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_DATE,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_DATE,
|
||||
gtk_spin_button_get_value(pcd->date_x),
|
||||
gtk_spin_button_get_value(pcd->date_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_WORDS,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_WORDS,
|
||||
gtk_spin_button_get_value(pcd->words_x),
|
||||
gtk_spin_button_get_value(pcd->words_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_NUMBER,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NUMBER,
|
||||
gtk_spin_button_get_value(pcd->number_x),
|
||||
gtk_spin_button_get_value(pcd->number_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_NOTES,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NOTES,
|
||||
gtk_spin_button_get_value(pcd->notes_x),
|
||||
gtk_spin_button_get_value(pcd->notes_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_MEMO,
|
||||
gtk_spin_button_get_value(pcd->memo_x),
|
||||
gtk_spin_button_get_value(pcd->memo_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_ADDRESS,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ADDRESS,
|
||||
gtk_spin_button_get_value(pcd->address_x),
|
||||
gtk_spin_button_get_value(pcd->address_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_SPLITS_AMOUNT,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_AMOUNT,
|
||||
gtk_spin_button_get_value(pcd->splits_amount_x),
|
||||
gtk_spin_button_get_value(pcd->splits_amount_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_SPLITS_MEMO,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_MEMO,
|
||||
gtk_spin_button_get_value(pcd->splits_memo_x),
|
||||
gtk_spin_button_get_value(pcd->splits_memo_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_SPLITS_ACCOUNT,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_ACCOUNT,
|
||||
gtk_spin_button_get_value(pcd->splits_account_x),
|
||||
gtk_spin_button_get_value(pcd->splits_account_y));
|
||||
save_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION,
|
||||
save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_TRANSLATION,
|
||||
gtk_spin_button_get_value(pcd->translation_x),
|
||||
gtk_spin_button_get_value(pcd->translation_y));
|
||||
gnc_gconf_set_float(GCONF_SECTION, KEY_CUSTOM_ROTATION,
|
||||
gtk_spin_button_get_value(pcd->check_rotation),
|
||||
NULL);
|
||||
gnc_prefs_set_float(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ROTATION,
|
||||
gtk_spin_button_get_value(pcd->check_rotation));
|
||||
active = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->units_combobox));
|
||||
gnc_gconf_set_int(GCONF_SECTION, KEY_CUSTOM_UNITS, active, NULL);
|
||||
}
|
||||
@ -690,41 +681,41 @@ gnc_ui_print_restore_dialog(PrintCheckDialog *pcd)
|
||||
}
|
||||
|
||||
/* Custom format page */
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_PAYEE, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_PAYEE, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->payee_x, x);
|
||||
gtk_spin_button_set_value(pcd->payee_y, y);
|
||||
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_DATE, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_DATE, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->date_x, x);
|
||||
gtk_spin_button_set_value(pcd->date_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_WORDS, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_WORDS, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->words_x, x);
|
||||
gtk_spin_button_set_value(pcd->words_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_NUMBER, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NUMBER, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->number_x, x);
|
||||
gtk_spin_button_set_value(pcd->number_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_ADDRESS, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ADDRESS, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->address_x, x);
|
||||
gtk_spin_button_set_value(pcd->address_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_NOTES, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NOTES, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->notes_x, x);
|
||||
gtk_spin_button_set_value(pcd->notes_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_MEMO, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->memo_x, x);
|
||||
gtk_spin_button_set_value(pcd->memo_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_SPLITS_AMOUNT, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_AMOUNT, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->splits_amount_x, x);
|
||||
gtk_spin_button_set_value(pcd->splits_amount_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_SPLITS_MEMO, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_MEMO, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->splits_memo_x, x);
|
||||
gtk_spin_button_set_value(pcd->splits_memo_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_SPLITS_ACCOUNT, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_ACCOUNT, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->splits_account_x, x);
|
||||
gtk_spin_button_set_value(pcd->splits_account_y, y);
|
||||
get_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION, &x, &y);
|
||||
get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_TRANSLATION, &x, &y);
|
||||
gtk_spin_button_set_value(pcd->translation_x, x);
|
||||
gtk_spin_button_set_value(pcd->translation_y, y);
|
||||
x = gnc_gconf_get_float(GCONF_SECTION, KEY_CUSTOM_ROTATION, NULL);
|
||||
x = gnc_prefs_get_float(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ROTATION);
|
||||
gtk_spin_button_set_value(pcd->check_rotation, x);
|
||||
active = gnc_gconf_get_int(GCONF_SECTION, KEY_CUSTOM_UNITS, NULL);
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(pcd->units_combobox), active);
|
||||
|
@ -54,7 +54,6 @@
|
||||
#include "gnc-embedded-window.h"
|
||||
#include "gnc-engine.h"
|
||||
#include "gnc-frequency.h"
|
||||
#include "gnc-gconf-utils.h"
|
||||
#include "gnc-gui-query.h"
|
||||
#include "gnc-hooks.h"
|
||||
#include "gnc-ledger-display.h"
|
||||
@ -1429,7 +1428,7 @@ schedXact_editor_populate( GncSxEditorDialog *sxed )
|
||||
if ( sxed->newsxP )
|
||||
{
|
||||
daysInAdvance =
|
||||
gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_CREATE_DAYS, NULL );
|
||||
gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_CREATE_DAYS);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1447,7 +1446,7 @@ schedXact_editor_populate( GncSxEditorDialog *sxed )
|
||||
if ( sxed->newsxP )
|
||||
{
|
||||
daysInAdvance =
|
||||
gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_REMIND_DAYS, NULL );
|
||||
gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_REMIND_DAYS);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -28,9 +28,8 @@
|
||||
#define DIALOG_SCHEDXACTION_CM_CLASS "dialog-scheduledtransactions"
|
||||
#define DIALOG_SCHEDXACTION_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"
|
||||
|
||||
#define SXED_GCONF_SECTION "dialogs/scheduled_trans/transaction_editor"
|
||||
#define KEY_CREATE_DAYS "create_days"
|
||||
#define KEY_REMIND_DAYS "remind_days"
|
||||
#define GNC_PREF_CREATE_DAYS "create_days"
|
||||
#define GNC_PREF_REMIND_DAYS "remind_days"
|
||||
#define GNC_PREFS_GROUP_SXED "dialogs.sxs.transaction_editor"
|
||||
#define GNC_PREF_CREATE_AUTO "create_auto"
|
||||
#define GNC_PREF_NOTIFY "notify"
|
||||
|
@ -54,7 +54,6 @@
|
||||
#include "gnc-embedded-window.h"
|
||||
#include "gnc-engine.h"
|
||||
#include "gnc-frequency.h"
|
||||
#include "gnc-gconf-utils.h"
|
||||
#include "gnc-gui-query.h"
|
||||
#include "gnc-hooks.h"
|
||||
#include "gnc-ledger-display.h"
|
||||
@ -1421,7 +1420,7 @@ schedXact_editor_populate (GncSxEditorDialog2 *sxed)
|
||||
if ( sxed->newsxP )
|
||||
{
|
||||
daysInAdvance =
|
||||
gnc_gconf_get_float (SXED_GCONF_SECTION, KEY_CREATE_DAYS, NULL);
|
||||
gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_CREATE_DAYS);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1439,7 +1438,7 @@ schedXact_editor_populate (GncSxEditorDialog2 *sxed)
|
||||
if (sxed->newsxP)
|
||||
{
|
||||
daysInAdvance =
|
||||
gnc_gconf_get_float (SXED_GCONF_SECTION, KEY_REMIND_DAYS, NULL);
|
||||
gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_REMIND_DAYS);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -28,9 +28,8 @@
|
||||
#define DIALOG_SCHEDXACTION2_CM_CLASS "dialog-scheduledtransactions"
|
||||
#define DIALOG_SCHEDXACTION2_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"
|
||||
|
||||
#define SXED_GCONF_SECTION "dialogs/scheduled_trans/transaction_editor"
|
||||
#define KEY_CREATE_DAYS "create_days"
|
||||
#define KEY_REMIND_DAYS "remind_days"
|
||||
#define GNC_PREF_CREATE_DAYS "create_days"
|
||||
#define GNC_PREF_REMIND_DAYS "remind_days"
|
||||
#define GNC_PREFS_GROUP_SXED "dialogs.sxs.transaction_editor"
|
||||
#define GNC_PREF_CREATE_AUTO "create_auto"
|
||||
#define GNC_PREF_NOTIFY "notify"
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "gnc-dense-cal.h"
|
||||
#include "gnc-engine.h"
|
||||
#include "engine-helpers.h"
|
||||
#include "gnc-gconf-utils.h"
|
||||
#include "gnc-prefs.h"
|
||||
#include "gnc-ui-util.h"
|
||||
#include "gnc-ui.h"
|
||||
@ -507,11 +506,11 @@ sxftd_compute_sx(SXFromTransInfo *sxfti)
|
||||
(autoCreateState & notifyState) );
|
||||
|
||||
daysInAdvance =
|
||||
gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_CREATE_DAYS, NULL );
|
||||
gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_CREATE_DAYS);
|
||||
xaccSchedXactionSetAdvanceCreation( sx, daysInAdvance );
|
||||
|
||||
daysInAdvance =
|
||||
gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_REMIND_DAYS, NULL );
|
||||
gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_REMIND_DAYS);
|
||||
xaccSchedXactionSetAdvanceReminder( sx, daysInAdvance );
|
||||
}
|
||||
|
||||
|
@ -3900,7 +3900,7 @@ gnc_plugin_page_register2_refresh_cb (GHashTable *changes, gpointer user_data) /
|
||||
else
|
||||
{
|
||||
/* Force updates */
|
||||
gnc_tree_view_split_reg_refresh_from_gconf (view);
|
||||
gnc_tree_view_split_reg_refresh_from_prefs (view);
|
||||
}
|
||||
gnc_plugin_page_register2_ui_update (NULL, page);
|
||||
}
|
||||
|
@ -20,35 +20,70 @@
|
||||
<summary>Custom date format</summary>
|
||||
<description>If the 'date_format' is set to indicate a custom date format, this value is used as an argument to strftime to produce the date to be printed. It may be any valid strftime string; for more information about this format, read the manual page of strftime by "man 3 strftime".</description>
|
||||
</key>
|
||||
<key name="custom_payee" type="ai">
|
||||
<default>[]</default>
|
||||
<key name="custom_units" type="i">
|
||||
<default>0</default>
|
||||
<summary>Units in which the custom coordinates are expressed</summary>
|
||||
<description>Units in which the custom coordinates are expressed (inches, mm, ...).</description>
|
||||
</key>
|
||||
<key name="custom_payee" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of payee name</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the payee line on the check.</description>
|
||||
</key>
|
||||
<key name="custom_date" type="ai">
|
||||
<default>[]</default>
|
||||
<key name="custom_date" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of date line</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the date line on the check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="custom_amount_words" type="ai">
|
||||
<default>[]</default>
|
||||
<key name="custom_amount_words" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of check amount in words</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the written amount line on the check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="custom_amount_number" type="ai">
|
||||
<default>[]</default>
|
||||
<key name="custom_amount_number" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of check amount in numbers</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the numerical amount line on the check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="custom_memo" type="ai">
|
||||
<default>[]</default>
|
||||
<key name="custom_address" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of payee address</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the payee address line on the check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="custom_notes" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of notes line</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the notes line on the check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="custom_memo" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of memo line</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the memo line on the check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="custom_position" type="ai">
|
||||
<default>[]</default>
|
||||
<summary>Position of check on page</summary>
|
||||
<description>This value contains the Y coordinate for the bottom edge of the check. This coordinate is from the bottom edge of the sheet of paper.</description>
|
||||
<key name="custom_translation" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Offset for complete check</summary>
|
||||
<description>This value contains the X,Y offset for the complete check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="custom_rotation" type="d">
|
||||
<default>0.0</default>
|
||||
<summary>Rotation angle</summary>
|
||||
<description>Number of degrees to rotate the check.</description>
|
||||
</key>
|
||||
<key name="splits_amount" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of split's amount in numbers</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the split's amount line on the check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="splits_memo" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of split's memo line</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the split's memo line on the check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="splits_account" type="(dd)">
|
||||
<default>(0,0)</default>
|
||||
<summary>Position of split's account line</summary>
|
||||
<description>This value contains the X,Y coordinates for the start of the split's account line on the check. Coordinates are from the lower left corner of the specified check position.</description>
|
||||
</key>
|
||||
<key name="print_date_format" type="b">
|
||||
<default>false</default>
|
||||
|
@ -202,7 +202,7 @@
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Crea_te in advance:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/dialogs/scheduled_trans/transaction_editor/create_days</property>
|
||||
<property name="mnemonic_widget">pref/dialogs.sxs.transaction_editor/create_days</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@ -225,6 +225,7 @@
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">R_emind in advance:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">pref/dialogs.sxs.transaction_editor/remind_days</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@ -241,7 +242,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/dialogs/scheduled_trans/transaction_editor/remind_days">
|
||||
<object class="GtkSpinButton" id="pref/dialogs.sxs.transaction_editor/remind_days">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Begin notifications this many days before the transaction is created.</property>
|
||||
@ -287,7 +288,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/dialogs/scheduled_trans/transaction_editor/create_days">
|
||||
<object class="GtkSpinButton" id="pref/dialogs.sxs.transaction_editor/create_days">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Create the transaction this many days before its effective date.</property>
|
||||
|
@ -71,7 +71,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/atm_fee_threshold">
|
||||
<object class="GtkSpinButton" id="pref/dialogs.import.generic/atm_fee_threshold">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -99,7 +99,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/auto_clear_threshold">
|
||||
<object class="GtkSpinButton" id="pref/dialogs.import.generic/auto_clear_threshold">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -126,7 +126,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/auto_add_threshold">
|
||||
<object class="GtkSpinButton" id="pref/dialogs.import.generic/auto_add_threshold">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -153,7 +153,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/match_threshold">
|
||||
<object class="GtkSpinButton" id="pref/dialogs.import.generic/match_threshold">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
@ -186,7 +186,7 @@
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Commercial ATM _fees threshold</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/atm_fee_threshold</property>
|
||||
<property name="mnemonic_widget">pref/dialogs.import.generic/atm_fee_threshold</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">7</property>
|
||||
@ -203,7 +203,7 @@
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Auto-c_lear threshold</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/auto_clear_threshold</property>
|
||||
<property name="mnemonic_widget">pref/dialogs.import.generic/auto_clear_threshold</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">6</property>
|
||||
@ -220,7 +220,7 @@
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Auto-_add threshold</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/auto_add_threshold</property>
|
||||
<property name="mnemonic_widget">pref/dialogs.import.generic/auto_add_threshold</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">5</property>
|
||||
@ -237,7 +237,7 @@
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Match _display threshold</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/match_threshold</property>
|
||||
<property name="mnemonic_widget">pref/dialogs.import.generic/match_threshold</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">4</property>
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <glib.h>
|
||||
|
||||
#include "import-settings.h"
|
||||
#include "gnc-gconf-utils.h"
|
||||
#include "gnc-prefs.h"
|
||||
|
||||
/********************************************************************\
|
||||
@ -90,14 +89,14 @@ gnc_import_Settings_new (void)
|
||||
settings->action_add_enabled = DEFAULT_ACTION_ADD_ENABLED;
|
||||
settings->action_clear_enabled = DEFAULT_ACTION_CLEAR_ENABLED;
|
||||
settings->clear_threshold =
|
||||
(int)gnc_gconf_get_float(GCONF_IMPORT_SECTION, "auto_clear_threshold", NULL);
|
||||
(int)gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_AUTO_CLEAR_THRESHOLD);
|
||||
settings->add_threshold =
|
||||
(int)gnc_gconf_get_float(GCONF_IMPORT_SECTION, "auto_add_threshold", NULL);
|
||||
(int)gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_AUTO_ADD_THRESHOLD);
|
||||
settings->display_threshold =
|
||||
(int)gnc_gconf_get_float(GCONF_IMPORT_SECTION, "match_threshold", NULL);
|
||||
(int)gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_MATCH_THRESHOLD);
|
||||
|
||||
settings->fuzzy_amount =
|
||||
gnc_gconf_get_float(GCONF_IMPORT_SECTION, "atm_fee_threshold", NULL);
|
||||
gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_ATM_FEE_THRESHOLD);
|
||||
|
||||
settings->match_date_hardlimit = 42; /* 6 weeks */
|
||||
return settings;
|
||||
|
@ -26,12 +26,15 @@
|
||||
#define IMPORT_UTILITIES_H
|
||||
|
||||
|
||||
/** The GConf section of the importer */
|
||||
#define GCONF_IMPORT_SECTION "dialogs/import/generic_matcher"
|
||||
#define GNC_PREFS_GROUP_IMPORT "dialogs.import.generic"
|
||||
#define GNC_PREF_ENABLE_SKIP "enable_skip"
|
||||
#define GNC_PREF_ENABLE_UPDATE "enable_update"
|
||||
#define GNC_PREF_USE_BAYES "use_bayes"
|
||||
/** The preferences used by the importer */
|
||||
#define GNC_PREFS_GROUP_IMPORT "dialogs.import.generic"
|
||||
#define GNC_PREF_ENABLE_SKIP "enable_skip"
|
||||
#define GNC_PREF_ENABLE_UPDATE "enable_update"
|
||||
#define GNC_PREF_USE_BAYES "use_bayes"
|
||||
#define GNC_PREF_ATM_FEE_THRESHOLD "atm_fee_threshold"
|
||||
#define GNC_PREF_AUTO_CLEAR_THRESHOLD "auto_clear_threshold"
|
||||
#define GNC_PREF_AUTO_ADD_THRESHOLD "auto_add_threshold"
|
||||
#define GNC_PREF_MATCH_THRESHOLD "match_threshold"
|
||||
|
||||
|
||||
#include "Account.h"
|
||||
|
@ -48,6 +48,7 @@
|
||||
#define REGISTER_TEMPLATE_CM_CLASS "register-template"
|
||||
|
||||
#define GNC_PREF_DOUBLE_LINE_MODE "double_line_mode"
|
||||
#define GNC_PREF_MAX_TRANS "max_transactions"
|
||||
|
||||
|
||||
struct gnc_ledger_display
|
||||
@ -776,7 +777,7 @@ gnc_ledger_display_internal (Account *lead_account, Query *q,
|
||||
ld->get_parent = NULL;
|
||||
ld->user_data = NULL;
|
||||
|
||||
limit = gnc_gconf_get_float(GCONF_GENERAL_REGISTER, "max_transactions", NULL);
|
||||
limit = gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_MAX_TRANS);
|
||||
|
||||
/* set up the query filter */
|
||||
if (q)
|
||||
|
@ -52,6 +52,7 @@
|
||||
#define REGISTER_TEMPLATE_CM_CLASS "register-template"
|
||||
|
||||
#define GNC_PREF_DOUBLE_LINE_MODE "double_line_mode"
|
||||
#define GNC_PREF_MAX_TRANS "max_transactions"
|
||||
|
||||
|
||||
struct gnc_ledger_display2
|
||||
@ -795,7 +796,7 @@ gnc_ledger_display2_internal (Account *lead_account, Query *q,
|
||||
ld->get_parent = NULL;
|
||||
ld->user_data = NULL;
|
||||
|
||||
limit = gnc_gconf_get_float(GCONF_GENERAL_REGISTER, "max_transactions", NULL);
|
||||
limit = gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_MAX_TRANS);
|
||||
|
||||
/* set up the query filter */
|
||||
if (q)
|
||||
|
Loading…
Reference in New Issue
Block a user