[Xfce4-commits] <xfwm4:master> Use new libxfce4kb-private functions for feature names.

Jérôme Guelfucci noreply at xfce.org
Sun Dec 30 15:46:09 CET 2012


Updating branch refs/heads/master
         to 1498e23fdbecad0d35c9cf53d7b29f55ec098213 (commit)
       from d2f828e9ee673bd5857852b77666e8949b7d9ac0 (commit)

commit 1498e23fdbecad0d35c9cf53d7b29f55ec098213
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Sun Dec 30 14:36:35 2012 +0100

    Use new libxfce4kb-private functions for feature names.
    
    The strings are now translated.

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

diff --git a/settings-dialogs/xfwm4-settings.c b/settings-dialogs/xfwm4-settings.c
index e621141..15a83e7 100644
--- a/settings-dialogs/xfwm4-settings.c
+++ b/settings-dialogs/xfwm4-settings.c
@@ -43,7 +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 <libxfce4kbd-private/xfce-shortcuts-xfwm4.h>
 
 #include "xfwm4-dialog_ui.h"
 #include "xfwm4-settings.h"
@@ -1621,7 +1621,7 @@ xfwm_settings_initialize_shortcuts (XfwmSettings *settings)
   GtkTreeModel *model;
   GtkTreeIter   iter;
   GtkWidget    *view;
-  gint          i;
+  GList        *feature_list;
 
   g_return_if_fail (XFWM_IS_SETTINGS (settings));
   g_return_if_fail (GTK_IS_BUILDER (settings->priv->builder));
@@ -1631,13 +1631,21 @@ xfwm_settings_initialize_shortcuts (XfwmSettings *settings)
 
   gtk_list_store_clear (GTK_LIST_STORE (model));
 
-  for (i = 0; xfwm4_shortcut_values[i].name != NULL; ++i)
+  if (feature_list = xfce_shortcuts_xfwm4_get_feature_list ())
     {
-      gtk_list_store_append (GTK_LIST_STORE (model), &iter);
-      gtk_list_store_set (GTK_LIST_STORE (model), &iter,
-                          SHORTCUTS_NAME_COLUMN, _(xfwm4_shortcut_values[i].name),
-                          SHORTCUTS_FEATURE_COLUMN, xfwm4_shortcut_values[i].feature,
-                          -1);
+      GList *l;
+
+      for (l = g_list_first (feature_list); l != NULL; l = g_list_next (l))
+        {
+          gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+          gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+                              SHORTCUTS_NAME_COLUMN,
+                              xfce_shortcuts_xfwm4_get_feature_name (l->data),
+                              SHORTCUTS_FEATURE_COLUMN, l->data,
+                              -1);
+        }
+
+      g_list_free (feature_list);
     }
 }
 


More information about the Xfce4-commits mailing list