diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-30 16:32:38 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-06-30 16:32:38 -0400 |
commit | e8fc8aa992f7fad798935de227e2a15d0a075c71 (patch) | |
tree | 3cdad72026800fc28874b73492d3a14279c0257c /gtk2_ardour | |
parent | d816c225a4c4a433d8857dca79395fbf73d9476c (diff) |
new UI config var to allow playhead to be optionally draggable (default is: yes, it can be dragged)
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor.cc | 12 | ||||
-rw-r--r-- | gtk2_ardour/editor_cursors.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/editor_cursors.h | 1 | ||||
-rw-r--r-- | gtk2_ardour/rc_option_editor.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/ui_config_vars.h | 1 |
5 files changed, 27 insertions, 1 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 042d03fa57..a837a5a429 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -121,6 +121,7 @@ #include "tempo_lines.h" #include "time_axis_view.h" #include "utils.h" +#include "verbose_cursor.h" #include "i18n.h" @@ -760,9 +761,14 @@ Editor::Editor () } constructed = true; - instant_save (); + + /* grab current parameter state */ + boost::function<void (string)> pc (boost::bind (&Editor::ui_parameter_changed, this, _1)); + ARDOUR_UI::config()->map_parameters (pc); setup_fade_images (); + + instant_save (); } Editor::~Editor() @@ -5506,5 +5512,9 @@ Editor::ui_parameter_changed (string parameter) _cursor_stack.pop(); } _cursors->set_cursor_set (ARDOUR_UI::config()->get_icon_set()); + } else if (parameter == "draggable-playhead") { + if (_verbose_cursor) { + playhead_cursor->set_sensitive (ARDOUR_UI::config()->get_draggable_playhead()); + } } } diff --git a/gtk2_ardour/editor_cursors.cc b/gtk2_ardour/editor_cursors.cc index 12dab1e83d..ffe6fc0d01 100644 --- a/gtk2_ardour/editor_cursors.cc +++ b/gtk2_ardour/editor_cursors.cc @@ -88,3 +88,9 @@ EditorCursor::set_color (ArdourCanvas::Color color) { _track_canvas_item->set_color (color); } + +void +EditorCursor::set_sensitive (bool yn) +{ + _track_canvas_item->set_ignore_events (!yn); +} diff --git a/gtk2_ardour/editor_cursors.h b/gtk2_ardour/editor_cursors.h index 7915e37205..50958d1ac0 100644 --- a/gtk2_ardour/editor_cursors.h +++ b/gtk2_ardour/editor_cursors.h @@ -37,6 +37,7 @@ class EditorCursor { void show (); void hide (); void set_color (ArdourCanvas::Color); + void set_sensitive (bool); framepos_t current_frame () const { return _current_frame; diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 8643bf136a..c843276683 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -2142,6 +2142,14 @@ RCOptionEditor::RCOptionEditor () add_option (S_("Preferences|GUI"), new BoolOption ( + "draggable-playhead", + _("Allow dragging of playhead"), + sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::get_draggable_playhead), + sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::set_draggable_playhead) + )); + + add_option (S_("Preferences|GUI"), + new BoolOption ( "widget-prelight", _("Graphically indicate mouse pointer hovering over various widgets"), sigc::mem_fun (*_rc_config, &RCConfiguration::get_widget_prelight), diff --git a/gtk2_ardour/ui_config_vars.h b/gtk2_ardour/ui_config_vars.h index e2141128cf..44c2837abe 100644 --- a/gtk2_ardour/ui_config_vars.h +++ b/gtk2_ardour/ui_config_vars.h @@ -26,4 +26,5 @@ UI_CONFIG_VARIABLE(bool, all_floating_windows_are_dialogs, "all-floating-windows UI_CONFIG_VARIABLE (bool, color_regions_using_track_color, "color-regions-using-track-color", false) UI_CONFIG_VARIABLE (bool, show_waveform_clipping, "show-waveform-clipping", true) UI_CONFIG_VARIABLE (uint32_t, lock_gui_after_seconds, "lock-gui-after-seconds", 0) +UI_CONFIG_VARIABLE (bool, draggable_playhead, "draggable-playhead", true) |