Moving to GSettings

"7 Days of Shooting" 23 Oct 2007 - DigitalIn the beginning, Metacity stored keybindings in GConf.  There was one GConf key for each action, and the string value gave the key bound to it.  If it was undefined or “disabled”, there would be no key bound to that action.

In 2005 , GNOME bug 164831 raised the point that other platforms used several keybindings for some of the actions. For example, the command to show the main menu is alt-f1 in CUA, but ctrl-Esc in Windows.  We decided to find a way to support mulitple keybindings for the sake of people transitioning from these systems.

This posed a further problem.  There is or was a principle that GConf configuration should be both forwards and backwards compatible.  In other words, if you take a Metacity configuration from any point in time, it should work as well as possible with every other version of Metacity, both later and earlier.  This meant that we couldn’t change the format of the single string keys.  So instead we created two keys: one, the original key, took a single string, and the other, a new key, took a list of strings.  This worked, but resulted in everything getting a lot more complicated.  It’s not clear that it was ever widely used.

Now, in GNOME bug 621204, there is a laudable move to switch Metacity to using the new GSettings API. The dual nature of the keybinding settings makes this problematic.  We could proceed by:

  • implementing it exactly as it is currently, even though it’s fiddly;
  • removing the ability to use multiple keybindings for the same action, even though that would break compatibility;
  • making all keybinding settings be lists of strings;
  • making all keybindings be represented by one very large settings, a list of pairs of strings.

Gentle reader, your thoughts on this are welcome, here or on the bug.

Photo © Matthew Boyle, cc-by-nc

Metacity 2.20.1 is out

Metacity 2.20.1 is out, with some regression fixes and various other improvements.

Thanks to Alex Turner, Jens Granseuer, Owen Taylor, Federico Mena Quintero, and Elijah Newren for improvements in this release.

  • Fix markup parsing problems with long titles for the alt-tab popup (Alex) [#360274]
  • Fix memory leak in widget previewer (Jens) [#469682]
  • Don’t immediately unminimize an initially iconic window (Owen) [#491090]
  • Fix argument reversal breaking timestamp retreival and focus stealing prevention (Federico) [#488468]
  • Improve heuristic for focus stealing prevention with transients when no timestamp is available (Elijah) [#488468]

Djihed Afifi (ar), Metin Amiroff (az), Alexander Shopov (bg), Jordi Mallach (ca), David Lodge (en_GB), Jorge González (es), Iñaki Larrañaga Murgoitio (eu), Alastair McKinstry (ga), Ankit Patel (gu), Rajesh Ranjan (hi), “Last-Translator: auto\n” (hr), Changwoo Ryu (ko), Raivis Dejus (lv), Wouter Bolsterlee (nl), Gora Mohanty (or), ASB (pa), wadim dziedzic (pl), Og Maciel (pt_BR), Duarte Loreto (pt), Peter Tuhársky (sk), Maxim Dziumanenko (uk), Funda Wang (zh_CN)