mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
modification to make generic MIDI actually work again
git-svn-id: svn://localhost/ardour2/trunk@673 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
05f8fcd189
commit
26843b34fd
14 changed files with 142 additions and 24 deletions
|
|
@ -62,7 +62,8 @@ BindingProxy::button_press_handler (GdkEventButton *ev)
|
|||
if (Controllable::StartLearning (&controllable)) {
|
||||
string prompt = _("operate controller now");
|
||||
prompter.set_text (prompt);
|
||||
prompter.show_all ();
|
||||
prompter.touch (); // shows popup
|
||||
learning_connection = controllable.LearningFinished.connect (mem_fun (*this, &BindingProxy::learning_finished));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -70,9 +71,18 @@ BindingProxy::button_press_handler (GdkEventButton *ev)
|
|||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
BindingProxy::learning_finished ()
|
||||
{
|
||||
learning_connection.disconnect ();
|
||||
prompter.touch (); // hides popup
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BindingProxy::prompter_hiding (GdkEventAny *ev)
|
||||
{
|
||||
learning_connection.disconnect ();
|
||||
Controllable::StopLearning (&controllable);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,8 @@ class BindingProxy : public sigc::trackable
|
|||
PBD::Controllable& controllable;
|
||||
guint bind_button;
|
||||
guint bind_statemask;
|
||||
|
||||
sigc::connection learning_connection;
|
||||
void learning_finished ();
|
||||
bool prompter_hiding (GdkEventAny *);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -73,11 +73,12 @@ PopUp::remove ()
|
|||
{
|
||||
hide ();
|
||||
|
||||
if (popdown_time != 0 && timeout != -1) {
|
||||
gtk_timeout_remove (timeout);
|
||||
}
|
||||
|
||||
if (delete_on_hide) {
|
||||
std::cerr << "deleting prompter\n";
|
||||
if (popdown_time != 0 && timeout != -1) {
|
||||
gtk_timeout_remove (timeout);
|
||||
}
|
||||
gtk_idle_add (idle_delete, this);
|
||||
}
|
||||
}
|
||||
|
|
@ -125,11 +126,12 @@ PopUp::on_delete_event (GdkEventAny* ev)
|
|||
{
|
||||
hide();
|
||||
|
||||
if (popdown_time != 0 && timeout != -1) {
|
||||
gtk_timeout_remove (timeout);
|
||||
}
|
||||
|
||||
if (delete_on_hide) {
|
||||
std::cerr << "deleting prompter\n" << endl;
|
||||
if (popdown_time != 0 && timeout != -1) {
|
||||
gtk_timeout_remove (timeout);
|
||||
}
|
||||
gtk_idle_add (idle_delete, this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue