Commit Graph

15312 Commits

Author SHA1 Message Date
Geert Janssens
ccdd93b25b Remove state saving/restoring code from new and old register code
This is similar to what the previous commit did for GncTreeView
and means column widths, column's visibility and register sort order
are currently no longer saved or restored for any register.

This is done because the state code relies heavily on gconf
and unfortunately can't be mapped to gsettings in its present
form. State save/restore  will be added again later, once
the gconf conversion is complete.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23262 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:28:01 +00:00
Geert Janssens
6e42833321 Remove state saving/restoring code from gnc-tree-view
This means column widths, column's visibility and view sort order
are currently no longer saved or restored for any view based on
GncTreeView.

This is done because the state code relies heavily on gconf
and unfortunately can't be mapped to gsettings in its present
form.

State save/restore  will be added again later, but likely only
after the gconf conversion is complete.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23261 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:27:50 +00:00
Geert Janssens
23a824d460 Gnc-Prefs: Convert gnc user warnings
This is a little more involved that a simple
find/replace of gconf->gsettings functions.

Gsettings doesn't allow introspection on the schema
like gconf does. So we need another way to extract
the warnings' summaries and long descriptions to
show the user. To fix this, a new set of source
files is auto-generated based on the gsettings schema
source file for the warnings: gnc-warnings.[ch]

gnc-warnings.c: contains an array of warning
description structs and the implementation of
an accessor function. The array is to be assumed
read only

gnc-warnings.h: defines each warning using #define
and exposes the accessor function to the rest of the
source tree.

The two source files are constructed using an xsl
transformation on the gsettings schema source file.
This is done using the tool xsltproc, which should
already be available on each platform GnuCash supports
because it gets installed together with libxml2,
which is already a required dependency for GnuCash.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23260 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:27:34 +00:00
Geert Janssens
60aef37631 Remove unused gconf includes, cflags and libs so far
This reduces the cruft a bit, making it easier
to see what's still to be migrated

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23259 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:27:02 +00:00
Geert Janssens
d9802f1bff Refactor gnc-tree-view based widgets such that only gnc-tree-view itself deals with gconf
The only exception is gnc-split-reg2, which has it's own implementation
of sort parameters (also linked to gconf unfortunately).

Tree views store column visibility and sort preferences in gconf. This is
actually state information and should be kept in the gnucash state file
(*.gcm in .gnucash/books). It will definitely not be ported to gsettings,
simply because gsettings can't handle floating sections (sections not
strictly tied to schema).

