After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732383 - keyboard: Use NULL rather than "" to disable keybindings
keyboard: Use NULL rather than "" to disable keybindings
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Keyboard
unspecified
Other All
: Normal normal
: ---
Assigned To: Rui Matos
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-28 11:05 UTC by Christophe Fergeau
Modified: 2014-08-18 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keyboard: Use NULL rather than "" to disable keybindings (2.59 KB, patch)
2014-06-28 11:05 UTC, Christophe Fergeau
reviewed Details | Review
keyboard: Use NULL rather than "" to disable keybindings (1.95 KB, patch)
2014-06-28 11:07 UTC, Christophe Fergeau
needs-work Details | Review
keyboard: Use NULL rather than "" to disable keybindings (2.59 KB, patch)
2014-08-17 18:30 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2014-06-28 11:05:02 UTC
NB: This is on top of the patches from bug #731618
Comment 1 Christophe Fergeau 2014-06-28 11:05:06 UTC
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 "".
Comment 2 Christophe Fergeau 2014-06-28 11:07:09 UTC
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
Comment 3 Rui Matos 2014-06-29 15:29:06 UTC
Review of attachment 279471 [details] [review]:

ok
Comment 4 Rui Matos 2014-06-29 15:32:19 UTC
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
Comment 5 Bastien Nocera 2014-07-18 16:08:54 UTC
Review of attachment 279471 [details] [review]:

Marking as needs-work (doesn't compile without this change)
Comment 6 Bastien Nocera 2014-07-18 16:09:50 UTC
Review of attachment 279470 [details] [review]:

Looks good, though it doesn't apply to gnome-3-12. Is that expected?
Comment 7 Christophe Fergeau 2014-07-28 14:08:01 UTC
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.
Comment 8 Christophe Fergeau 2014-07-28 23:00:38 UTC
Ah forgot that the 2nd patch I attached here is supposed to be usable with git master :)
Comment 9 Christophe Fergeau 2014-08-17 18:30:25 UTC
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 "".
Comment 10 Christophe Fergeau 2014-08-17 18:31:39 UTC
Updated patch now that the changes from bug #731618 landed in master
Comment 11 Bastien Nocera 2014-08-17 22:02:33 UTC
Review of attachment 283676 [details] [review]:

Looks good.
Comment 12 Christophe Fergeau 2014-08-18 08:15:36 UTC
Attachment 283676 [details] pushed as 2dbcb26 - keyboard: Use NULL rather than "" to disable keybindings