summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/LoadPatchWindow.cpp25
-rw-r--r--src/gui/LoadPatchWindow.hpp2
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();