GNOME Bugzilla – Bug 643767
goffice should support using gsettings.
Last modified: 2012-03-09 15:16:49 UTC
Created attachment 182330 [details] [review] Proposed patch. The summary says it all
Looks good to me. Please commit.
We don't wait until we branch? Looks a bit adventurous to me. I know we did even more dangerous things in the past,but ...
Unless I am mistaken, none of the code will be compiled by default. Maybe toss an "EXPERIMENTAL" note into conf_msg.
It is the default if gconf is not there. I might change that too.
+ node->path = g_strconcat ("/apps/", key, NULL); + node->id = g_strconcat ("org.gnome.", formatted, NULL); It's a gsettings recommendation to use /org/gnome/foo/bar style paths instead of /apps/foo/bar. + if (g_variant_is_of_type (value, G_VARIANT_TYPE_STRING)) + value_string = g_strdup (g_variant_get_string (value, NULL)); + else if (g_variant_is_of_type (value, G_VARIANT_TYPE_INT32)) + value_string = g_strdup_printf ("%i", g_variant_get_int32 (value)); + else if (g_variant_is_of_type (value, G_VARIANT_TYPE_INT32)) + value_string = g_strdup_printf ("%f", g_variant_get_double (value)); + else if (g_variant_is_of_type (value, G_VARIANT_TYPE_INT32)) + value_string = g_strdup (go_locale_boolean_name (g_variant_get_boolean (value))); + else + value_string = g_strdup ("ERROR FIXME"); You could switch on g_variant_classify() instead of this if..else..else cascade.
(In reply to comment #5) > + node->path = g_strconcat ("/apps/", key, NULL); > + node->id = g_strconcat ("org.gnome.", formatted, NULL); > > It's a gsettings recommendation to use /org/gnome/foo/bar style paths instead > of /apps/foo/bar. The path is NOT for gsettings. It's there to be compatible with the other backends. > You could switch on g_variant_classify() instead of this if..else..else > cascade. Thanks for this information. Also INT32 was tested three times. Oops.
Created attachment 182369 [details] [review] Fixed patch With this patch the GSettings backend will be enabled only if explicitly requested. Will commit that shortly along with the gschema files for gnumeric.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Why are we using "org.gnome."? Should we be using "org.gnumeric."?