aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-03-31 07:04:04 +0000
committerDavid Robillard <d@drobilla.net>2007-03-31 07:04:04 +0000
commit7416f0b38e8eec05aea63604bdf23b5905c15754 (patch)
tree6ea8d7b3c063f2c782ce41a874f855ee1cebc2c5 /src/gui
parentf8883a56e44a42e97ca84392fdbff61e11540fcd (diff)
downloadmachina-7416f0b38e8eec05aea63604bdf23b5905c15754.tar.gz
machina-7416f0b38e8eec05aea63604bdf23b5905c15754.tar.bz2
machina-7416f0b38e8eec05aea63604bdf23b5905c15754.zip
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
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/MachinaCanvas.cpp2
-rw-r--r--src/gui/MachinaGUI.cpp13
-rw-r--r--src/gui/machina.glade79
3 files changed, 59 insertions, 35 deletions
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<Machina::Machine> 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 @@
<child>
<widget class="GtkHBox" id="hbox1">
+ <property name="border_width">4</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkRadioButton" id="slave_radiobutton">
@@ -328,37 +329,50 @@
</child>
<child>
- <widget class="GtkRadioButton" id="bpm_radiobutton">
+ <widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">BPM: </property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">slave_radiobutton</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
- <child>
- <widget class="GtkSpinButton" id="bpm_spinbutton">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Set internal tempo</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">120 1 640 1 10 10</property>
+ <child>
+ <widget class="GtkRadioButton" id="bpm_radiobutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">BPM:</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">True</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">slave_radiobutton</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="bpm_spinbutton">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Set internal tempo</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">120 1 640 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -389,14 +403,15 @@
</child>
<child>
- <widget class="GtkToolItem" id="toolitem2">
+ <widget class="GtkToolItem" id="toolitem3">
<property name="visible">True</property>
<property name="visible_horizontal">True</property>
<property name="visible_vertical">True</property>
<property name="is_important">False</property>
<child>
- <widget class="GtkHBox" id="hbox2">
+ <widget class="GtkHBox" id="hbox4">
+ <property name="border_width">4</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>