From 66af3fbda0bb519dfd73f8e6bda6a7e11b7f806e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 25 Jun 2014 12:12:01 -0400 Subject: [PATCH] add slider control to GUI tab of preferences for lock timeout --- gtk2_ardour/rc_option_editor.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 378057b1b3..3e5f3bf080 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -44,6 +44,7 @@ #include "canvas/wave_view.h" +#include "ardour_ui.h" #include "ardour_window.h" #include "ardour_dialog.h" #include "gui_thread.h" @@ -2174,6 +2175,21 @@ RCOptionEditor::RCOptionEditor () sigc::mem_fun (*_rc_config, &RCConfiguration::set_super_rapid_clock_update) )); + /* Lock GUI timeout */ + + Gtk::Adjustment *lts = manage (new Gtk::Adjustment(0, 0, 1000, 1, 10)); + HSliderOption *slts = new HSliderOption("lock-gui-after-seconds", + _("Lock timeout (seconds)"), + lts, + sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::get_lock_gui_after_seconds), + sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::set_lock_gui_after_seconds) + ); + slts->scale().set_digits (0); + Gtkmm2ext::UI::instance()->set_tip + (slts->tip_widget(), + _("Lock GUI after this many idle seconds (zero to never lock)")); + add_option (S_("Preferences|GUI"), slts); + /* The names of these controls must be the same as those given in MixerStrip for the actual widgets being controlled. */