Hi gurus,

1. src/gnucash/libgnucash/app-utils/gnc-gsettings.c
gnc_gsettings_load_backend() contains:
            /* The gsettings backend only works in an installed environment.
             * When called from the source environment (for testing
purposes)
             * simply return.
             */
            if (g_strcmp0 (g_getenv ("GNC_UNINSTALLED"), "1") == 0)
                return;

I don't think that is true anymore as there is no GNC_UNINSTALLED in the
environment file and the schemas seem to be compiled to
  build/share/glib-2.0/schemas/gschemas.compiled

This code was added in
https://github.com/Gnucash/gnucash/commit/31c7396e15715d6e178b8fe727f61dabe2
6eca53#diff-83a994aa1576a20801bf5ec6475d5a90
        gjanssens committed on Dec 3, 2013
        The preferences backend can't work from the source environment
because
        it's schemas won't be compiled. This situation is only relevant for
testing,
        which is done from the source (or build) tree.
        Note that a few preferences are needed by the xml backend. If no
preferences
        backend is loaded, some sane defaults will be used instead. Again
this should
        only matter for testing, in which case the real preferences are not
relevant
        anyway.

Should the above code be removed?

2. I've debugged (Linux) and found there doesn't seem to be any bug in the
GnuCash code and that there is some sort of disconnect between
writing a gsettings (dconf) setting and reading it. I've put in debug
statements right after writing a setting, which reads it again, and it gets
an old value.

I found there is a g_settings_sync() that is supposed to wait until all
writes (which need a D-Bus session bus) have occurred.
Putting that in has not helped. I found on the internet several pages saying
g_settings_sync() is not needed if there is a gtk main loop and as I have
seen that during debugging, I guess it is not needed...

I have compiled glib with optimization off so I can debug (the problem still
exists) but I really have no idea of what it is supposed to do. I can see
g_settings_get_int() reading something like a hash table and getting the
wrong value. It doesn't seem to executing anything I can identify as
dconf???

Any suggestions please?

Regards,
Chris Good


_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to