Re: GSettings are not saved




On 27/08/12 08:56, Vincent Untz wrote:
Le lundi 27 août 2012, à 08:37 +0200, Lanoxx a écrit :
On 27/08/12 07:37, Vincent Untz wrote:
Le lundi 27 août 2012, à 01:37 +0200, Lanoxx a écrit :
The reason was also that my schema did not have a path set. But for
some reason panel_applet_settings_new() does not warn about this,
when I switched to g_settings_new() i got a Gtk-Critical exception,
thats when I noticed my schema needs a path.
As I said, panel_applet_settings_new() is a wrapper around
g_settings_new_with_path(). That's why you don't need a path in the
schema -- the path is defined by gnome-panel for your applet.

Vincent
In that case, there is probably a bug in that function, see my
following patch here, these few lines completely fixed it for me:
And this change is fine. The settings won't be per-applet, though, but
for all instances of this applet.

Note that, afaik, g_settings_new_with_path() works fine. It's used in
several applets. See for instance
http://git.gnome.org/browse/gnome-panel/tree/applets/fish/fish.c#n1438
Now you confused me. In this link there is no call to g_settings_new_with_path(). And also I can't find any schema definition for the key |FISH_SCHEMA.|

Cheers,

Vincent




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]