GNOME Bugzilla – Bug 655954
gconf_entry_get_is_writable always return "TRUE" when checking gconf.xml.defaults
Last modified: 2011-09-07 12:45:46 UTC
Created attachment 193232 [details] test_gconf_default writable. This bug is original from https://bugzilla.novell.com/show_bug.cgi?GoAheadAndLogIn=1&id=705409, which states "gconf-editor will not set an entry to default". After some debugs, I found that gconf_entry_get_is_writable() always return "TRUE". See attached application for the testing purpose. I found that in gconf_entry_get_is_writable(), "entry" will be forced to convert to "GConfRealEntry" from "GConfEntry". By using gdb and dump the memory, I found that the int type value of "is_default" and "is_writeable" is "0xba 0xba 0xba 0xba". So the bit for "is_writable" is "1", which will let gconf_entry_get_is_writable return TRUE. This blocks the feature of set_as_default, so I set to Major.
I got the root cause. It is caused by that gconfd-dbus will not return any message if there is no such entry in default xml. So I forced it to return even if there is no such entry. So an "INVALID" value will be returned now. In my test, it works.
Created attachment 194187 [details] [review] force to return value even if value is NULL
The patch looks good and works fine here. Rob, can we push it?
Review of attachment 194187 [details] [review]: Looks good to me. I'll push it.
commit 20090aab16ad2fa168afa33a7af5fe11ca73f297 Author: Joey Zheng <joey@jzheng.org> Date: Wed Sep 7 13:14:17 2011 +0100 gconf-database-dbus: Allow setting the gconf values to the schema default Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=655954