From 7416f0b38e8eec05aea63604bdf23b5905c15754 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 31 Mar 2007 07:04:04 +0000 Subject: Fixed tempo skew (record vs playback). Recording/building algorithm fixes. Polished up GUI things. git-svn-id: http://svn.drobilla.net/lad/machina@384 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/MachinaCanvas.cpp | 2 +- src/gui/MachinaGUI.cpp | 13 ++++++-- src/gui/machina.glade | 79 ++++++++++++++++++++++++++++------------------- 3 files changed, 59 insertions(+), 35 deletions(-) (limited to 'src/gui') diff --git a/src/gui/MachinaCanvas.cpp b/src/gui/MachinaCanvas.cpp index f2a8ebf..134b885 100644 --- a/src/gui/MachinaCanvas.cpp +++ b/src/gui/MachinaCanvas.cpp @@ -230,7 +230,7 @@ MachinaCanvas::build(SharedPtr machine) Gtk::Main::iteration(false); } - //arrange(); + arrange(); /* while (Gtk::Main::events_pending()) Gtk::Main::iteration(false); diff --git a/src/gui/MachinaGUI.cpp b/src/gui/MachinaGUI.cpp index cf0b07f..3ddb13f 100644 --- a/src/gui/MachinaGUI.cpp +++ b/src/gui/MachinaGUI.cpp @@ -235,7 +235,7 @@ void MachinaGUI::update_toolbar() { _record_button->set_active(_engine->driver()->recording()); - _play_button->set_active(true); + _play_button->set_active(_engine->machine()->is_activated()); _bpm_spinbutton->set_sensitive(_bpm_radiobutton->get_active()); _quantize_spinbutton->set_sensitive(_quantize_checkbutton->get_active()); } @@ -631,6 +631,7 @@ MachinaGUI::record_toggled() } else if (_engine->driver()->recording()) { _engine->driver()->finish_record(); _canvas->build(_engine->machine()); + update_toolbar(); } } @@ -638,8 +639,12 @@ MachinaGUI::record_toggled() void MachinaGUI::stop_clicked() { - if (_engine->driver()->recording()) + if (_engine->driver()->recording()) { _engine->driver()->finish_record(); + } else { + _engine->machine()->deactivate(); + _engine->machine()->reset(); + } update_toolbar(); } @@ -648,6 +653,10 @@ MachinaGUI::stop_clicked() void MachinaGUI::play_toggled() { + if (_play_button->get_active()) + _engine->machine()->activate(); + else + _engine->machine()->deactivate(); } diff --git a/src/gui/machina.glade b/src/gui/machina.glade index 01f8ec1..136d384 100644 --- a/src/gui/machina.glade +++ b/src/gui/machina.glade @@ -303,9 +303,10 @@ + 4 True False - 0 + 6 @@ -328,37 +329,50 @@ - + True - True - BPM: - True - GTK_RELIEF_NORMAL - True - True - False - True - slave_radiobutton - - - 0 - False - False - - + False + 0 - - - True - Set internal tempo - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 120 1 640 1 10 10 + + + True + True + BPM: + True + GTK_RELIEF_NORMAL + True + True + False + True + slave_radiobutton + + + 0 + False + False + + + + + + True + Set internal tempo + True + 1 + 0 + False + GTK_UPDATE_ALWAYS + False + False + 120 1 640 1 10 10 + + + 0 + True + True + + 0 @@ -389,14 +403,15 @@ - + True True True False - + + 4 True False 0 -- cgit v1.2.1