summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-02 03:40:56 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-02 03:40:56 +0000
commitad1ec2bacc95474c4c820e7484bbe53fff3f8b8f (patch)
treead10c8bd0abc4b715ba6420bfc3b1a7b413ada25 /libs
parent5423c457884f7c22ad7c00fdfe8b0ecff701a9c1 (diff)
get that fix for accels in tooltips correct this time
git-svn-id: svn://localhost/ardour2/branches/3.0@10856 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
index 7508b7e57f..30bb011efe 100644
--- a/libs/gtkmm2ext/gtk_ui.cc
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -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();