summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2006-04-21 16:29:02 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2006-04-21 16:29:02 +0000
commitf81f877adffccffd5ada8431faa567db81122fee (patch)
tree7522128bc8a987ab128dc3800cc19a4925cdeede /gtk2_ardour
parent2ce07f34e2aa36eed04753a4a24248e96134dd0b (diff)
Fixup for comments editor blocking presses to its button
git-svn-id: svn://localhost/trunk/ardour2@462 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/mixer_strip.cc60
1 files changed, 29 insertions, 31 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 4b8846e9ac..1a65a56eb8 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -1050,42 +1050,40 @@ MixerStrip::comment_button_clicked ()
}
if (comment_window->is_visible()) {
- comment_window->hide ();
- return;
+ string str = comment_area->get_buffer()->get_text();
+ if (_route.comment() != str) {
+ _route.set_comment (str, this);
+
+ switch (_width) {
+
+ case Wide:
+ if (! str.empty()) {
+ comment_button.set_label (_("*Comments*"));
+ } else {
+ comment_button.set_label (_("Comments"));
+ }
+ break;
+
+ case Narrow:
+ if (! str.empty()) {
+ comment_button.set_label (_("*Cmt*"));
+ } else {
+ comment_button.set_label (_("Cmt"));
+ }
+ break;
+ }
+
+ ARDOUR_UI::instance()->tooltips().set_tip (comment_button,
+ str.empty() ? _("Click to Add/Edit Comments") : str);
+ }
+ comment_window->hide ();
+ return;
}
-
+
comment_window->set_position (Gtk::WIN_POS_MOUSE);
comment_window->show();
comment_window->present();
- comment_window->run(); // we don't care what the response is
- comment_window->hide();
- string str = comment_area->get_buffer()->get_text();
- if (_route.comment() != str) {
- _route.set_comment (str, this);
-
- switch (_width) {
-
- case Wide:
- if (! str.empty()) {
- comment_button.set_label (_("*Comments*"));
- } else {
- comment_button.set_label (_("Comments"));
- }
- break;
-
- case Narrow:
- if (! str.empty()) {
- comment_button.set_label (_("*Cmt*"));
- } else {
- comment_button.set_label (_("Cmt"));
- }
- break;
- }
-
- ARDOUR_UI::instance()->tooltips().set_tip (comment_button,
- str.empty() ? _("Click to Add/Edit Comments") : str);
- }
}
void