16459N/Adiff -uprN metacity-2.26.0/src/core/schema-bindings.c metacity-2.26.0-new/src/core/schema-bindings.c
16459N/A--- metacity-2.26.0/src/core/schema-bindings.c 2009-02-05 09:10:05.000000000 +0800
16459N/A+++ metacity-2.26.0-new/src/core/schema-bindings.c 2009-05-04 13:49:09.440307433 +0800
16459N/A@@ -87,6 +87,46 @@ single_stanza (gboolean is_window, const
16459N/A g_free (escaped_default_value);
16459N/A }
16459N/A
16459N/A+static void
16459N/A+single_list_stanza (gboolean is_window, const char *name,
16459N/A+ const char *default_value,
16459N/A+ gboolean can_reverse,
16459N/A+ const char *description)
16459N/A+{
16459N/A+ char *keybinding_type = is_window? "window": "global";
16459N/A+ char *escaped_default_value, *escaped_description;
16459N/A+
16459N/A+ if (description==NULL)
16459N/A+ return; /* it must be undocumented, so it can't go in this table */
16459N/A+
16459N/A+ escaped_description = g_markup_escape_text (description, -1);
16459N/A+ escaped_default_value = default_value==NULL? "disabled":
16459N/A+ g_markup_escape_text (default_value, -1);
16459N/A+
16459N/A+ fprintf (target_file, " <schema>\n");
16459N/A+ fprintf (target_file, " <key>/schemas/apps/metacity/%s_keybindings/%s_list</key>\n",
16459N/A+ keybinding_type, name);
16459N/A+ fprintf (target_file, " <applyto>/apps/metacity/%s_keybindings/%s_list</applyto>\n",
16459N/A+ keybinding_type, name);
16459N/A+ fprintf (target_file, " <owner>metacity</owner>\n");
16459N/A+ fprintf (target_file, " <type>list</type>\n");
16459N/A+ fprintf (target_file, " <list_type>string</list_type>\n");
16459N/A+ fprintf (target_file, " <default>[%s]</default>\n", escaped_default_value);
16459N/A+
16459N/A+ fprintf (target_file, " <locale name=\"C\">\n");
16459N/A+ fprintf (target_file, " <short>%s</short>\n", description);
16459N/A+ fprintf (target_file, " <long>%s</long>\n",
16459N/A+ can_reverse? about_reversible_keybindings:
16459N/A+ about_keybindings);
16459N/A+ fprintf (target_file, " </locale>\n");
16459N/A+ fprintf (target_file, " </schema>\n\n");
16459N/A+
16459N/A+ g_free (escaped_description);
16459N/A+
16459N/A+ if (default_value!=NULL)
16459N/A+ g_free (escaped_default_value);
16459N/A+}
16459N/A+
16459N/A static void produce_bindings ();
16459N/A
16459N/A static void
16459N/A@@ -130,6 +170,13 @@ produce_bindings ()
16459N/A stroke, \
16459N/A flags & BINDING_REVERSES, \
16459N/A description);
16459N/A+#define list_keybind(name, handler, param, flags, stroke, description) \
16459N/A+ single_list_stanza ( \
16459N/A+ flags & BINDING_PER_WINDOW, \
16459N/A+ #name, \
16459N/A+ stroke, \
16459N/A+ flags & BINDING_REVERSES, \
16459N/A+ description);
16459N/A #include "all-keybindings.h"
16459N/A #undef keybind
16459N/A }
16459N/Adiff -uprN metacity-2.26.0/src/include/all-keybindings.h metacity-2.26.0-new/src/include/all-keybindings.h
16459N/A--- metacity-2.26.0/src/include/all-keybindings.h 2009-02-05 09:10:04.000000000 +0800
16459N/A+++ metacity-2.26.0-new/src/include/all-keybindings.h 2009-05-04 13:54:10.708519198 +0800
16459N/A@@ -68,6 +68,10 @@
16459N/A #error "keybind () must be defined when you include screen-bindings.h"
16459N/A #endif
16459N/A
16459N/A+#ifndef list_keybind
16459N/A+#define list_keybind keybind
16459N/A+#endif
16459N/A+
16459N/A /***********************************/
16459N/A
16459N/A #ifndef _BINDINGS_DEFINED_CONSTANTS
16459N/A@@ -189,12 +193,20 @@ keybind (cycle_panels_backward, handl
16459N/A
16459N/A keybind (show_desktop, handle_show_desktop, 0, 0, "<Control><Alt>d",
16459N/A _("Hide all normal windows and set focus to the desktop"))
16459N/A+list_keybind (show_desktop, handle_show_desktop, 0, 0, "<Mod4>d",
16459N/A+ _("Hide all normal windows and set focus to the desktop"))
16459N/A keybind (panel_main_menu, handle_panel,
16459N/A META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0, "<Alt>F1",
16459N/A _("Show the panel's main menu"))
16459N/A+list_keybind (panel_main_menu, handle_panel,
16459N/A+ META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0, "<Control>Escape",
16459N/A+ _("Show the panel's main menu"))
16459N/A keybind (panel_run_dialog, handle_panel,
16459N/A META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0, "<Alt>F2",
16459N/A _("Show the panel's \"Run Application\" dialog box"))
16459N/A+list_keybind (panel_run_dialog, handle_panel,
16459N/A+ META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0, "<Mod4>r",
16459N/A+ _("Show the panel's \"Run Application\" dialog box"))
16459N/A
16459N/A /* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing
16459N/A * at some point.) The description is NULL here because the stanza is
16459N/A@@ -270,6 +282,8 @@ keybind (toggle_shaded, handle_toggle_sh
16459N/A _("Toggle shaded state"))
16459N/A keybind (minimize, handle_minimize, 0, BINDING_PER_WINDOW, "<Alt>F9",
16459N/A _("Minimize window"))
20311N/A+list_keybind (minimize, handle_minimize, 0, BINDING_PER_WINDOW, "SunOpen",
16459N/A+ _("Minimize window"))
16459N/A keybind (close, handle_close, 0, BINDING_PER_WINDOW, "<Alt>F4",
16459N/A _("Close window"))
16459N/A keybind (begin_move, handle_begin_move, 0, BINDING_PER_WINDOW, "<Alt>F7",
16725N/A@@ -338,7 +338,7 @@
16725N/A META_MOTION_DOWN, BINDING_PER_WINDOW, "<Control><Shift><Alt>Down",
16725N/A _("Move window one workspace down"))
16725N/A
16725N/A-keybind (raise_or_lower, handle_raise_or_lower, 0, BINDING_PER_WINDOW, NULL,
20311N/A+keybind (raise_or_lower, handle_raise_or_lower, 0, BINDING_PER_WINDOW, "SunFront",
16725N/A _("Raise window if it's covered by another window, otherwise lower it"))
16725N/A keybind (raise, handle_raise, 0, BINDING_PER_WINDOW, NULL,
16725N/A _("Raise window above other windows"))
17737N/A@@ -346,7 +360,7 @@ keybind (lower, handle_lower, 0, BINDING
17737N/A _("Lower window below other windows"))
17737N/A
17737N/A keybind (maximize_vertically, handle_maximize_vertically, 0,
17737N/A- BINDING_PER_WINDOW, NULL,
17737N/A+ BINDING_PER_WINDOW, "<Shift><Alt>F10",
17737N/A _("Maximize window vertically"))
17737N/A
17737N/A keybind (maximize_horizontally, handle_maximize_horizontally, 0,