summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui2.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-02-17 18:53:31 +0000
committerCarl Hetherington <carl@carlh.net>2011-02-17 18:53:31 +0000
commit0d61f205ab4432480dc0e12787774f1d859f2dbf (patch)
tree2f7814390661bd344d53651f466e9941bfa2e94e /gtk2_ardour/ardour_ui2.cc
parent94297c70e1644e5868eb834586ab173e7eaf2b33 (diff)
Bring up the click tab of the RC options window when right-clicking on the click button (#3783).
git-svn-id: svn://localhost/ardour2/branches/3.0@8889 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui2.cc')
-rw-r--r--gtk2_ardour/ardour_ui2.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc
index a55f62976e..87d119bd47 100644
--- a/gtk2_ardour/ardour_ui2.cc
+++ b/gtk2_ardour/ardour_ui2.cc
@@ -52,6 +52,7 @@
#include "midi_tracer.h"
#include "global_port_matrix.h"
#include "location_ui.h"
+#include "rc_option_editor.h"
#include "i18n.h"
@@ -340,6 +341,8 @@ ARDOUR_UI::setup_transport ()
ActionManager::get_action ("Transport", "TogglePunchIn")->connect_proxy (punch_in_button);
ActionManager::get_action ("Transport", "TogglePunchOut")->connect_proxy (punch_out_button);
+ click_button.signal_button_press_event().connect (sigc::mem_fun (*this, &ARDOUR_UI::click_button_clicked), false);
+
preroll_button.set_name ("TransportButton");
postroll_button.set_name ("TransportButton");
@@ -965,3 +968,21 @@ ARDOUR_UI::restore_editing_space ()
transport_tearoff->set_visible (true);
editor->restore_editing_space ();
}
+
+bool
+ARDOUR_UI::click_button_clicked (GdkEventButton* ev)
+{
+ if (ev->button != 3) {
+ /* this handler is just for button-3 clicks */
+ return false;
+ }
+
+ RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleRCOptionsEditor"));
+ assert (act);
+
+ RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic (act);
+ tact->set_active ();
+
+ rc_option_editor->set_current_page (_("Misc"));
+ return true;
+}