[pan2] little fix for display of shortcut literals



commit c249f58f089f7443705f569797c10b6333097e54
Author: Heinrich MÃller <henmull src gnome org>
Date:   Sun Jul 1 16:44:28 2012 +0200

    little fix for display of shortcut literals

 pan/gui/prefs-ui.cc |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/pan/gui/prefs-ui.cc b/pan/gui/prefs-ui.cc
index 2328654..8fbfd52 100644
--- a/pan/gui/prefs-ui.cc
+++ b/pan/gui/prefs-ui.cc
@@ -36,6 +36,8 @@ extern "C" {
 #include "e-charset-dialog.h"
 #include "actions-extern.h"
 
+#include <algorithm>
+
 using namespace pan;
 
 namespace pan
@@ -419,6 +421,13 @@ namespace pan
     return hbox;
   }
 
+  std::string remove_underscores (std::string& src)
+  {
+    std::string res (src);
+    res.erase(std::remove(res.begin(), res.end(), '_'), res.end());
+    return res;
+  }
+
   void fill_pref_hotkeys(GtkWidget* t, int& row, Prefs& prefs, gpointer dialog_ptr)
   {
 
@@ -441,7 +450,7 @@ namespace pan
       data->value = stripped;
 
       w = new_hotkey_entry(keyval, it->first.c_str(), data);
-      std::string label = action_trans[stripped];
+      std::string label = remove_underscores(action_trans[stripped]);
       l = gtk_label_new(label.c_str());
       HIG :: workarea_add_row (t, &row, w, l);
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]