[Xfce4-commits] <xfwm4:jeromeg/keyboard-shortcuts> Move shortcut names to libxfce4kbd-private.

Jérôme Guelfucci noreply at xfce.org
Wed Dec 19 17:40:02 CET 2012


Updating branch refs/heads/jeromeg/keyboard-shortcuts
         to eceb53b301158fa901c8a56ed43adcd5bd458ecf (commit)
       from ad0fe194157c9220e53255f30af2f9395e86da0d (commit)

commit eceb53b301158fa901c8a56ed43adcd5bd458ecf
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Wed Dec 19 17:37:11 2012 +0100

    Move shortcut names to libxfce4kbd-private.

 settings-dialogs/xfwm4-settings.c |   97 +++----------------------------------
 1 files changed, 8 insertions(+), 89 deletions(-)

diff --git a/settings-dialogs/xfwm4-settings.c b/settings-dialogs/xfwm4-settings.c
index 212e4e7..a2f4690 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -43,6 +43,7 @@
 #include <xfconf/xfconf.h>
 #include <libxfce4kbd-private/xfce-shortcut-dialog.h>
 #include <libxfce4kbd-private/xfce-shortcuts-provider.h>
+#include <libxfce4kbd-private/xfwm4-shortcut-values.h>
 
 #include "xfwm4-dialog_ui.h"
 #include "xfwm4-settings.h"
@@ -66,7 +67,6 @@
 
 
 typedef struct _MenuTemplate     MenuTemplate;
-typedef struct _ShortcutTemplate ShortcutTemplate;
 
 
 
@@ -198,13 +198,6 @@ struct _MenuTemplate
   const gchar *value;
 };
 
