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
This commit is contained in:
parent
94297c70e1
commit
0d61f205ab
@ -719,6 +719,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||
|
||||
int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
|
||||
int ambiguous_file (std::string file, std::string path, std::vector<std::string> hits);
|
||||
|
||||
bool click_button_clicked (GdkEventButton *);
|
||||
};
|
||||
|
||||
#endif /* __ardour_gui_h__ */
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1101,7 +1101,7 @@ Editor::button_press_handler_2 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
|
||||
case MouseZoom:
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
|
||||
temporal_zoom_session();
|
||||
temporal_zoom_to_frame (false, event_frame (event));
|
||||
} else {
|
||||
temporal_zoom_to_frame (true, event_frame(event));
|
||||
}
|
||||
|
@ -302,3 +302,20 @@ OptionEditor::add_option (std::string const & pn, OptionEditorComponent* o)
|
||||
o->add_to_page (p);
|
||||
o->set_state_from_config ();
|
||||
}
|
||||
|
||||
void
|
||||
OptionEditor::set_current_page (string const & p)
|
||||
{
|
||||
int i = 0;
|
||||
while (i < _notebook.get_n_pages ()) {
|
||||
if (_notebook.get_tab_label_text (*_notebook.get_nth_page (i)) == p) {
|
||||
_notebook.set_current_page (i);
|
||||
return;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -400,6 +400,8 @@ public:
|
||||
|
||||
void add_option (std::string const &, OptionEditorComponent *);
|
||||
|
||||
void set_current_page (std::string const &);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void parameter_changed (std::string const &);
|
||||
|
Loading…
Reference in New Issue
Block a user