So in the process, where it makes sense the word gconf is already
replaced with "state". That helps with cleaning up the remaining gconf
code in gnucash, and indicates these parts need to be reworked to
use the state file as backend.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23258 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:26:11 +00:00
Geert Janssens
5674f4ed21 Gnc-Prefs: cleanup gconf wiring in main summarybar
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23257 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:25:39 +00:00
Geert Janssens
8e630049a3 Gnc-Prefs: cleanup gconf wiring in report system
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23256 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:23:52 +00:00
Geert Janssens
32cd4189de Gnc-Prefs: cleanup (most) gconf wiring in import-export
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23255 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:22:52 +00:00
Geert Janssens
5b172e859b Gnc-Prefs: migrate remaining gconf calls in check printing
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23254 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:22:23 +00:00
Geert Janssens
cc1fa9216f Drop option to customize gconf_path via command line or environment variable
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23253 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:22:09 +00:00
Geert Janssens
e5bccf7e5c Gnc-Prefs: cleanup some remaining bits from the preferences dialog
It is now fully converted to the new preferences system

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23252 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:21:44 +00:00
Geert Janssens
8418749a81 Gnc-Prefs: migrate GncDateEdit widgets (and associated preferences)
All GncDateEdits now use the new preferences backend
so drop the GncDateEdit-Gconf wiring as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23251 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:19:29 +00:00
Geert Janssens
a89f2059ed Gnc-Prefs: migrate GncPeriodSelect widgets (and associated preferences)
All GncPeriodSelects now use the new preferences backend
so drop the GncPeriodSelect-Gconf wiring as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23250 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:18:49 +00:00
Geert Janssens
369071bfe6 Gnc-Prefs: migrate GncCurrencyEdit widgets (and associated preferences)
All GncCurrencyEdits now use the new preferences backend
so drop the GncCurrencyEdit-Gconf wiring as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23249 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:18:06 +00:00
Geert Janssens
b712968386 Gnc-Prefs: migrate gnc-plugin gconf machinery
Instead of storing a gconf callback function that will
eventually by attached to the preference when the
plugin is added to a window, simply do this for each
plugin internally in its own add_to_window override
function.
This had already been done in earlier commits for most
plugins. This commit cleans it up for the remaining
plugins and the base plugin code.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23248 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:16:59 +00:00
Geert Janssens
b453bf3838 Gnc-Prefs: migrate GtkRadiobutton widgets (and associated preferences)
All GtkRadiokButtons now use the new preferences backend
so drop the GtkRadiokButton-Gconf wiring as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23247 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:16:36 +00:00
Geert Janssens
526bee354a Gnc-Prefs: remove toolbar_style preference
This option should be handled by the environment, not by GnuCash

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23246 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:16:11 +00:00
Geert Janssens
57e0143551 Gnc-Prefs: migrate date_format preference
This includes converting the radio button group in preferences
into a combobox

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23245 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:15:55 +00:00
Geert Janssens
a91c0a9c3a Resave preferences dialog with a recent glade-3 version
This is in a commit of its own to separate automatic
changes from the real ones

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23244 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:15:43 +00:00
Geert Janssens
939d8f5f3a Gnc-Prefs: migrate account_separator preference (and associated GtkEntry widget)
All GtkEntries now use the new preferences backend
so drop the GtkEntry-Gconf wiring as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23243 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:15:18 +00:00
Geert Janssens
8c6d8fe3b0 Gnc-Prefs: migrate file history plugin
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23242 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:14:27 +00:00
Geert Janssens
14e8f5620f Gnc-Prefs: migrate int-typed preferences (and GtkCombobox widgets linked to them)
All GtkComboBoxes now use the new preferences backend
so drop the GtkComboBoxes-Gconf wiring as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23241 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:14:11 +00:00
Geert Janssens
f9e0da38f4 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
2013-10-07 14:13:51 +00:00
Geert Janssens
2291ef5249 Gnc-Prefs: migrate GtkCheckbutton widgets (and associated preferences) - last batch
All GtkCheckButtons now use the new preferences backend
so drop the GtkCheckButton-Gconf wiring as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23239 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:13:11 +00:00
Geert Janssens
e174893d25 Gnc-Prefs: migrate GtkCheckbutton widgets (and associated preferences) - second batch
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23238 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:12:39 +00:00
Geert Janssens
33604eb686 Gnc-Prefs: migrate extra_toolbuttons preference (business option)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23237 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:12:13 +00:00
Geert Janssens
5de9112787 Gnc-Prefs: migrate 24hour_clock preference and fix the code
so it actually works. (It's not actively used though in GnuCash)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23236 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:12:01 +00:00
Geert Janssens
b1739ace18 Gnc-Prefs: migrate GtkCheckbutton widgets (and associated preferences) - first batch
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23235 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:11:42 +00:00
Geert Janssens
4ab1086746 Gnc-Prefs: migrate all GtkFontButton widgets (default_font property)
All GtkFontButtons now use the new preferences backend
so drop the GtkFontButton-Gconf wiring as well.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23234 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:11:18 +00:00
Geert Janssens
56d9c94c00 Prepare preferences dialog to work with gnc-prefs instead of gconf.
The actual migration will be gradually done in future commits.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23233 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:10:46 +00:00
Geert Janssens
55ce498c11 GncDateEdit: add gobject property "time"
That will allow a one on one mapping between a widget property
and a preference in the preferences backend in a future commit.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23232 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:10:20 +00:00
Geert Janssens
336d3cb6fd GncPeriodSelect: add gobject property active
That will allow a one on one mapping between a widget property
and a preference in the preferences backend in a future commit.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23231 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:10:05 +00:00
Geert Janssens
dd0a9b1564 GncCurrencyEdit: add gobject property mnemonic
That will allow a one on one mapping between a widget property
and a preference in the preferences backend in a future commit.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23230 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:09:42 +00:00
Geert Janssens
84dda7abea 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.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23229 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:09:14 +00:00
Geert Janssens
8984c78f94 Gnc-Prefs: migrate most preferences found in app-utils
This required  changes in dependent modules as well. And obviously
the gnc-gconf-utils.[ch] files are not removed yet. Too many
other files still require those.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23228 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:08:17 +00:00
Geert Janssens
ac1003cc4e Gnc-Prefs: migrate first preference option (first_user) to new preference system
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23227 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:07:50 +00:00
Geert Janssens
9c2c7e12cc Temporarily use gconf as gsettings backend
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23226 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:07:28 +00:00
Geert Janssens
cfd8c1a162 Amend XDG_DATA_DIRS if not installed in default prefix
This ensures gsettings schemas are properly found

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23225 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:07:14 +00:00
Geert Janssens
ee9f38df63 Create gsettings schema entries for all gconf keys currently in use
These entries were generated using a conversion tool supplied with
gsettings:
gsettings-schema-convert --force --gconf --xml -u
                         --schema-id <GSETTINGS_SCHEMA_ID>
                         -d GETTEXT_PACKAGE ../schemas/<GCONF_SCHEMA_FILE>
                         -o <GSETTINGS_SCHEMA_ID>.gschema.xml.in

Missing keys (gconf didn't *require* schema keys) were manually
added.

The only keys not converted are those that are used multiple times
in different paths, like budget/account register column widths.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23224 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:07:00 +00:00
Geert Janssens
2332407ec9 Remove obsolete gconf setup assistant.
Gconf is being replaced by gsettings. The problem the obsolete assistant
is trying to solve will be solved differently for gsettings: in order
to locate the gsettings schema files, the XDG_DATA_DIR environment
variable will be set.

This is already configured for development builds. It's likely this
still has to be set up properly for the Windows/OS X installers

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23223 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:06:38 +00:00
Geert Janssens
ae4b6a0c5a Refactor preferences
- rename core-utils/gnc-core-prefs* to core-utils/gnc-prefs*
- rename app-utils/gnc-prefs* to app-utils/gnc-prefs-utils*
- move preferences initialization fuctions to gnc-prefs-utils*
- define a gnc_prefs_* api that is independent of any
  settings backend
- refactor gnc_gsettings_* api to serve as a backend for the
  gnc_prefs_* api

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23222 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:06:23 +00:00
Geert Janssens
4f776ae5b1 GSettings: add function to bind a gsettings key to a gobject property
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23221 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:06:02 +00:00
Geert Janssens
b8536e8802 GSettings: add functions to unset a key or complete schema
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23220 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:05:14 +00:00
Geert Janssens
6775120df8 GSettings: add functions to get/set most common data types
These are
- integers
- floating point numbers
- strings
- enums
- arbitary combinations of values in a GVariant (this will
  be used to replace the current GConf list getters/setters)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23219 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:05:02 +00:00
Geert Janssens
588218f554 GSettings: add functions to listen for changes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23218 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:04:50 +00:00
Geert Janssens
a51380fa5e Add some initialization code for GSettings
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23217 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:04:19 +00:00
Geert Janssens
14208cbfb0 Add GSettings schemas and build rules
These are converted from their GConf equivalents.
Some caveats:
- During the code updates from GConf to GSettings both systems
  use the same backend and hence need the same key and
  path names or they won't see each others changes.
- For this reason the conversion in this commit
  preserves the GConf key names even though these can
  contain illegal characters for GSettings.
- Once all code is successfully converted
  to GSettings and we have a preferences conversion
  script in place, we need one more round of fixing
  the keys and paths (/apps is deprecated in GSettings
  in favour of /org)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23216 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:03:59 +00:00
Geert Janssens
e87957e632 Prepare for GSettings conversion
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23215 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:03:22 +00:00
Geert Janssens
2e2cc12e6d Use more generic parameter name to cut association with gconf
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23214 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:02:48 +00:00
Geert Janssens
07e144ba39 Whitespace cleanup, comment improvements and spelling fixes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23213 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-07 14:02:27 +00:00