diff options
author | David Robillard <d@drobilla.net> | 2010-02-14 22:41:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-14 22:41:17 +0000 |
commit | 5a2252dafe6760cad89ca40ce1ca9432d192e5d4 (patch) | |
tree | 7409c4aeea1a58be08cf212e5326532c2956000d | |
parent | ca1ddcc761b6546f9b81d357466071634d573d36 (diff) | |
download | ingen-5a2252dafe6760cad89ca40ce1ca9432d192e5d4.tar.gz ingen-5a2252dafe6760cad89ca40ce1ca9432d192e5d4.tar.bz2 ingen-5a2252dafe6760cad89ca40ce1ca9432d192e5d4.zip |
Toggle sensitivity of voices spinbutton according to radio buttons.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2455 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/gui/LoadPatchWindow.cpp | 25 | ||||
-rw-r--r-- | src/gui/LoadPatchWindow.hpp | 2 |
2 files changed, 6 insertions, 21 deletions
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp index 4f724e6b..40f1be6d 100644 --- a/src/gui/LoadPatchWindow.cpp +++ b/src/gui/LoadPatchWindow.cpp @@ -55,8 +55,6 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno xml->get_widget("load_patch_ok_button", _ok_button); xml->get_widget("load_patch_cancel_button", _cancel_button); - _poly_voices_radio->signal_toggled().connect( - sigc::mem_fun(this, &LoadPatchWindow::enable_poly_spinner)); _cancel_button->signal_clicked().connect( sigc::mem_fun(this, &LoadPatchWindow::cancel_clicked)); _ok_button->signal_clicked().connect( @@ -65,6 +63,12 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno sigc::mem_fun(this, &LoadPatchWindow::merge_ports_selected)); _insert_ports_radio->signal_toggled().connect( sigc::mem_fun(this, &LoadPatchWindow::insert_ports_selected)); + _poly_from_file_radio->signal_toggled().connect(sigc::bind( + sigc::mem_fun(_poly_spinbutton, &Gtk::SpinButton::set_sensitive), + false)); + _poly_voices_radio->signal_toggled().connect(sigc::bind( + sigc::mem_fun(_poly_spinbutton, &Gtk::SpinButton::set_sensitive), + true)); signal_selection_changed().connect( sigc::mem_fun(this, &LoadPatchWindow::selection_changed)); @@ -130,23 +134,6 @@ LoadPatchWindow::on_show() } -///// Event Handlers ////// - - -void -LoadPatchWindow::disable_poly_spinner() -{ - _poly_spinbutton->property_sensitive() = false; -} - - -void -LoadPatchWindow::enable_poly_spinner() -{ - _poly_spinbutton->property_sensitive() = true; -} - - void LoadPatchWindow::merge_ports_selected() { diff --git a/src/gui/LoadPatchWindow.hpp b/src/gui/LoadPatchWindow.hpp index c8eafa1e..c23c4978 100644 --- a/src/gui/LoadPatchWindow.hpp +++ b/src/gui/LoadPatchWindow.hpp @@ -51,8 +51,6 @@ protected: void on_show(); private: - void disable_poly_spinner(); - void enable_poly_spinner(); void merge_ports_selected(); void insert_ports_selected(); |