GNOME Bugzilla – Bug 732383
keyboard: Use NULL rather than "" to disable keybindings
Last modified: 2014-08-18 08:15:42 UTC
NB: This is on top of the patches from bug #731618
Created attachment 279470 [details] [review] keyboard: Use NULL rather than "" to disable keybindings When disabling a keybinding, we set its value to { "", NULL } in gsettings (bindings are stored as arrays of strings). However, when a binding is disabled by default, its value is set to { NULL }, not to the empty string. The use of "" dates back to gconf where I think NULL was not a valid value. Now that we have switched to gsettings, we can use NULL rather than an artificial "".
Created attachment 279471 [details] [review] keyboard: Use NULL rather than "" to disable keybindings When disabling a keybinding, we set its value to { "", NULL } in gsettings (bindings are stored as arrays of strings). However, when a binding is disabled by default, its value is set to { NULL }, not to the empty string. The use of "" dates back to gconf where I think NULL was not a valid value. Now that we have switched to gsettings, we can use NULL rather than an artificial "". -- Same patch on top of current git master
Review of attachment 279471 [details] [review]: ok
Review of attachment 279471 [details] [review]: ::: panels/keyboard/keyboard-shortcuts.c @@ +1361,3 @@ if (response == GTK_RESPONSE_ACCEPT) { + g_object_set (G_OBJECT (conflict_item), "binding", NULL, NULL); data.conflict_item
Review of attachment 279471 [details] [review]: Marking as needs-work (doesn't compile without this change)
Review of attachment 279470 [details] [review]: Looks good, though it doesn't apply to gnome-3-12. Is that expected?
As mentioned in the first comment, "NB: This is on top of the patches from bug #731618", this is most likely the cause of the issues you had.
Ah forgot that the 2nd patch I attached here is supposed to be usable with git master :)
Created attachment 283676 [details] [review] keyboard: Use NULL rather than "" to disable keybindings When disabling a keybinding, we set its value to { "", NULL } in gsettings (bindings are stored as arrays of strings). However, when a binding is disabled by default, its value is set to { NULL }, not to the empty string. The use of "" dates back to gconf where I think NULL was not a valid value. Now that we have switched to gsettings, we can use NULL rather than an artificial "".
Updated patch now that the changes from bug #731618 landed in master
Review of attachment 283676 [details] [review]: Looks good.
Attachment 283676 [details] pushed as 2dbcb26 - keyboard: Use NULL rather than "" to disable keybindings