GNOME Bugzilla – Bug 653613
Support string array keybindings
Last modified: 2011-06-30 12:26:12 UTC
Metacity/Mutter supports either a single string or an array of strings to specify keybindings. With the port to GSettings, the former will be dropped and all keybindings are always stored as array of strings. I don't think it makes sense to expose multiple bindings per action in the UI, but unless we drop all wm shortcuts we'll have to support string array keybindings ... The attached patch adds this support for bindings from GSettings, I don't see much of a point in doing the same for GConf. (The first patch which fixes a small leak is unrelated, but attaching it here anyway as it shows up in the diff context of the second one ...)
Created attachment 190905 [details] [review] keyboard: Fix a small memory leak Unless g_conf_client_get_string(), g_settings_get_string() always returns a newly allocated string.
Created attachment 190906 [details] [review] keyboard: Support string array keybindings Metacity/Mutter stores keybindings as string array to support multiple bindings per action. Even though multiple bindings are not exposed in the UI, support keybindings stored as string array by getting/setting the first element of the array.
Review of attachment 190905 [details] [review]: Looks good.
Review of attachment 190906 [details] [review]: Looks good. Should this wait until mutter is ported to gsettings?
Comment on attachment 190905 [details] [review] keyboard: Fix a small memory leak Attachment 190905 [details] pushed as a6d3ad6 - keyboard: Fix a small memory leak
Attachment 190906 [details] pushed as b72c71a - keyboard: Support string array keybindings (In reply to comment #4) > Looks good. Should this wait until mutter is ported to gsettings? Nah, let's get this off the queue. I'll do some more work on the keybindings code in metacity/mutter, but the schema will definitively use string arrays - the current gconf way of using both binding_name and binding_name_list is just too insane ...