get that fix for accels in tooltips correct this time
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 2 Dec 2011 03:40:56 +0000 (03:40 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 2 Dec 2011 03:40:56 +0000 (03:40 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10856 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/gtkmm2ext/gtk_ui.cc

index 7508b7e57f9a49ff6abd18725b483d7b5c7c8137..30bb011efe33d966ce1b54dea2717e401ce08357 100644 (file)
@@ -351,8 +351,13 @@ UI::set_tip (Widget *w, const gchar *tip, const gchar *hlp)
                ustring ap = action->get_accel_path();
                if (!ap.empty()) {
                        bool has_key = ActionManager::lookup_entry(ap, key);
-                       if (has_key && key.get_abbrev() != "") {
-                               msg.append("\n\nKey: ").append(key.get_abbrev());
+                       if (has_key) {
+                               string  abbrev = key.get_abbrev();
+                               if (!abbrev.empty()) {
+                                       replace_all (abbrev, "<", "");
+                                       replace_all (abbrev, ">", "-");
+                                       msg.append("\n\nKey: ").append (abbrev);
+                               }
                        }
                }
        }
@@ -361,8 +366,6 @@ UI::set_tip (Widget *w, const gchar *tip, const gchar *hlp)
                return;
        }
 
-       replace_all (msg, "<", "");
-       replace_all (msg, ">", "-");
 
        req->widget = w;
        req->msg = msg.c_str();