-struct _ShortcutTemplate
-{
-  const gchar *name;
-  const gchar *feature;
-  const gchar *shortcut;
-};
-
 enum
 {
   COL_THEME_NAME,
@@ -232,81 +225,7 @@ static const MenuTemplate title_align_values[] = {
   { NULL, NULL },
 };
 
-static const ShortcutTemplate shortcut_values[] = {
-  { N_("Window operations menu"), "popup_menu_key", NULL },
-  { N_("Up"), "up_key", NULL },
-  { N_("Down"), "down_key", NULL },
-  { N_("Left"), "left_key", NULL },
-  { N_("Right"), "right_key", NULL },
-  { N_("Cancel"), "cancel_key", NULL },
-  { N_("Cycle windows"), "cycle_windows_key", NULL },
-  { N_("Cycle windows (Reverse)"), "cycle_reverse_windows_key", NULL },
-  { N_("Switch window for same application"), "switch_window_key", NULL },
-  { N_("Switch application"), "switch_application_key", NULL },
-  { N_("Close window"), "close_window_key", NULL },
-  { N_("Maximize window horizontally"), "maximize_horiz_key", NULL },
-  { N_("Maximize window vertically"), "maximize_vert_key", NULL },
-  { N_("Maximize window"), "maximize_window_key", NULL },
-  { N_("Hide window"), "hide_window_key", NULL },
-  { N_("Move window"), "move_window_key", NULL },
-  { N_("Resize window"), "resize_window_key", NULL },
-  { N_("Shade window"), "shade_window_key", NULL },
-  { N_("Stick window"), "stick_window_key", NULL },
-  { N_("Raise window"), "raise_window_key", NULL },
-  { N_("Lower window"), "lower_window_key", NULL },
-  { N_("Raise or lower window"), "raiselower_window_key", NULL },
-  { N_("Fill window"), "fill_window_key", NULL },
-  { N_("Fill window horizontally"), "fill_horiz_key", NULL },
-  { N_("Fill window vertically"), "fill_vert_key", NULL },
-  { N_("Toggle above"), "above_key", NULL },
-  { N_("Toggle fullscreen"), "fullscreen_key", NULL },
-  { N_("Move window to upper workspace"), "move_window_up_workspace_key", NULL },
-  { N_("Move window to bottom workspace"), "move_window_down_workspace_key", NULL },
-  { N_("Move window to left workspace"), "move_window_left_workspace_key", NULL },
-  { N_("Move window to right workspace"), "move_window_right_workspace_key", NULL },
-  { N_("Move window to previous workspace"), "move_window_prev_workspace_key", NULL },
-  { N_("Move window to next workspace"), "move_window_next_workspace_key", NULL },
-  { N_("Move window to workspace 1"), "move_window_workspace_1_key", NULL, },
-  { N_("Move window to workspace 2"), "move_window_workspace_2_key", NULL, },
-  { N_("Move window to workspace 3"), "move_window_workspace_3_key", NULL, },
-  { N_("Move window to workspace 4"), "move_window_workspace_4_key", NULL, },
-  { N_("Move window to workspace 5"), "move_window_workspace_5_key", NULL, },
-  { N_("Move window to workspace 6"), "move_window_workspace_6_key", NULL, },
-  { N_("Move window to workspace 7"), "move_window_workspace_7_key", NULL, },
-  { N_("Move window to workspace 8"), "move_window_workspace_8_key", NULL, },
-  { N_("Move window to workspace 9"), "move_window_workspace_9_key", NULL, },
-  { N_("Move window to workspace 10"), "move_window_workspace_10_key", NULL, },
-  { N_("Move window to workspace 11"), "move_window_workspace_11_key", NULL, },
-  { N_("Move window to workspace 12"), "move_window_workspace_12_key", NULL, },
-  { N_("Tile window to the top"), "tile_up_key", NULL, },
-  { N_("Tile window to the bottom"), "tile_down_key", NULL, },
-  { N_("Tile window to the left"), "tile_left_key", NULL, },
-  { N_("Tile window to the right"), "tile_right_key", NULL, },
-  { N_("Show desktop"), "show_desktop_key", NULL },
-  { N_("Upper workspace"), "up_workspace_key", NULL },
-  { N_("Bottom workspace"), "down_workspace_key", NULL },
-  { N_("Left workspace"), "left_workspace_key", NULL },
-  { N_("Right workspace"), "right_workspace_key", NULL },
-  { N_("Previous workspace"), "prev_workspace_key", NULL },
-  { N_("Next workspace"), "next_workspace_key", NULL },
-  { N_("Workspace 1"), "workspace_1_key", NULL, },
-  { N_("Workspace 2"), "workspace_2_key", NULL, },
-  { N_("Workspace 3"), "workspace_3_key", NULL, },
-  { N_("Workspace 4"), "workspace_4_key", NULL, },
-  { N_("Workspace 5"), "workspace_5_key", NULL, },
-  { N_("Workspace 6"), "workspace_6_key", NULL, },
-  { N_("Workspace 7"), "workspace_7_key", NULL, },
-  { N_("Workspace 8"), "workspace_8_key", NULL, },
-  { N_("Workspace 9"), "workspace_9_key", NULL, },
-  { N_("Workspace 10"), "workspace_10_key", NULL, },
-  { N_("Workspace 11"), "workspace_11_key", NULL, },
-  { N_("Workspace 12"), "workspace_12_key", NULL, },
-  { N_("Add workspace"), "add_workspace_key", NULL },
-  { N_("Add adjacent workspace"), "add_adjacent_workspace_key", NULL },
-  { N_("Delete last workspace"), "del_workspace_key", NULL },
-  { N_("Delete active workspace"), "del_active_workspace_key", NULL },
-  { NULL, NULL, NULL }
-};
+
 
 static gboolean           opt_version = FALSE;
 static GdkNativeWindow    opt_socket_id = 0;
@@ -1704,12 +1623,12 @@ xfwm_settings_initialize_shortcuts (XfwmSettings *settings)
 
   gtk_list_store_clear (GTK_LIST_STORE (model));
 
-  for (i = 0; shortcut_values[i].name != NULL; ++i)
+  for (i = 0; xfwm4_shortcut_values[i].name != NULL; ++i)
     {
       gtk_list_store_append (GTK_LIST_STORE (model), &iter);
       gtk_list_store_set (GTK_LIST_STORE (model), &iter,
-                          SHORTCUTS_NAME_COLUMN, _(shortcut_values[i].name),
-                          SHORTCUTS_FEATURE_COLUMN, shortcut_values[i].feature,
+                          SHORTCUTS_NAME_COLUMN, _(xfwm4_shortcut_values[i].name),
+                          SHORTCUTS_FEATURE_COLUMN, xfwm4_shortcut_values[i].feature,
                           -1);
     }
 }
@@ -1910,10 +1829,10 @@ xfwm_settings_shortcut_feature_name (const gchar *feature)
   const gchar *result = feature;
   gint         i;
 
-  for (i = 0; shortcut_values[i].name != NULL; ++i)
-    if (G_UNLIKELY (g_str_equal (shortcut_values[i].feature, feature)))
+  for (i = 0; xfwm4_shortcut_values[i].name != NULL; ++i)
+    if (G_UNLIKELY (g_str_equal (xfwm4_shortcut_values[i].feature, feature)))
       {
-        result = shortcut_values[i].name;
+        result = xfwm4_shortcut_values[i].name;
         break;
       }
 


More information about the Xfce4-commits mailing list