--- control-center-2.17.91/capplets/keybindings/gnome-keybinding-properties.c.compiz-support 2007-02-12 04:28:24.000000000 -0500
+++ control-center-2.17.91/capplets/keybindings/gnome-keybinding-properties.c 2007-02-13 11:05:58.000000000 -0500
@@ -41,6 +41,11 @@
{ "/apps/gnome_settings_daemon/keybindings/search", ALWAYS_VISIBLE, 0 },
{ "/apps/gnome_settings_daemon/keybindings/email", ALWAYS_VISIBLE, 0 },
{ "/apps/gnome_settings_daemon/keybindings/www", ALWAYS_VISIBLE, 0 },
+ { NULL }
+};
+
+static const KeyListEntry desktop_key_list_metacity[] =
+{
{ "/apps/metacity/global_keybindings/panel_run_dialog", ALWAYS_VISIBLE, 0 },
{ "/apps/metacity/global_keybindings/panel_main_menu", ALWAYS_VISIBLE, 0 },
{ "/apps/metacity/global_keybindings/run_command_screenshot", ALWAYS_VISIBLE, 0 },
@@ -48,6 +53,19 @@
{ "/apps/metacity/global_keybindings/run_command_terminal", ALWAYS_VISIBLE, 0 },
{ NULL }
};
+
+#define COMPIZ_KEY(k) { "/apps/compiz/general/allscreens/options/" #k, ALWAYS_VISIBLE, 0 }
+
+static const KeyListEntry desktop_key_list_compiz[] =
+{
+ COMPIZ_KEY (run_key),
+ COMPIZ_KEY (main_menu_key),
+ COMPIZ_KEY (run_command_screenshot_key),
+ COMPIZ_KEY (run_command_window_screenshot_key),
+ COMPIZ_KEY (show_desktop_key),
+ { NULL }
+};
+
static const KeyListEntry sounds_key_list[] =
{
{ "/apps/gnome_settings_daemon/keybindings/volume_mute", ALWAYS_VISIBLE, 0 },
@@ -63,6 +81,26 @@
{ NULL }
};
+static const KeyListEntry compiz_key_list[] =
+{
+ COMPIZ_KEY (close_window_key),
+ COMPIZ_KEY (raise_window_key),
+ COMPIZ_KEY (lower_window_key),
+ COMPIZ_KEY (maximize_window_key),
+ COMPIZ_KEY (maximize_window_horizontally_key),
+ COMPIZ_KEY (maximize_window_vertically_key),
+ COMPIZ_KEY (minimize_window_key),
+ COMPIZ_KEY (opacity_decrease_key),
+ COMPIZ_KEY (opacity_increase_key),
+ COMPIZ_KEY (show_desktop_key),
+ COMPIZ_KEY (toggle_window_maximized_key),
+ COMPIZ_KEY (toggle_window_maximized_horizontally_key),
+ COMPIZ_KEY (toggle_window_maximized_vertically_key),
+ COMPIZ_KEY (toggle_window_shaded_key),
+ COMPIZ_KEY (unmaximize_window_key),
+ COMPIZ_KEY (window_menu_key),
+};
+
static const KeyListEntry metacity_key_list[] =
{
{ "/apps/metacity/window_keybindings/activate_window_menu", ALWAYS_VISIBLE, 0 },
@@ -466,10 +504,22 @@
i = 0;
gtk_tree_model_foreach (model, count_rows_foreach, &i);
- gtk_tree_store_append (GTK_TREE_STORE (model), &parent_iter, NULL);
- gtk_tree_store_set (GTK_TREE_STORE (model), &parent_iter,
- DESCRIPTION_COLUMN, title,
- -1);
+ if (title)
+ {
+ gtk_tree_store_append (GTK_TREE_STORE (model), &parent_iter, NULL);
+
+ gtk_tree_store_set (GTK_TREE_STORE (model), &parent_iter,
+ DESCRIPTION_COLUMN, title,
+ -1);
+ }
+ else
+ {
+ if (gtk_tree_model_get_iter_first (model, &parent_iter))
+ while (gtk_tree_model_iter_next (model, &parent_iter))
+ ;
+ else
+ return;
+ }
for (j = 0; keys_list[j].name != NULL; j++)
{
@@ -535,7 +585,9 @@
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
}
i++;
+
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, &parent_iter);
+
if (gconf_schema_get_short_desc (schema))
gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
DESCRIPTION_COLUMN,
@@ -566,12 +618,26 @@
clear_old_model (dialog);
append_keys_to_tree (dialog, _("Desktop"), desktop_key_list);
+
+ if (strcmp ((char *) wm_name, WM_COMMON_METACITY) == 0)
+ {
+ append_keys_to_tree (dialog, NULL, desktop_key_list_metacity);
+ }
+ else if (strcmp ((char *) wm_name, WM_COMMON_COMPIZ) == 0)
+ {
+ append_keys_to_tree (dialog, NULL, desktop_key_list_compiz);
+ }
+
append_keys_to_tree (dialog, _("Sound"), sounds_key_list);
if (strcmp((char *) wm_name, WM_COMMON_METACITY) == 0)
{
append_keys_to_tree (dialog, _("Window Management"), metacity_key_list);
}
+ else if (strcmp((char *) wm_name, WM_COMMON_COMPIZ) == 0)
+ {
+ append_keys_to_tree (dialog, _("Window Management"), compiz_key_list);
+ }
}
static void
--- control-center-2.17.91/capplets/common/wm-common.h.compiz-support 2007-01-02 07:47:02.000000000 -0500
+++ control-center-2.17.91/capplets/common/wm-common.h 2007-02-13 10:59:56.000000000 -0500
@@ -2,6 +2,7 @@
#define WM_COMMON_H
#define WM_COMMON_METACITY "Metacity"
+#define WM_COMMON_COMPIZ "compiz"
#define WM_COMMON_SAWFISH "Sawfish"
#define WM_COMMON_UNKNOWN "Unknown"