diff options
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/option_editor.cc | 13 | ||||
-rw-r--r-- | gtk2_ardour/option_editor.h | 14 |
2 files changed, 24 insertions, 3 deletions
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index 02a930aa7f..ef09b22898 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -28,6 +28,7 @@ #include "ardour/dB.h" #include "ardour/session.h" +#include "public_editor.h" #include "option_editor.h" #include "gui_thread.h" #include "i18n.h" @@ -139,6 +140,18 @@ BoolOption::toggled () _set (_button->get_active ()); } +RouteDisplayBoolOption::RouteDisplayBoolOption (string const & i, string const & n, sigc::slot<bool> g, sigc::slot<bool, bool> s) + : BoolOption (i, n, g, s) +{ +} + +void +RouteDisplayBoolOption::toggled () +{ + DisplaySuspender ds; + BoolOption::toggled (); +} + EntryOption::EntryOption (string const & i, string const & n, sigc::slot<string> g, sigc::slot<bool, string> s) : Option (i, n), _get (g), diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h index f42d1da9b7..4e3269e43c 100644 --- a/gtk2_ardour/option_editor.h +++ b/gtk2_ardour/option_editor.h @@ -169,11 +169,11 @@ public: _button->set_sensitive (yn); } - Gtk::Widget& tip_widget() { return *_button; } + Gtk::Widget& tip_widget() { return *_button; } -private: +protected: - void toggled (); + virtual void toggled (); sigc::slot<bool> _get; ///< slot to get the configuration variable's value sigc::slot<bool, bool> _set; ///< slot to set the configuration variable's value @@ -181,6 +181,14 @@ private: Gtk::Label* _label; ///< label for button, so we can use markup }; +class RouteDisplayBoolOption : public BoolOption +{ +public: + RouteDisplayBoolOption (std::string const &, std::string const &, sigc::slot<bool>, sigc::slot<bool, bool>); +protected: + virtual void toggled (); +}; + /** Component which allows to add any GTK Widget - intended for single buttons and custom stateless objects */ class FooOption : public OptionEditorComponent { |