changes to support new key bindings editor design
This commit is contained in:
parent
40cdb01832
commit
2c6799f247
|
@ -333,6 +333,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
bool tabbed_window_state_event_handler (GdkEventWindowState*, void* object);
|
bool tabbed_window_state_event_handler (GdkEventWindowState*, void* object);
|
||||||
bool key_event_handler (GdkEventKey*, Gtk::Window* window);
|
bool key_event_handler (GdkEventKey*, Gtk::Window* window);
|
||||||
|
|
||||||
|
Gtkmm2ext::ActionMap global_actions;
|
||||||
|
Gtkmm2ext::Bindings global_bindings;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class PublicEditor;
|
friend class PublicEditor;
|
||||||
|
|
||||||
|
@ -648,7 +651,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
Gtk::HBox rc_option_editor_placeholder;
|
Gtk::HBox rc_option_editor_placeholder;
|
||||||
|
|
||||||
WM::Proxy<SpeakerDialog> speaker_config_window;
|
WM::Proxy<SpeakerDialog> speaker_config_window;
|
||||||
WM::Proxy<KeyEditor> key_editor;
|
|
||||||
WM::Proxy<AddRouteDialog> add_route_dialog;
|
WM::Proxy<AddRouteDialog> add_route_dialog;
|
||||||
WM::Proxy<About> about;
|
WM::Proxy<About> about;
|
||||||
WM::Proxy<LocationUIWindow> location_ui;
|
WM::Proxy<LocationUIWindow> location_ui;
|
||||||
|
@ -664,6 +666,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
|
WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
|
||||||
WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
|
WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
|
||||||
WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
|
WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
|
||||||
|
WM::ProxyWithConstructor<KeyEditor> key_editor;
|
||||||
|
|
||||||
/* creator methods */
|
/* creator methods */
|
||||||
|
|
||||||
|
@ -672,7 +675,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
AddVideoDialog* create_add_video_dialog ();
|
AddVideoDialog* create_add_video_dialog ();
|
||||||
BigClockWindow* create_big_clock_window();
|
BigClockWindow* create_big_clock_window();
|
||||||
GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
|
GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
|
||||||
|
KeyEditor* create_key_editor ();
|
||||||
|
|
||||||
ARDOUR::SystemExec *video_server_process;
|
ARDOUR::SystemExec *video_server_process;
|
||||||
|
|
||||||
void handle_locations_change (ARDOUR::Location*);
|
void handle_locations_change (ARDOUR::Location*);
|
||||||
|
@ -828,8 +832,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
bool main_window_delete_event (GdkEventAny*);
|
bool main_window_delete_event (GdkEventAny*);
|
||||||
bool idle_ask_about_quit ();
|
bool idle_ask_about_quit ();
|
||||||
|
|
||||||
Gtkmm2ext::ActionMap global_actions;
|
|
||||||
Gtkmm2ext::Bindings global_bindings;
|
|
||||||
void load_bindings ();
|
void load_bindings ();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -473,6 +473,18 @@ ARDOUR_UI::new_midi_tracer_window ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KeyEditor*
|
||||||
|
ARDOUR_UI::create_key_editor ()
|
||||||
|
{
|
||||||
|
KeyEditor* kedit = new KeyEditor;
|
||||||
|
|
||||||
|
kedit->add_tab (_("Global"), global_bindings);
|
||||||
|
kedit->add_tab (_("Editing"), editor->bindings);
|
||||||
|
kedit->add_tab (_("Mixing"), mixer->bindings);
|
||||||
|
|
||||||
|
return kedit;
|
||||||
|
}
|
||||||
|
|
||||||
BundleManager*
|
BundleManager*
|
||||||
ARDOUR_UI::create_bundle_manager ()
|
ARDOUR_UI::create_bundle_manager ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -471,7 +471,7 @@ Editor::Editor ()
|
||||||
last_event_time.tv_sec = 0;
|
last_event_time.tv_sec = 0;
|
||||||
last_event_time.tv_usec = 0;
|
last_event_time.tv_usec = 0;
|
||||||
|
|
||||||
global_hpacker.set_data ("ardour-bindings", &key_bindings);
|
global_hpacker.set_data ("ardour-bindings", &bindings);
|
||||||
|
|
||||||
selection_op_history.clear();
|
selection_op_history.clear();
|
||||||
before.clear();
|
before.clear();
|
||||||
|
@ -5862,7 +5862,7 @@ Editor::use_own_window (bool and_fill_it)
|
||||||
|
|
||||||
// win->signal_realize().connect (*this, &Editor::on_realize);
|
// win->signal_realize().connect (*this, &Editor::on_realize);
|
||||||
win->signal_event().connect (sigc::mem_fun (*this, &Editor::generic_event_handler));
|
win->signal_event().connect (sigc::mem_fun (*this, &Editor::generic_event_handler));
|
||||||
win->set_data ("ardour-bindings", &key_bindings);
|
win->set_data ("ardour-bindings", &bindings);
|
||||||
|
|
||||||
update_title ();
|
update_title ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -551,7 +551,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
bool constructed;
|
bool constructed;
|
||||||
Gtkmm2ext::ActionMap myactions;
|
Gtkmm2ext::ActionMap myactions;
|
||||||
Gtkmm2ext::Bindings key_bindings;
|
|
||||||
|
|
||||||
// to keep track of the playhead position for control_scroll
|
// to keep track of the playhead position for control_scroll
|
||||||
boost::optional<framepos_t> _control_scroll_target;
|
boost::optional<framepos_t> _control_scroll_target;
|
||||||
|
|
|
@ -754,8 +754,8 @@ Editor::register_actions ()
|
||||||
void
|
void
|
||||||
Editor::load_bindings ()
|
Editor::load_bindings ()
|
||||||
{
|
{
|
||||||
key_bindings.set_action_map (myactions);
|
bindings.set_action_map (myactions);
|
||||||
key_bindings.load ("editor");
|
bindings.load ("editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -35,7 +35,7 @@ using namespace Gtk;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using Gtkmm2ext::Keyboard;
|
using Gtkmm2ext::Keyboard;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
accel_map_changed (GtkAccelMap* /*map*/,
|
accel_map_changed (GtkAccelMap* /*map*/,
|
||||||
gchar* /*path*/,
|
gchar* /*path*/,
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "canvas/fwd.h"
|
#include "canvas/fwd.h"
|
||||||
|
|
||||||
#include "gtkmm2ext/actions.h"
|
#include "gtkmm2ext/actions.h"
|
||||||
|
#include "gtkmm2ext/bindings.h"
|
||||||
#include "gtkmm2ext/tabbable.h"
|
#include "gtkmm2ext/tabbable.h"
|
||||||
#include "gtkmm2ext/visibility_tracker.h"
|
#include "gtkmm2ext/visibility_tracker.h"
|
||||||
|
|
||||||
|
@ -421,6 +422,8 @@ class PublicEditor : public Gtkmm2ext::Tabbable {
|
||||||
PBD::Signal0<void> SnapChanged;
|
PBD::Signal0<void> SnapChanged;
|
||||||
PBD::Signal0<void> MouseModeChanged;
|
PBD::Signal0<void> MouseModeChanged;
|
||||||
|
|
||||||
|
Gtkmm2ext::Bindings bindings;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class DisplaySuspender;
|
friend class DisplaySuspender;
|
||||||
virtual void suspend_route_redisplay () = 0;
|
virtual void suspend_route_redisplay () = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user