r23229 - gnucash/trunk/src - Gnc-Prefs: migrate search dialog and saved window geometry preferences
Geert Janssens
gjanssens at code.gnucash.org
Mon Oct 7 10:09:17 EDT 2013
Author: gjanssens
Date: 2013-10-07 10:09:14 -0400 (Mon, 07 Oct 2013)
New Revision: 23229
Trac: http://svn.gnucash.org/trac/changeset/23229
Modified:
gnucash/trunk/src/business/business-gnome/dialog-billterms.c
gnucash/trunk/src/business/business-gnome/dialog-customer.c
gnucash/trunk/src/business/business-gnome/dialog-employee.c
gnucash/trunk/src/business/business-gnome/dialog-invoice.c
gnucash/trunk/src/business/business-gnome/dialog-job.c
gnucash/trunk/src/business/business-gnome/dialog-order.c
gnucash/trunk/src/business/business-gnome/dialog-vendor.c
gnucash/trunk/src/business/business-gnome/gschemas/org.gnucash.dialogs.business.gschema.xml.in
gnucash/trunk/src/core-utils/Makefile.am
gnucash/trunk/src/gnome-search/dialog-search.c
gnucash/trunk/src/gnome-search/dialog-search.h
gnucash/trunk/src/gnome-utils/dialog-account.c
gnucash/trunk/src/gnome-utils/dialog-preferences.c
gnucash/trunk/src/gnome-utils/dialog-reset-warnings.c
gnucash/trunk/src/gnome-utils/dialog-tax-table.c
gnucash/trunk/src/gnome-utils/dialog-totd.c
gnucash/trunk/src/gnome-utils/dialog-transfer.c
gnucash/trunk/src/gnome-utils/dialog-utils.c
gnucash/trunk/src/gnome/assistant-hierarchy.c
gnucash/trunk/src/gnome/dialog-commodities.c
gnucash/trunk/src/gnome/dialog-fincalc.c
gnucash/trunk/src/gnome/dialog-find-transactions.c
gnucash/trunk/src/gnome/dialog-find-transactions2.c
gnucash/trunk/src/gnome/dialog-lot-viewer.c
gnucash/trunk/src/gnome/dialog-price-edit-db.c
gnucash/trunk/src/gnome/dialog-price-editor.c
gnucash/trunk/src/gnome/dialog-print-check.c
gnucash/trunk/src/gnome/dialog-sx-editor.c
gnucash/trunk/src/gnome/dialog-sx-editor.h
gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
gnucash/trunk/src/gnome/dialog-tax-info.c
gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in
gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.reconcile.gschema.xml.in
gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.sxs.gschema.xml.in
gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.totd.gschema.xml.in
gnucash/trunk/src/gnome/reconcile-view.h
gnucash/trunk/src/gnome/window-reconcile.c
gnucash/trunk/src/gnome/window-reconcile2.c
gnucash/trunk/src/import-export/aqbanking/assistant-ab-initial.c
gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c
gnucash/trunk/src/import-export/aqbanking/gschemas/org.gnucash.dialogs.import.hbci.gschema.xml.in
gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c
gnucash/trunk/src/import-export/csv-export/gschemas/org.gnucash.dialogs.export.csv.gschema.xml.in
gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c
gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c
gnucash/trunk/src/import-export/csv-import/gschemas/org.gnucash.dialogs.import.csv.gschema.xml.in
gnucash/trunk/src/import-export/gschemas/org.gnucash.dialogs.import.generic.gschema.xml.in
gnucash/trunk/src/import-export/import-main-matcher.c
gnucash/trunk/src/import-export/import-match-picker.c
gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c
gnucash/trunk/src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in
Log:
Gnc-Prefs: migrate search dialog and saved window geometry preferences
Note: the saved window geometry options (position and size) are
converted into a type that is incompatible with gconf. This has two
consequences:
1. while testing the gconf backend is used by gsettings. The
incompatible option (last_geometry) won't be saved in gconf. You will
see an error because of this. It does work when switching to gsettings'
native backend
2. The old geometry data won't be converted at user migration time (ie
when the user starts gnucash-with-gsettings for the first time. I don't
think this is very dramatical. The next time a dialog is used, the last
saved position is saved again already automatically.
Modified: gnucash/trunk/src/business/business-gnome/dialog-billterms.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-billterms.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/business/business-gnome/dialog-billterms.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -31,7 +31,6 @@
#include "gnc-component-manager.h"
#include "gnc-ui.h"
#include "gnc-gui-query.h"
-#include "gnc-gconf-utils.h"
#include "gnc-ui-util.h"
#include "qof.h"
Modified: gnucash/trunk/src/business/business-gnome/dialog-customer.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-customer.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/business/business-gnome/dialog-customer.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -55,7 +55,7 @@
#define DIALOG_NEW_CUSTOMER_CM_CLASS "dialog-new-customer"
#define DIALOG_EDIT_CUSTOMER_CM_CLASS "dialog-edit-customer"
-#define GCONF_SECTION_SEARCH "dialogs/business/customer_search"
+#define GNC_PREFS_GROUP_SEARCH "dialogs.business.customer_search"
void gnc_customer_taxtable_check_cb (GtkToggleButton *togglebutton,
gpointer user_data);
@@ -957,7 +957,7 @@
return gnc_search_dialog_create (type, _("Find Customer"),
params, columns, q, q2, buttons, NULL,
new_customer_cb, sw, free_userdata_cb,
- GCONF_SECTION_SEARCH, NULL);
+ GNC_PREFS_GROUP_SEARCH, NULL);
}
GNCSearchWindow *
Modified: gnucash/trunk/src/business/business-gnome/dialog-employee.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-employee.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/business/business-gnome/dialog-employee.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -50,7 +50,7 @@
#define DIALOG_NEW_EMPLOYEE_CM_CLASS "dialog-new-employee"
#define DIALOG_EDIT_EMPLOYEE_CM_CLASS "dialog-edit-employee"
-#define GCONF_SECTION_SEARCH "dialogs/business/employee_search"
+#define GNC_PREFS_GROUP_SEARCH "dialogs.business.employee_search"
void gnc_employee_window_ok_cb (GtkWidget *widget, gpointer data);
void gnc_employee_window_cancel_cb (GtkWidget *widget, gpointer data);
@@ -759,7 +759,7 @@
params, columns, q, q2,
buttons, NULL, new_employee_cb,
sw, free_employee_cb,
- GCONF_SECTION_SEARCH, NULL);
+ GNC_PREFS_GROUP_SEARCH, NULL);
}
GNCSearchWindow *
Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -85,7 +85,7 @@
#define DIALOG_NEW_INVOICE_CM_CLASS "dialog-new-invoice"
#define DIALOG_VIEW_INVOICE_CM_CLASS "dialog-view-invoice"
-#define GCONF_SECTION_SEARCH "dialogs/business/invoice_search"
+#define GNC_PREFS_GROUP_SEARCH "dialogs.business.invoice_search"
#define LAST_POSTED_TO_ACCT "last-posted-to-acct"
@@ -3109,7 +3109,7 @@
}
return gnc_search_dialog_create (type, title, params, columns, q, q2,
buttons, NULL, new_invoice_cb,
- sw, free_invoice_cb, GCONF_SECTION_SEARCH,
+ sw, free_invoice_cb, GNC_PREFS_GROUP_SEARCH,
label);
}
Modified: gnucash/trunk/src/business/business-gnome/dialog-job.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-job.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/business/business-gnome/dialog-job.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -46,7 +46,7 @@
#define DIALOG_NEW_JOB_CM_CLASS "dialog-new-job"
#define DIALOG_EDIT_JOB_CM_CLASS "dialog-edit-job"
-#define GCONF_SECTION_SEARCH "dialogs/business/job_search"
+#define GNC_PREFS_GROUP_SEARCH "dialogs.business.job_search"
void gnc_job_window_ok_cb (GtkWidget *widget, gpointer data);
void gnc_job_window_cancel_cb (GtkWidget *widget, gpointer data);
@@ -628,7 +628,7 @@
return gnc_search_dialog_create (type, _("Find Job"),
params, columns, q, q2, buttons, NULL,
new_job_cb, sw, free_userdata_cb,
- GCONF_SECTION_SEARCH, NULL);
+ GNC_PREFS_GROUP_SEARCH, NULL);
}
/* Functions for widgets for job selection */
Modified: gnucash/trunk/src/business/business-gnome/dialog-order.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-order.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/business/business-gnome/dialog-order.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -52,7 +52,7 @@
#define DIALOG_EDIT_ORDER_CM_CLASS "dialog-edit-order"
#define DIALOG_VIEW_ORDER_CM_CLASS "dialog-view-order"
-#define GCONF_SECTION_SEARCH "dialogs/business/order_search"
+#define GNC_PREFS_GROUP_SEARCH "dialogs.business.order_search"
void gnc_order_window_ok_cb (GtkWidget *widget, gpointer data);
void gnc_order_window_cancel_cb (GtkWidget *widget, gpointer data);
@@ -946,7 +946,7 @@
return gnc_search_dialog_create (type, _("Find Order"),
params, columns, q, q2,
buttons, NULL, new_order_cb,
- sw, free_order_cb, GCONF_SECTION_SEARCH,
+ sw, free_order_cb, GNC_PREFS_GROUP_SEARCH,
NULL);
}
Modified: gnucash/trunk/src/business/business-gnome/dialog-vendor.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-vendor.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/business/business-gnome/dialog-vendor.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -50,7 +50,7 @@
#define DIALOG_NEW_VENDOR_CM_CLASS "dialog-new-vendor"
#define DIALOG_EDIT_VENDOR_CM_CLASS "dialog-edit-vendor"
-#define GCONF_SECTION_SEARCH "dialogs/business/vendor_search"
+#define GNC_PREFS_GROUP_SEARCH "dialogs.business.vendor_search"
void gnc_vendor_taxtable_check_cb (GtkToggleButton *togglebutton, gpointer user_data);
void gnc_vendor_window_ok_cb (GtkWidget *widget, gpointer data);
@@ -759,7 +759,7 @@
return gnc_search_dialog_create (type, _("Find Vendor"),
params, columns, q, q2, buttons, NULL,
new_vendor_cb, sw, free_vendor_cb,
- GCONF_SECTION_SEARCH, NULL);
+ GNC_PREFS_GROUP_SEARCH, NULL);
}
GNCSearchWindow *
Modified: gnucash/trunk/src/business/business-gnome/gschemas/org.gnucash.dialogs.business.gschema.xml.in
===================================================================
--- gnucash/trunk/src/business/business-gnome/gschemas/org.gnucash.dialogs.business.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/business/business-gnome/gschemas/org.gnucash.dialogs.business.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -1,16 +1,106 @@
<schemalist gettext-domain="GETTEXT_PACKAGE">
<schema id="org.gnucash.dialogs.business" path="/apps/gnucash/dialogs/business/">
<child name="customer_search" schema="org.gnucash.dialogs.business.customer_search"/>
+ <child name="employee_search" schema="org.gnucash.dialogs.business.employee_search"/>
+ <child name="invoice_search" schema="org.gnucash.dialogs.business.invoice_search"/>
+ <child name="job_search" schema="org.gnucash.dialogs.business.job_search"/>
+ <child name="order_search" schema="org.gnucash.dialogs.business.order_search"/>
+ <child name="vendor_search" schema="org.gnucash.dialogs.business.vendor_search"/>
<child name="invoice" schema="org.gnucash.dialogs.business.invoice"/>
<child name="bill" schema="org.gnucash.dialogs.business.bill"/>
+ <child name="tax_tables" schema="org.gnucash.dialogs.business.tax_tables"/>
</schema>
+
<schema id="org.gnucash.dialogs.business.customer_search" path="/apps/gnucash/dialogs/business/customer_search/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
<key name="search_for_active_only" type="b">
<default>false</default>
<summary>Search only in active items</summary>
<description>If active, only the 'active' items in the current class will be searched. Otherwise all items in the current class will be searched.</description>
</key>
</schema>
+
+ <schema id="org.gnucash.dialogs.business.employee_search" path="/apps/gnucash/dialogs/business/employee_search/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ <key name="search_for_active_only" type="b">
+ <default>false</default>
+ <summary>Search only in active items</summary>
+ <description>If active, only the 'active' items in the current class will be searched. Otherwise all items in the current class will be searched.</description>
+ </key>
+ </schema>
+
+ <schema id="org.gnucash.dialogs.business.invoice_search" path="/apps/gnucash/dialogs/business/invoice_search/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ <key name="search_for_active_only" type="b">
+ <default>false</default>
+ <summary>Search only in active items</summary>
+ <description>If active, only the 'active' items in the current class will be searched. Otherwise all items in the current class will be searched.</description>
+ </key>
+ </schema>
+
+ <schema id="org.gnucash.dialogs.business.job_search" path="/apps/gnucash/dialogs/business/job_search/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ <key name="search_for_active_only" type="b">
+ <default>false</default>
+ <summary>Search only in active items</summary>
+ <description>If active, only the 'active' items in the current class will be searched. Otherwise all items in the current class will be searched.</description>
+ </key>
+ </schema>
+
+ <schema id="org.gnucash.dialogs.business.order_search" path="/apps/gnucash/dialogs/business/order_search/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ <key name="search_for_active_only" type="b">
+ <default>false</default>
+ <summary>Search only in active items</summary>
+ <description>If active, only the 'active' items in the current class will be searched. Otherwise all items in the current class will be searched.</description>
+ </key>
+ </schema>
+
+ <schema id="org.gnucash.dialogs.business.vendor_search" path="/apps/gnucash/dialogs/business/vendor_search/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ <key name="search_for_active_only" type="b">
+ <default>false</default>
+ <summary>Search only in active items</summary>
+ <description>If active, only the 'active' items in the current class will be searched. Otherwise all items in the current class will be searched.</description>
+ </key>
+ </schema>
+
<schema id="org.gnucash.dialogs.business.invoice" path="/apps/gnucash/dialogs/business/invoice/">
<key name="tax_included" type="b">
<default>true</default>
@@ -55,4 +145,14 @@
<description>This field defines the number of days in advance that GnuCash will check for due bills. Its value is only used if the "Notify when due" setting is active.</description>
</key>
</schema>
+
+ <schema id="org.gnucash.dialogs.business.tax_tables" path="/apps/gnucash/dialogs/business/tax_tables/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ </schema>
</schemalist>
Modified: gnucash/trunk/src/core-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/core-utils/Makefile.am 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/core-utils/Makefile.am 2013-10-07 14:09:14 UTC (rev 23229)
@@ -80,7 +80,6 @@
libgnc_core_utils_python_la_CPPFLAGS = \
${GLIB_CFLAGS} \
- ${GCONF_CFLAGS} \
${GTK_MAC_CFLAGS} \
${QOF_CFLAGS} \
${PYTHON_CPPFLAGS} \
Modified: gnucash/trunk/src/gnome/assistant-hierarchy.c
===================================================================
--- gnucash/trunk/src/gnome/assistant-hierarchy.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/assistant-hierarchy.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -56,7 +56,8 @@
#include "gnc-engine.h"
static QofLogModule log_module = GNC_MOD_IMPORT;
-#define GCONF_SECTION "dialogs/new_hierarchy"
+#define GNC_PREFS_GROUP "dialogs.new_hierarchy"
+#define GNC_PREF_SHOW_ON_NEW_FILE "show_on_new_file"
typedef enum
{
@@ -118,7 +119,7 @@
static void
delete_hierarchy_dialog (hierarchy_data *data)
{
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(data->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(data->dialog));
gtk_widget_destroy (data->dialog);
}
@@ -1132,7 +1133,7 @@
data->balance_hash = g_hash_table_new(NULL, NULL);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(data->dialog));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW(data->dialog));
g_signal_connect (G_OBJECT(dialog), "destroy",
G_CALLBACK (gnc_hierarchy_destroy_cb), data);
Modified: gnucash/trunk/src/gnome/dialog-commodities.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-commodities.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-commodities.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -42,6 +42,7 @@
#define DIALOG_COMMODITIES_CM_CLASS "dialog-commodities"
#define GCONF_SECTION "dialogs/edit_commodities"
+#define GNC_PREFS_GROUP "dialogs.edit_commodities"
/* This static indicates the debugging module that this .o belongs to. */
/* static short module = MOD_GUI; */
@@ -356,7 +357,7 @@
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), cd->show_currencies);
g_object_unref(G_OBJECT(builder));
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(cd->dialog));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW(cd->dialog));
}
static void
@@ -364,7 +365,7 @@
{
CommoditiesDialog *cd = user_data;
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(cd->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(cd->dialog));
gnc_gconf_set_bool(GCONF_SECTION, "include_iso", cd->show_currencies, NULL);
Modified: gnucash/trunk/src/gnome/dialog-fincalc.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-fincalc.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-fincalc.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -42,7 +42,7 @@
#define DIALOG_FINCALC_CM_CLASS "dialog-fincalc"
-#define GCONF_SECTION "dialogs/fincalc"
+#define GNC_PREFS_GROUP "dialogs.fincalc"
typedef enum
{
@@ -463,7 +463,7 @@
/* Fall through */
case GTK_RESPONSE_CLOSE:
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog));
break;
default:
@@ -669,7 +669,7 @@
gtk_builder_connect_signals(builder, fcd);
g_object_unref(G_OBJECT(builder));
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(fcd->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(fcd->dialog));
gtk_widget_show(fcd->dialog);
}
Modified: gnucash/trunk/src/gnome/dialog-find-transactions.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-find-transactions.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-find-transactions.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -36,7 +36,7 @@
#include "gnc-plugin-page-register.h"
#include "search-param.h"
-#define GCONF_SECTION "dialogs/find"
+#define GNC_PREFS_GROUP_SEARCH "dialogs.find"
struct _ftd_data
{
@@ -203,7 +203,7 @@
ftd->sw = gnc_search_dialog_create (type, _("Find Transaction"),
params, NULL, start_q, show_q,
NULL, do_find_cb, NULL,
- ftd, free_ftd_cb, GCONF_SECTION, NULL);
+ ftd, free_ftd_cb, GNC_PREFS_GROUP_SEARCH, NULL);
if (!ftd->sw)
{
Modified: gnucash/trunk/src/gnome/dialog-find-transactions2.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-find-transactions2.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-find-transactions2.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -36,7 +36,7 @@
#include "gnc-plugin-page-register2.h"
#include "search-param.h"
-#define GCONF_SECTION "dialogs/find"
+#define GNC_PREFS_GROUP_SEARCH "dialogs.find"
struct _ftd_data
{
@@ -204,7 +204,7 @@
ftd->sw = gnc_search_dialog_create (type, _("Find Transaction"),
params, NULL, start_q, show_q,
NULL, do_find_cb, NULL,
- ftd, free_ftd_cb, GCONF_SECTION, NULL);
+ ftd, free_ftd_cb, GNC_PREFS_GROUP_SEARCH, NULL);
if (!ftd->sw)
{
Modified: gnucash/trunk/src/gnome/dialog-lot-viewer.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-lot-viewer.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-lot-viewer.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -83,6 +83,7 @@
#define RESPONSE_NEW_LOT 5
#define GCONF_SECTION "dialogs/lot_viewer"
+#define GNC_PREFS_GROUP "dialogs.lot_viewer"
#define GCONF_KEY_HPOSITION "hpane_position"
#define GCONF_KEY_VPOSITION "vpane_position"
@@ -613,7 +614,7 @@
lv_save_current_lot (lv);
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(lv->window));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(lv->window));
gtk_widget_destroy (lv->window);
}
@@ -1017,7 +1018,7 @@
lv_update_split_buttons(lv);
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(lv->window));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(lv->window));
}
/* ======================================================================== */
Modified: gnucash/trunk/src/gnome/dialog-price-edit-db.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-price-edit-db.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-price-edit-db.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -52,6 +52,7 @@
#define DIALOG_PRICE_DB_CM_CLASS "dialog-price-edit-db"
#define GCONF_SECTION "dialogs/edit_prices"
+#define GNC_PREFS_GROUP "dialogs.edit_prices"
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUI;
@@ -482,7 +483,7 @@
g_object_unref(G_OBJECT(builder));
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(pdb_dialog->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(pdb_dialog->dialog));
LEAVE(" ");
}
@@ -493,7 +494,7 @@
PricesDialog *pdb_dialog = user_data;
ENTER(" ");
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(pdb_dialog->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(pdb_dialog->dialog));
gtk_widget_destroy (GTK_WIDGET (pdb_dialog->dialog));
LEAVE(" ");
Modified: gnucash/trunk/src/gnome/dialog-price-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-price-editor.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-price-editor.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -49,7 +49,7 @@
#define DIALOG_PRICE_EDIT_CM_CLASS "dialog-price-edit"
-#define GCONF_SECTION "dialogs/price_editor"
+#define GNC_PREFS_GROUP "dialogs.price_editor"
#define DIALOG_PRICE_EDIT_SOURCE "user:price-editor"
@@ -304,7 +304,7 @@
}
else
{
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(pedit_dialog->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(pedit_dialog->dialog));
gtk_widget_destroy (GTK_WIDGET (pedit_dialog->dialog));
pedit_dialog_destroy_cb (NULL, pedit_dialog);
}
@@ -542,7 +542,7 @@
pedit_dialog = g_new0 (PriceEditDialog, 1);
gnc_price_pedit_dialog_create (parent, pedit_dialog, session);
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(pedit_dialog->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(pedit_dialog->dialog));
pedit_dialog->type = type;
switch (type)
Modified: gnucash/trunk/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-print-check.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -64,7 +64,8 @@
*/
G_GNUC_UNUSED static QofLogModule log_module = "gnc.printing.checks";
-#define GCONF_SECTION "dialogs/print_checks"
+#define GCONF_SECTION "dialogs/print_checks"
+#define GNC_PREFS_GROUP "dialogs.print_checks"
#define KEY_CHECK_FORMAT_GUID "check_format_guid"
#define KEY_CHECK_FORMAT "check_format"
#define KEY_CHECK_POSITION "check_position"
@@ -1764,7 +1765,7 @@
gtk_widget_destroy(GTK_WIDGET(gtk_builder_get_object (builder, "lower_left")));
gnc_ui_print_restore_dialog(pcd);
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(pcd->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(pcd->dialog));
g_object_unref(G_OBJECT(builder));
gtk_widget_show_all(pcd->dialog);
@@ -2674,11 +2675,11 @@
case GTK_RESPONSE_OK:
gnc_ui_print_check_dialog_ok_cb(pcd);
gnc_ui_print_save_dialog(pcd);
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog));
break;
case GTK_RESPONSE_CANCEL:
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog));
break;
}
Modified: gnucash/trunk/src/gnome/dialog-sx-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-sx-editor.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -1237,7 +1237,7 @@
/* Allow resize */
gtk_window_set_resizable (GTK_WINDOW(sxed->dialog), TRUE);
- gnc_restore_window_size(SXED_GCONF_SECTION, GTK_WINDOW(sxed->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP_SXED, GTK_WINDOW(sxed->dialog));
/* create the frequency-selection widget and example [dense-]calendar. */
schedXact_editor_create_freq_sel( sxed );
@@ -1271,7 +1271,7 @@
void
gnc_sxed_record_size( GncSxEditorDialog *sxed )
{
- gnc_save_window_size( SXED_GCONF_SECTION, GTK_WINDOW(sxed->dialog) );
+ gnc_save_window_size( GNC_PREFS_GROUP_SXED, GTK_WINDOW(sxed->dialog) );
}
Modified: gnucash/trunk/src/gnome/dialog-sx-editor.h
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor.h 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-sx-editor.h 2013-10-07 14:09:14 UTC (rev 23229)
@@ -33,6 +33,7 @@
#define KEY_NOTIFY "notify"
#define KEY_CREATE_DAYS "create_days"
#define KEY_REMIND_DAYS "remind_days"
+#define GNC_PREFS_GROUP_SXED "dialogs.sxs.transaction_editor"
typedef struct _GncSxEditorDialog GncSxEditorDialog;
Modified: gnucash/trunk/src/gnome/dialog-sx-since-last-run.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-since-last-run.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-sx-since-last-run.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -61,6 +61,7 @@
#define DIALOG_SX_SINCE_LAST_RUN_CM_CLASS "dialog-sx-since-last-run"
#define GCONF_SECTION "dialogs/scheduled_trans/since_last_run"
+#define GNC_PREFS_GROUP "dialogs.sxs.since_last_run"
struct _GncSxSinceLastRunDialog
{
@@ -987,7 +988,7 @@
g_signal_connect(G_OBJECT(dialog->dialog), "response", G_CALLBACK(dialog_response_cb), dialog);
g_signal_connect(G_OBJECT(dialog->dialog), "destroy", G_CALLBACK(dialog_destroy_cb), dialog);
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(dialog->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog->dialog));
dialog->component_id = gnc_register_gui_component
(DIALOG_SX_SINCE_LAST_RUN_CM_CLASS, NULL, close_handler, dialog);
@@ -1038,7 +1039,7 @@
{
GncSxSinceLastRunDialog *app_dialog = user_data;
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(app_dialog->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(app_dialog->dialog));
gtk_widget_destroy(app_dialog->dialog);
}
Modified: gnucash/trunk/src/gnome/dialog-tax-info.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-tax-info.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/dialog-tax-info.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -46,6 +46,7 @@
#define DIALOG_TAX_INFO_CM_CLASS "dialog-tax-info"
#define GCONF_SECTION "dialogs/tax_info"
#define PANED_POSITION "paned_position"
+#define GNC_PREFS_GROUP "dialogs.tax_info"
enum
{
@@ -1457,7 +1458,7 @@
clear_gui (ti_dialog);
gnc_tax_info_set_changed (ti_dialog, FALSE);
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(ti_dialog->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(ti_dialog->dialog));
ti_dialog->paned = GTK_WIDGET(gtk_builder_get_object (builder, "paned"));
@@ -1480,7 +1481,7 @@
gtk_paned_get_position(GTK_PANED(ti_dialog->paned)), NULL);
}
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(ti_dialog->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(ti_dialog->dialog));
gtk_widget_destroy (ti_dialog->dialog);
}
Modified: gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in
===================================================================
--- gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -9,169 +9,122 @@
<child name="reset_warnings" schema="org.gnucash.dialogs.reset_warnings"/>
<child name="tax_info" schema="org.gnucash.dialogs.tax_info"/>
<child name="tip_of_the_day" schema="org.gnucash.dialogs.tip_of_the_day"/>
- <child name="window_reconcile" schema="org.gnucash.dialogs.window_reconcile"/>
+ <child name="fincalc" schema="org.gnucash.dialogs.fincalc"/>
<child name="find" schema="org.gnucash.dialogs.find"/>
<child name="export_accounts" schema="org.gnucash.dialogs.export_accounts"/>
<child name="log_replay" schema="org.gnucash.dialogs.log_replay"/>
<child name="open_save" schema="org.gnucash.dialogs.open_save"/>
<child name="report" schema="org.gnucash.dialogs.report"/>
+ <child name="lot_viewer" schema="org.gnucash.dialogs.lot_viewer"/>
<child name="new_user" schema="org.gnucash.dialogs.new_user"/>
<child name="new_hierarchy" schema="org.gnucash.dialogs.new_hierarchy"/>
<child name="search" schema="org.gnucash.dialogs.search"/>
+ <child name="transfer" schema="org.gnucash.dialogs.transfer"/>
</schema>
- <!-- keys to store window geometry (postition and size).
- This still has to be added for several dialogs, but perhaps in other schema files:
- - business/bill
- - business/customer_search
- - business/employee_search
- - business/invoice
- - business/invoice_search
- - business/job_search
- - business/order_search
- - business/vendor_search
- - business/voucher
- - export/csv
- - import/csv
- - import/generic_matcher/match_picker
- - import/generic_matcher/transaction_list
- - import/hbci/connection_dialog
- - scheduled_trans/since_last_run
- - scheduled_trans/transaction_editor
- - scheduled_trans/transaction_list -->
<schema id="org.gnucash.dialogs.account" path="/apps/gnucash/dialogs/account/">
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
<schema id="org.gnucash.dialogs.edit_prices" path="/apps/gnucash/dialogs/edit_prices/">
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
<schema id="org.gnucash.dialogs.preferences" path="/apps/gnucash/dialogs/preferences/">
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
<schema id="org.gnucash.dialogs.price_editor" path="/apps/gnucash/dialogs/price_editor/">
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
<schema id="org.gnucash.dialogs.print_checks" path="/apps/gnucash/dialogs/print_checks/">
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
<schema id="org.gnucash.dialogs.reset_warnings" path="/apps/gnucash/dialogs/reset_warnings/">
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
<schema id="org.gnucash.dialogs.tax_info" path="/apps/gnucash/dialogs/tax_info/">
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
<schema id="org.gnucash.dialogs.tip_of_the_day" path="/apps/gnucash/dialogs/tip_of_the_day/">
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
- <schema id="org.gnucash.dialogs.window_reconcile" path="/apps/gnucash/dialogs/window_reconcile/">
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ <schema id="org.gnucash.dialogs.fincalc" path="/apps/gnucash/dialogs/fincalc/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
<schema id="org.gnucash.dialogs.find" path="/apps/gnucash/dialogs/find/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
<key name="search_for_active_only" type="b">
<default>false</default>
<summary>Search only in active items</summary>
<description>This setting indicates whether to search in all items in the current class, or only in 'active' items in the current class.</description>
</key>
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
- </key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
<schema id="org.gnucash.dialogs.export_accounts" path="/apps/gnucash/dialogs/export_accounts/">
@@ -207,6 +160,13 @@
</schema>
<schema id="org.gnucash.dialogs.edit_commodities" path="/apps/gnucash/dialogs/edit_commodities/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
<key name="sort_column" type="as">
<default>[]</default>
<summary>Columns used for sorting</summary>
@@ -217,17 +177,18 @@
<summary>Sort column ascending or descending</summary>
<description>This setting indicates how the key column is sorted. Possible values for this setting are 'ascending' and 'descending'.</description>
</key>
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
+ </schema>
+
+ <schema id="org.gnucash.dialogs.lot_viewer" path="/apps/gnucash/dialogs/lot_viewer/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
+
<schema id="org.gnucash.dialogs.new_user" path="/apps/gnucash/dialogs/new_user/">
<key name="first_startup" type="b">
<default>true</default>
@@ -235,23 +196,22 @@
<description>If active, the new user window will be shown. Otherwise it will not be shown.</description>
</key>
</schema>
+
<schema id="org.gnucash.dialogs.new_hierarchy" path="/apps/gnucash/dialogs/new_hierarchy/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
<key name="show_on_new_file" type="b">
<default>true</default>
<summary>New hierarchy window on "New File"</summary>
<description>If active, the "New Hierarchy" window will be shown whenever the "New File" menu item is chosen. Otherwise it will not be shown.</description>
</key>
- <key name="window_position" type="ai">
- <default>[]</default>
- <summary>Window position</summary>
- <description>This setting describes the last position of the window. The numbers are the X and Y coordinates of the top left corner of the window.</description>
- </key>
- <key name="window_geometry" type="ai">
- <default>[]</default>
- <summary>Window size</summary>
- <description>This setting describes the size of the window when it was last closed. The numbers are the width and height of the window.</description>
- </key>
</schema>
+
<schema id="org.gnucash.dialogs.search" path="/apps/gnucash/dialogs/search/">
<key name="new_search_limit" type="d">
<default>1.0</default>
@@ -259,4 +219,14 @@
<description>Default to 'new search' if fewer than this number of items is returned</description>
</key>
</schema>
+
+ <schema id="org.gnucash.dialogs.transfer" path="/apps/gnucash/dialogs/transfer/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ </schema>
</schemalist>
Modified: gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.reconcile.gschema.xml.in
===================================================================
--- gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.reconcile.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.reconcile.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -20,5 +20,12 @@
<summary>Always reconcile to today</summary>
<description>If active, always open the reconcile dialog using today's date for the statement date, regardless of previous reconciliations.</description>
</key>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
</schema>
</schemalist>
Modified: gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.sxs.gschema.xml.in
===================================================================
--- gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.sxs.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.sxs.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -3,13 +3,22 @@
<child name="since_last_run" schema="org.gnucash.dialogs.sxs.since_last_run"/>
<child name="transaction_editor" schema="org.gnucash.dialogs.sxs.transaction_editor"/>
</schema>
+
<schema id="org.gnucash.dialogs.sxs.since_last_run" path="/apps/gnucash/dialogs/scheduled_trans/since_last_run/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
<key name="show_at_file_open" type="b">
<default>true</default>
<summary>Show "since last run" dialog when a file is opened.</summary>
<description>This setting controls whether the scheduled transactions "since last run" dialog is shown automatically when a data file is opened. This includes the initial opening of the data file when GnuCash starts. If this setting is active, show the dialog, otherwise it is not shown.</description>
</key>
</schema>
+
<schema id="org.gnucash.dialogs.sxs.transaction_editor" path="/apps/gnucash/dialogs/scheduled_trans/transaction_editor/">
<key name="create_auto" type="b">
<default>false</default>
@@ -21,6 +30,13 @@
<summary>How many days in advance to notify the user.</summary>
<description>How many days in advance to notify the user.</description>
</key>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
<key name="notify" type="b">
<default>true</default>
<summary>Set the "notify" flag by default</summary>
Modified: gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.totd.gschema.xml.in
===================================================================
--- gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.totd.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.totd.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -1,14 +1,21 @@
<schemalist gettext-domain="GETTEXT_PACKAGE">
<schema id="org.gnucash.dialogs.totd" path="/apps/gnucash/dialogs/tip_of_the_day/">
+ <key name="current_tip" type="i">
+ <default>0</default>
+ <summary>The next tip to show.</summary>
+ <description>The next tip to show.</description>
+ </key>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
<key name="show_at_startup" type="b">
<default>true</default>
<summary>Show "Tip Of The Day" at GnuCash start</summary>
<description>Enables the "Tip Of The Day" when GnuCash starts up. If active, the dialog will be shown. Otherwise it will not be shown.</description>
</key>
- <key name="current_tip" type="i">
- <default>0</default>
- <summary>The next tip to show.</summary>
- <description>The next tip to show.</description>
- </key>
</schema>
</schemalist>
Modified: gnucash/trunk/src/gnome/reconcile-view.h
===================================================================
--- gnucash/trunk/src/gnome/reconcile-view.h 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/reconcile-view.h 2013-10-07 14:09:14 UTC (rev 23229)
@@ -69,6 +69,7 @@
} GNCReconcileViewClass;
#define GCONF_RECONCILE_SECTION "dialogs/reconcile"
+#define GNC_PREFS_GROUP_RECONCILE "dialogs.reconcile"
/***********************************************************
* public functions *
Modified: gnucash/trunk/src/gnome/window-reconcile.c
===================================================================
--- gnucash/trunk/src/gnome/window-reconcile.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/window-reconcile.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -52,13 +52,13 @@
#include "gnc-gnome-utils.h"
#include "gnc-main-window.h"
#include "gnc-plugin-page-register.h"
+#include "gnc-prefs.h"
#include "gnc-ui.h"
#include "gnc-ui-balances.h"
#include "guile-util.h"
#include "reconcile-view.h"
#include "window-reconcile.h"
-#define GCONF_SECTION "dialogs/window-reconcile"
#define WINDOW_RECONCILE_CM_CLASS "window-reconcile"
@@ -1613,7 +1613,7 @@
{
RecnWindow *recnData = user_data;
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(recnData->window));
+ gnc_save_window_size(GNC_PREFS_GROUP_RECONCILE, GTK_WINDOW(recnData->window));
gtk_widget_destroy (recnData->window);
}
@@ -1801,7 +1801,7 @@
/* Force a reasonable starting size */
gtk_window_set_default_size(GTK_WINDOW(recnData->window), 800, 600);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(recnData->window));
+ gnc_restore_window_size (GNC_PREFS_GROUP_RECONCILE, GTK_WINDOW(recnData->window));
gtk_container_add(GTK_CONTAINER(frame), main_area);
gtk_container_set_border_width(GTK_CONTAINER(main_area), 10);
Modified: gnucash/trunk/src/gnome/window-reconcile2.c
===================================================================
--- gnucash/trunk/src/gnome/window-reconcile2.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome/window-reconcile2.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -52,13 +52,13 @@
#include "gnc-gnome-utils.h"
#include "gnc-main-window.h"
#include "gnc-plugin-page-register2.h"
+#include "gnc-prefs.h"
#include "gnc-ui.h"
#include "gnc-ui-balances.h"
#include "guile-util.h"
#include "reconcile-view.h"
#include "window-reconcile2.h"
-#define GCONF_SECTION "dialogs/window-reconcile"
#define WINDOW_RECONCILE_CM_CLASS "window-reconcile"
@@ -1613,7 +1613,7 @@
{
RecnWindow2 *recnData = user_data;
- gnc_save_window_size (GCONF_SECTION, GTK_WINDOW (recnData->window));
+ gnc_save_window_size (GNC_PREFS_GROUP_RECONCILE, GTK_WINDOW (recnData->window));
gtk_widget_destroy (recnData->window);
}
@@ -1801,7 +1801,7 @@
/* Force a reasonable starting size */
gtk_window_set_default_size (GTK_WINDOW (recnData->window), 800, 600);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW (recnData->window));
+ gnc_restore_window_size (GNC_PREFS_GROUP_RECONCILE, GTK_WINDOW (recnData->window));
gtk_container_add(GTK_CONTAINER(frame), main_area);
gtk_container_set_border_width(GTK_CONTAINER(main_area), 10);
Modified: gnucash/trunk/src/gnome-search/dialog-search.c
===================================================================
--- gnucash/trunk/src/gnome-search/dialog-search.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome-search/dialog-search.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -34,7 +34,7 @@
#include "gnc-ui.h"
#include "gnc-gui-query.h"
#include "gnc-query-view.h"
-#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "gnc-session.h"
#include "qof.h"
#include "engine-helpers.h"
@@ -50,7 +50,9 @@
static QofLogModule log_module = G_LOG_DOMAIN;
#define DIALOG_SEARCH_CM_CLASS "dialog-search"
-#define KEY_ACTIVE_ONLY "search_for_active_only"
+#define GNC_PREFS_GROUP_SEARCH_GENERAL "dialogs.search"
+#define GNC_PREF_NEW_SEARCH_LIMIT "new_search_limit"
+#define GNC_PREF_ACTIVE_ONLY "search_for_active_only"
typedef enum
{
@@ -123,7 +125,7 @@
GList *crit_list; /* List of crit_data */
gint component_id;
- const gchar *gconf_section;
+ const gchar *prefs_group;
};
struct _crit_data
@@ -390,7 +392,7 @@
gnc_query_view_unselect_all (GNC_QUERY_VIEW(sw->result_view));
/* set 'new search' if fewer than max_count items is returned. */
- max_count = gnc_gconf_get_float("dialogs/search", "new_search_limit", NULL);
+ max_count = gnc_prefs_get_float(GNC_PREFS_GROUP_SEARCH_GENERAL, GNC_PREF_NEW_SEARCH_LIMIT);
if (gnc_query_view_get_num_entries(GNC_QUERY_VIEW(sw->result_view)) < max_count)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (sw->new_rb), TRUE);
}
@@ -420,8 +422,8 @@
search_active_only_cb (GtkToggleButton *button, GNCSearchWindow *sw)
{
- gnc_gconf_set_bool(sw->gconf_section, KEY_ACTIVE_ONLY,
- gtk_toggle_button_get_active (button), NULL);
+ gnc_prefs_set_bool(sw->prefs_group, GNC_PREF_ACTIVE_ONLY,
+ gtk_toggle_button_get_active (button));
}
@@ -1132,7 +1134,7 @@
g_signal_connect (sw->del_rb, "toggled",
G_CALLBACK (search_type_cb), sw);
- active = gnc_gconf_get_bool(sw->gconf_section, KEY_ACTIVE_ONLY, NULL);
+ active = gnc_prefs_get_bool(sw->prefs_group, GNC_PREF_ACTIVE_ONLY);
sw->active_only_check = GTK_WIDGET(gtk_builder_get_object (builder, "active_only_check"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sw->active_only_check), active);
g_signal_connect (sw->active_only_check, "toggled",
@@ -1209,8 +1211,8 @@
gnc_search_dialog_destroy (GNCSearchWindow *sw)
{
if (!sw) return;
- if (sw->gconf_section)
- gnc_save_window_size(sw->gconf_section, GTK_WINDOW(sw->dialog));
+ if (sw->prefs_group)
+ gnc_save_window_size(sw->prefs_group, GTK_WINDOW(sw->dialog));
gnc_close_gui_component (sw->component_id);
}
@@ -1231,7 +1233,7 @@
GNCSearchResultCB result_callback,
GNCSearchNewItemCB new_item_cb,
gpointer user_data, GNCSearchFree free_cb,
- const gchar *gconf_section,
+ const gchar *prefs_group,
const gchar *type_label)
{
GNCSearchWindow *sw = g_new0 (GNCSearchWindow, 1);
@@ -1255,7 +1257,7 @@
sw->new_item_cb = new_item_cb;
sw->user_data = user_data;
sw->free_cb = free_cb;
- sw->gconf_section = gconf_section;
+ sw->prefs_group = prefs_group;
sw->type_label = type_label;
/* Grab the get_guid function */
@@ -1265,8 +1267,8 @@
sw->q = show_start_query;
gnc_search_dialog_init_widgets (sw, title);
- if (sw->gconf_section)
- gnc_restore_window_size(sw->gconf_section, GTK_WINDOW(sw->dialog));
+ if (sw->prefs_group)
+ gnc_restore_window_size(sw->prefs_group, GTK_WINDOW(sw->dialog));
gtk_widget_show(sw->dialog);
/* Maybe display the original query results? */
Modified: gnucash/trunk/src/gnome-search/dialog-search.h
===================================================================
--- gnucash/trunk/src/gnome-search/dialog-search.h 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome-search/dialog-search.h 2013-10-07 14:09:14 UTC (rev 23229)
@@ -111,7 +111,7 @@
GNCSearchResultCB result_callback,
GNCSearchNewItemCB new_item_cb,
gpointer user_data, GNCSearchFree free_user_data,
- const gchar *gconf_section,
+ const gchar *prefs_group,
const gchar *type_label);
void gnc_search_dialog_destroy (GNCSearchWindow *sw);
Modified: gnucash/trunk/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-account.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome-utils/dialog-account.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -53,7 +53,7 @@
#define DIALOG_NEW_ACCOUNT_CM_CLASS "dialog-new-account"
#define DIALOG_EDIT_ACCOUNT_CM_CLASS "dialog-edit-account"
-#define GCONF_SECTION "dialogs/account"
+#define GNC_PREFS_GROUP "dialogs.account"
#define DEFAULT_COLOR "#ededececebeb"
enum account_cols
@@ -1401,7 +1401,7 @@
aw->type_view = GTK_WIDGET(gtk_builder_get_object (builder, "type_view"));
gnc_account_type_view_create (aw);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(aw->dialog));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW(aw->dialog));
gtk_widget_grab_focus(GTK_WIDGET(aw->name_entry));
@@ -1483,7 +1483,7 @@
AccountWindow *aw = user_data;
ENTER("aw %p, modal %d", aw, aw->modal);
- gnc_save_window_size (GCONF_SECTION, GTK_WINDOW(aw->dialog));
+ gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW(aw->dialog));
gtk_widget_destroy (GTK_WIDGET (aw->dialog));
LEAVE(" ");
Modified: gnucash/trunk/src/gnome-utils/dialog-preferences.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-preferences.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome-utils/dialog-preferences.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -76,7 +76,7 @@
#include "dialog-preferences.h"
#define DIALOG_PREFERENCES_CM_CLASS "dialog-newpreferences"
-#define GCONF_SECTION "dialogs/preferences"
+#define GNC_PREFS_GROUP "dialogs.preferences"
#define PREFIX_LEN sizeof("gconf/") - 1
#define WIDGET_HASH "widget_hash"
#define NOTEBOOK "notebook"
@@ -1410,7 +1410,7 @@
break;
default:
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog));
gnc_unregister_gui_component_by_data(DIALOG_PREFERENCES_CM_CLASS,
dialog);
gnc_gconf_general_remove_cb(
@@ -1886,7 +1886,7 @@
dialog = gnc_preferences_dialog_create();
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(dialog));
gtk_widget_show(dialog);
gnc_gconf_add_notification(G_OBJECT(dialog), NULL,
Modified: gnucash/trunk/src/gnome-utils/dialog-reset-warnings.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-reset-warnings.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome-utils/dialog-reset-warnings.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -36,7 +36,7 @@
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_PREFS;
-#define GCONF_SECTION "dialogs/reset_warnings"
+#define GNC_PREFS_GROUP "dialogs.reset_warnings"
#define DIALOG_RESET_WARNINGS_CM_CLASS "reset-warnings"
#define GCONF_ENTRY_LIST "gconf_entries"
#define TIPS_STRING "tips"
@@ -215,7 +215,7 @@
gnc_gconf_remove_notification(G_OBJECT(rw_dialog->dialog), GCONF_WARNINGS,
DIALOG_RESET_WARNINGS_CM_CLASS);
gnc_reset_warnings_apply_changes(rw_dialog);
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(rw_dialog->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(rw_dialog->dialog));
gnc_unregister_gui_component_by_data(DIALOG_RESET_WARNINGS_CM_CLASS,
rw_dialog);
gtk_widget_destroy(GTK_WIDGET(rw_dialog->dialog));
@@ -552,7 +552,7 @@
gnc_reset_warnings_gconf_changed,
DIALOG_RESET_WARNINGS_CM_CLASS);
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(rw_dialog->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(rw_dialog->dialog));
gnc_register_gui_component (DIALOG_RESET_WARNINGS_CM_CLASS,
NULL, close_handler, rw_dialog);
Modified: gnucash/trunk/src/gnome-utils/dialog-tax-table.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-tax-table.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome-utils/dialog-tax-table.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -42,7 +42,7 @@
#include "dialog-tax-table.h"
#define DIALOG_TAX_TABLE_CM_CLASS "tax-table-dialog"
-#define GCONF_SECTION "dialogs/business/tax_tables"
+#define GNC_PREFS_GROUP "dialogs.business.tax_tables"
enum tax_table_cols
{
@@ -652,7 +652,7 @@
{
TaxTableWindow *ttw = data;
- gnc_save_window_size (GCONF_SECTION, GTK_WINDOW (ttw->dialog));
+ gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW (ttw->dialog));
gnc_ui_tax_table_window_destroy (ttw);
}
@@ -762,7 +762,7 @@
ttw);
tax_table_window_refresh (ttw);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW (ttw->dialog));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW (ttw->dialog));
gtk_widget_show_all (ttw->dialog);
g_object_unref(G_OBJECT(builder));
Modified: gnucash/trunk/src/gnome-utils/dialog-totd.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-totd.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome-utils/dialog-totd.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -36,9 +36,10 @@
#include "gnc-engine.h"
#define GCONF_SECTION "dialogs/tip_of_the_day"
+#define GNC_PREFS_GROUP "dialogs.totd"
#define KEY_CURRENT_TIP "current_tip"
#define KEY_SHOW_TIPS "show_at_startup"
-#define DIALOG_TOTD_CM_CLASS "dialog-totd"
+#define DIALOG_TOTD_CM_CLASS "dialog-totd"
#define GNC_RESPONSE_FORWARD 1
#define GNC_RESPONSE_BACK 2
@@ -145,7 +146,7 @@
break;
case GTK_RESPONSE_CLOSE:
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(totd_dialog->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(totd_dialog->dialog));
/* fall through */
default:
@@ -349,7 +350,7 @@
gnc_new_tip_number(totd_dialog, 1);
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(totd_dialog->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(totd_dialog->dialog));
gtk_widget_show(GTK_WIDGET (totd_dialog->dialog));
gnc_register_gui_component(DIALOG_TOTD_CM_CLASS,
Modified: gnucash/trunk/src/gnome-utils/dialog-transfer.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-transfer.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome-utils/dialog-transfer.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -52,7 +52,7 @@
#define DIALOG_TRANSFER_CM_CLASS "dialog-transfer"
-#define GCONF_SECTION "dialogs/transfer"
+#define GNC_PREFS_GROUP "dialogs.transfer"
#define PRECISION 1000000
@@ -1942,7 +1942,7 @@
}
gtk_builder_connect_signals(builder, xferData);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW (xferData->dialog));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW (xferData->dialog));
LEAVE(" ");
}
@@ -1955,7 +1955,7 @@
ENTER(" ");
dialog = GTK_WIDGET (xferData->dialog);
- gnc_save_window_size (GCONF_SECTION, GTK_WINDOW (dialog));
+ gnc_save_window_size (GNC_PREFS_GROUP, GTK_WINDOW (dialog));
gtk_widget_hide (dialog);
gnc_xfer_dialog_close_cb(GTK_DIALOG(dialog), xferData);
gtk_widget_destroy (dialog);
Modified: gnucash/trunk/src/gnome-utils/dialog-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-utils.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/gnome-utils/dialog-utils.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -40,6 +40,7 @@
#include "gnc-euro.h"
#include "gnc-ui-util.h"
#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "guile-util.h"
#include "gnc-main-window.h"
#include <gnc-gdate-utils.h>
@@ -47,8 +48,7 @@
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUI;
-#define WINDOW_POSITION "window_position"
-#define WINDOW_GEOMETRY "window_geometry"
+#define GNC_PREF_LAST_GEOMETRY "last-geometry"
/********************************************************************\
* gnc_get_toolbar_style *
@@ -141,61 +141,60 @@
/********************************************************************\
* gnc_restore_window_size *
- * returns the window size to use for the given option prefix, *
- * if window sizes are being saved, otherwise returns 0 for both. *
+ * restores the position and size of the given window, if these *
+ * these parameters have been saved earlier. Does nothing if no *
+ * saved values are found. *
* *
- * Args: prefix - the option name prefix *
- * width - pointer to width *
- * height - pointer to height *
+ * Args: group - the preferences group to look in for saved coords *
+ * window - the window for which the coords are to be *
+ * restored *
* Returns: nothing *
\*******************************************************************/
void
-gnc_restore_window_size(const char *section, GtkWindow *window)
+gnc_restore_window_size(const char *group, GtkWindow *window)
{
- GSList *coord_list;
- gint coords[2];
+ gint wpos[2], wsize[2];
+ GVariant *geometry;
ENTER("");
- g_return_if_fail(section != NULL);
+ g_return_if_fail(group != NULL);
g_return_if_fail(window != NULL);
if (!gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL))
return;
- coord_list = gnc_gconf_get_list(section, WINDOW_POSITION,
- GCONF_VALUE_INT, NULL);
- if (coord_list)
+ geometry = gnc_prefs_get_value (group, GNC_PREF_LAST_GEOMETRY);
+ if (g_variant_is_of_type (geometry, (const GVariantType *) "(iiii)") )
{
gint screen_width = gdk_screen_width();
gint screen_height = gdk_screen_height();
- coords[0] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 0));
- coords[1] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 1));
- DEBUG("from gconf - coords[0]: %d, coords[1]: %d", coords[0], coords[1]);
+ g_variant_get (geometry, "(iiii)",
+ &wpos[0], &wpos[1],
+ &wsize[0], &wsize[1]);
+ DEBUG("geometry from preferences - wpos[0]: %d, wpos[1]: %d, wsize[0]: %d, wsize[1]: %d",
+ wpos[0], wpos[1], wsize[0], wsize[1]);
- /* Keep the window on screen if possible */
- if (screen_width != 0)
- coords[0] = coords[0] % screen_width;
- if (screen_height != 0)
- coords[1] = coords[1] % screen_height;
- DEBUG("after screen adaption - coords[0]: %d, coords[1]: %d", coords[0], coords[1]);
+ /* (-1, -1) means no geometry was saved (default preferences value) */
+ if ((wpos[0] != -1) && (wpos[1] != -1))
+ {
+ /* Keep the window on screen if possible */
+ if (screen_width != 0)
+ wpos[0] = wpos[0] % screen_width;
+ if (screen_height != 0)
+ wpos[1] = wpos[1] % screen_height;
+ DEBUG("geometry after screen adaption - wpos[0]: %d, wpos[1]: %d, wsize[0]: %d, wsize[1]: %d",
+ wpos[0], wpos[1], wsize[0], wsize[1]);
- gtk_window_move(window, coords[0], coords[1]);
- g_slist_free(coord_list);
- }
+ gtk_window_move(window, wpos[0], wpos[1]);
+ }
- coord_list = gnc_gconf_get_list(section, WINDOW_GEOMETRY,
- GCONF_VALUE_INT, NULL);
- if (coord_list)
- {
- coords[0] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 0));
- coords[1] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 1));
- DEBUG("coords[0]: %d, coords[1]: %d", coords[0], coords[1]);
- if ((coords[0] != 0) && (coords[1] != 0))
- gtk_window_resize(window, coords[0], coords[1]);
- g_slist_free(coord_list);
+ /* Don't attempt to restore invalid sizes */
+ if ((wsize[0] > 0) && (wsize[1] > 0))
+ gtk_window_resize(window, wsize[0], wsize[1]);
}
+ g_variant_unref (geometry);
LEAVE("");
}
@@ -203,40 +202,32 @@
/********************************************************************\
* gnc_save_window_size *
- * save the window size into options whose names are determined *
- * by the string prefix. *
+ * save the window position and size into options whose names are *
+ * prefixed by the group name. *
* *
- * Args: prefix - determines the options used to save the values *
- * width - width of the window to save *
- * height - height of the window to save *
+ * Args: group - preferences group to save the options in *
+ * window - the window for which current position and size *
+ * are to be saved *
* Returns: nothing *
\********************************************************************/
void
-gnc_save_window_size(const char *section, GtkWindow *window)
+gnc_save_window_size(const char *group, GtkWindow *window)
{
- GSList *coord_list = NULL;
- gint coords[2];
+ gint wpos[2], wsize[2];
+ GVariant *geometry;
- g_return_if_fail(section != NULL);
+ g_return_if_fail(group != NULL);
g_return_if_fail(window != NULL);
if (!gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL))
return;
- gtk_window_get_size(GTK_WINDOW(window), &coords[0], &coords[1]);
- coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[0]));
- coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[1]));
- gnc_gconf_set_list(section, WINDOW_GEOMETRY, GCONF_VALUE_INT,
- coord_list, NULL);
- g_slist_free(coord_list);
- coord_list = NULL;
-
- gtk_window_get_position(GTK_WINDOW(window), &coords[0], &coords[1]);
- coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[0]));
- coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[1]));
- gnc_gconf_set_list(section, WINDOW_POSITION, GCONF_VALUE_INT,
- coord_list, NULL);
- g_slist_free(coord_list);
+ gtk_window_get_position(GTK_WINDOW(window), &wpos[0], &wpos[1]);
+ gtk_window_get_size(GTK_WINDOW(window), &wsize[0], &wsize[1]);
+ geometry = g_variant_new ("(iiii)", wpos[0], wpos[1],
+ wsize[0], wsize[1]);
+ gnc_prefs_set_value (group, GNC_PREF_LAST_GEOMETRY, geometry);
+ g_variant_unref (geometry);
}
Modified: gnucash/trunk/src/import-export/aqbanking/assistant-ab-initial.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/assistant-ab-initial.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/aqbanking/assistant-ab-initial.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -62,7 +62,7 @@
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = GNC_MOD_ASSISTANT;
-#define GCONF_SECTION "dialogs/ab_initial"
+#define GNC_PREFS_GROUP "dialogs.ab_initial"
#define ASSISTANT_AB_INITIAL_CM_CLASS "assistant-ab-initial"
typedef struct _ABInitialInfo ABInitialInfo;
@@ -823,7 +823,7 @@
{
ABInitialInfo *info = user_data;
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(info->window));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(info->window));
gtk_widget_destroy(info->window);
}
@@ -895,7 +895,7 @@
selection = gtk_tree_view_get_selection(info->account_view);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(info->window));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW(info->window));
g_signal_connect(info->account_view, "row-activated",
G_CALLBACK(account_list_clicked_cb), info);
Modified: gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-gwen-gui.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -56,7 +56,7 @@
#endif
#define GWEN_GUI_CM_CLASS "dialog-hbcilog"
-#define GCONF_SECTION_CONNECTION GCONF_SECTION_AQBANKING "/connection_dialog"
+#define GNC_PREFS_GROUP_CONNECTION GNC_PREFS_GROUP_AQBANKING ".connection_dialog"
#define KEY_CLOSE_ON_FINISH "close_on_finish"
#define KEY_REMEMBER_PIN "remember_pin"
@@ -614,7 +614,7 @@
if (gui->parent)
gtk_window_set_transient_for(GTK_WINDOW(gui->dialog),
GTK_WINDOW(gui->parent));
- gnc_restore_window_size(GCONF_SECTION_CONNECTION, GTK_WINDOW(gui->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP_CONNECTION, GTK_WINDOW(gui->dialog));
gui->keep_alive = TRUE;
gui->state = INIT;
@@ -725,7 +725,7 @@
NULL);
/* Remember size and position of the dialog */
- gnc_save_window_size(GCONF_SECTION_CONNECTION, GTK_WINDOW(gui->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP_CONNECTION, GTK_WINDOW(gui->dialog));
/* Do not serve as GUI anymore */
gui->state = HIDDEN;
Modified: gnucash/trunk/src/import-export/aqbanking/gschemas/org.gnucash.dialogs.import.hbci.gschema.xml.in
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gschemas/org.gnucash.dialogs.import.hbci.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/aqbanking/gschemas/org.gnucash.dialogs.import.hbci.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -1,4 +1,14 @@
<schemalist gettext-domain="GETTEXT_PACKAGE">
+ <schema id="org.gnucash.dialogs.ab_initial" path="/apps/gnucash/dialogs/ab_initial/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ </schema>
+
<schema id="org.gnucash.dialogs.import.hbci" path="/apps/gnucash/dialogs/import/hbci/">
<key name="close_on_finish" type="b">
<default>true</default>
@@ -40,5 +50,16 @@
<summary>Last pathname used</summary>
<description>This field contains the last pathname used by this window. It will be used as the initial filename/pathname the next time this window is opened.</description>
</key>
+ <child name="connection_dialog" schema="org.gnucash.dialogs.import.hbci.connection_dialog"/>
</schema>
+
+ <schema id="org.gnucash.dialogs.import.hbci.connection_dialog" path="/apps/gnucash/dialogs/import/hbci/connection_dialog/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ </schema>
</schemalist>
Modified: gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c
===================================================================
--- gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/csv-export/assistant-csv-export.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -842,7 +842,7 @@
g_free(info->file_name);
g_free(info->starting_dir);
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(info->window));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(info->window));
gtk_widget_destroy (info->window);
}
@@ -1004,7 +1004,7 @@
g_signal_connect (G_OBJECT(window), "destroy",
G_CALLBACK (csv_export_assistant_destroy_cb), info);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(info->window));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW(info->window));
info->csva.paned = GTK_WIDGET(gtk_builder_get_object (builder, "paned"));
Modified: gnucash/trunk/src/import-export/csv-export/gschemas/org.gnucash.dialogs.export.csv.gschema.xml.in
===================================================================
--- gnucash/trunk/src/import-export/csv-export/gschemas/org.gnucash.dialogs.export.csv.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/csv-export/gschemas/org.gnucash.dialogs.export.csv.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -1,14 +1,21 @@
<schemalist gettext-domain="GETTEXT_PACKAGE">
<schema id="org.gnucash.dialogs.export.csv" path="/apps/gnucash/dialogs/export/csv/">
- <key name="paned_position" type="i">
- <default>0</default>
- <summary>Window geometry</summary>
- <description>The position of paned window when it was last closed.</description>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
</key>
<key name="last_path" type="s">
<default>''</default>
<summary>Last pathname used</summary>
<description>This field contains the last pathname used by this window. It will be used as the initial filename/pathname the next time this window is opened.</description>
</key>
+ <key name="paned_position" type="i">
+ <default>0</default>
+ <summary>Window geometry</summary>
+ <description>The position of paned window when it was last closed.</description>
+ </key>
</schema>
</schemalist>
Modified: gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c
===================================================================
--- gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/csv-import/assistant-csv-account-import.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -41,7 +41,6 @@
#include "assistant-csv-account-import.h"
#include "csv-account-import.h"
-#define GCONF_SECTION "dialogs/import/csv"
#define GNC_PREFS_GROUP "dialogs.import.csv"
#define ASSISTANT_CSV_IMPORT_CM_CLASS "assistant-csv-account-import"
@@ -540,7 +539,7 @@
g_free(info->file_name);
g_string_free(info->regexp, TRUE);
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(info->window));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(info->window));
gtk_widget_destroy (info->window);
}
@@ -644,7 +643,7 @@
g_signal_connect (G_OBJECT(window), "destroy",
G_CALLBACK (csv_import_assistant_destroy_cb), info);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(info->window));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW(info->window));
gtk_builder_connect_signals(builder, info);
g_object_unref(G_OBJECT(builder));
Modified: gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c
===================================================================
--- gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/csv-import/assistant-csv-trans-import.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -49,7 +49,6 @@
#include <goffice/gtk/go-charmap-sel.h>
#define MIN_COL_WIDTH 70
-#define GCONF_SECTION "dialogs/import/csv"
#define GNC_PREFS_GROUP "dialogs.import.csv"
#define ASSISTANT_CSV_IMPORT_TRANS_CM_CLASS "assistant-csv-trans-import"
@@ -1620,7 +1619,7 @@
if (!(info->gnc_csv_importer_gui == NULL))
info->gnc_csv_importer_gui = NULL;
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(info->window));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(info->window));
gtk_widget_destroy (info->window);
}
@@ -1816,7 +1815,7 @@
g_signal_connect (G_OBJECT(window), "destroy",
G_CALLBACK (csv_import_trans_assistant_destroy_cb), info);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(info->window));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW(info->window));
gtk_builder_connect_signals(builder, info);
g_object_unref(G_OBJECT(builder));
Modified: gnucash/trunk/src/import-export/csv-import/gschemas/org.gnucash.dialogs.import.csv.gschema.xml.in
===================================================================
--- gnucash/trunk/src/import-export/csv-import/gschemas/org.gnucash.dialogs.import.csv.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/csv-import/gschemas/org.gnucash.dialogs.import.csv.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -1,5 +1,12 @@
<schemalist gettext-domain="GETTEXT_PACKAGE">
<schema id="org.gnucash.dialogs.import.csv" path="/apps/gnucash/dialogs/import/csv/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
<key name="last_path" type="s">
<default>''</default>
<summary>Last pathname used</summary>
Modified: gnucash/trunk/src/import-export/gschemas/org.gnucash.dialogs.import.generic.gschema.xml.in
===================================================================
--- gnucash/trunk/src/import-export/gschemas/org.gnucash.dialogs.import.generic.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/gschemas/org.gnucash.dialogs.import.generic.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -41,7 +41,10 @@
<description>Enables the automatic creation of new commodities if any unknown commodity is encountered during import. Otherwise the user will be asked what to do with each unknown commodity.</description>
</key>
<child name="account_matcher" schema="org.gnucash.dialogs.import.generic.account_matcher"/>
+ <child name="matcher_picker" schema="org.gnucash.dialogs.import.generic.matcher_picker"/>
+ <child name="transaction_list" schema="org.gnucash.dialogs.import.generic.transaction_list"/>
</schema>
+
<schema id="org.gnucash.dialogs.import.generic.account_matcher" path="/apps/gnucash/dialogs/import/generic_matcher/account_matcher/">
<key name="account-code_visible" type="b">
<default>false</default>
@@ -54,4 +57,24 @@
<description>This setting stores the width of the given column in pixels.</description>
</key>
</schema>
+
+ <schema id="org.gnucash.dialogs.import.generic.matcher_picker" path="/apps/gnucash/dialogs/import/generic_matcher/matcher_picker/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ </schema>
+
+ <schema id="org.gnucash.dialogs.import.generic.transaction_list" path="/apps/gnucash/dialogs/import/generic_matcher/transaction_list/">
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
+ </schema>
</schemalist>
Modified: gnucash/trunk/src/import-export/import-main-matcher.c
===================================================================
--- gnucash/trunk/src/import-export/import-main-matcher.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/import-main-matcher.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -50,7 +50,7 @@
#include "import-account-matcher.h"
#include "app-utils/gnc-component-manager.h"
-#define GCONF_SECTION "dialogs/import/generic_matcher/transaction_list"
+#define GNC_PREFS_GROUP "dialogs.import.generic.transaction_list"
struct _main_matcher_info
{
@@ -137,7 +137,7 @@
if (!(info->dialog == NULL))
{
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(info->dialog));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(info->dialog));
gnc_import_Settings_delete (info->user_settings);
gtk_widget_destroy (GTK_WIDGET (info->dialog));
}
@@ -574,7 +574,7 @@
if (heading)
gtk_label_set_text (GTK_LABEL (heading_label), heading);
- gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(info->dialog));
+ gnc_restore_window_size(GNC_PREFS_GROUP, GTK_WINDOW(info->dialog));
gtk_widget_show_all (GTK_WIDGET (info->dialog));
info->transaction_processed_cb = NULL;
Modified: gnucash/trunk/src/import-export/import-match-picker.c
===================================================================
--- gnucash/trunk/src/import-export/import-match-picker.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/import-match-picker.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -41,7 +41,7 @@
* Constants *
\********************************************************************/
-#define GCONF_SECTION "dialogs/import/generic_matcher/match_picker"
+#define GNC_PREFS_GROUP "dialogs.import.generic.match_picker"
enum downloaded_cols
{
@@ -426,7 +426,7 @@
", add_threshold:",matcher->add_threshold,
", display_threshold:",matcher->display_threshold); */
- gnc_restore_window_size(GCONF_SECTION,
+ gnc_restore_window_size(GNC_PREFS_GROUP,
GTK_WINDOW (matcher->transaction_matcher));
gtk_widget_show(matcher->transaction_matcher);
@@ -462,7 +462,7 @@
/*DEBUG("Right before run and close");*/
gtk_window_set_modal(GTK_WINDOW(matcher->transaction_matcher), TRUE);
response = gtk_dialog_run (GTK_DIALOG (matcher->transaction_matcher));
- gnc_save_window_size(GCONF_SECTION,
+ gnc_save_window_size(GNC_PREFS_GROUP,
GTK_WINDOW (matcher->transaction_matcher));
gtk_widget_destroy (matcher->transaction_matcher);
/*DEBUG("Right after run and close");*/
Modified: gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c
===================================================================
--- gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c 2013-10-07 14:09:14 UTC (rev 23229)
@@ -3612,7 +3612,7 @@
box = GTK_WIDGET(gtk_builder_get_object (builder, "currency_picker_hbox"));
gtk_box_pack_start(GTK_BOX(box), qif_win->currency_picker, TRUE, TRUE, 0);
- gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(qif_win->window));
+ gnc_restore_window_size (GNC_PREFS_GROUP, GTK_WINDOW(qif_win->window));
g_signal_connect( qif_win->window, "destroy",
G_CALLBACK(gnc_ui_qif_import_assistant_destroy), qif_win );
@@ -3636,7 +3636,7 @@
{
QIFImportWindow *qif_win = user_data;
- gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(qif_win->window));
+ gnc_save_window_size(GNC_PREFS_GROUP, GTK_WINDOW(qif_win->window));
gtk_widget_destroy( qif_win->window );
}
Modified: gnucash/trunk/src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in
===================================================================
--- gnucash/trunk/src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in 2013-10-07 14:08:17 UTC (rev 23228)
+++ gnucash/trunk/src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in 2013-10-07 14:09:14 UTC (rev 23229)
@@ -1,19 +1,26 @@
<schemalist gettext-domain="GETTEXT_PACKAGE">
<schema id="org.gnucash.dialogs.import.qif" path="/apps/gnucash/dialogs/import/qif/">
- <key name="show_doc" type="b">
- <default>true</default>
- <summary>Show documentation</summary>
- <description>Show some documentation-only pages in QIF Import assistant.</description>
- </key>
<key name="default_status" type="s">
<default>'not_cleared'</default>
<summary>Default QIF transaction status</summary>
<description>Default status for QIF transaction when not specified in QIF file.</description>
</key>
+ <key name="last-geometry" type="(iiii)">
+ <default>(-1,-1,-1,-1)</default>
+ <summary>Last window position and size</summary>
+ <description>This setting describes the size and position of the window when it was last closed.
+ The numbers are the X and Y coordinates of the top left corner of the window
+ followed by the width and height of the window.</description>
+ </key>
<key name="last_path" type="s">
<default>''</default>
<summary>Last pathname used</summary>
<description>This field contains the last pathname used by this window. It will be used as the initial filename/pathname the next time this window is opened.</description>
</key>
+ <key name="show_doc" type="b">
+ <default>true</default>
+ <summary>Show documentation</summary>
+ <description>Show some documentation-only pages in QIF Import assistant.</description>
+ </key>
</schema>
</schemalist>
More information about the gnucash-changes
mailing list