summaryrefslogtreecommitdiff
path: root/plugingui
diff options
context:
space:
mode:
authorjsc@umbraculum.org <jsc@umbraculum.org>2013-04-26 15:23:24 +0200
committerjsc@umbraculum.org <jsc@umbraculum.org>2013-04-26 15:23:24 +0200
commit3eeba619215dadb15a5fd992cba03bf760c23d3a (patch)
tree423450a0419b37fc9f3e8cf65c0a425e2e418ae7 /plugingui
parent2eedb967d2a3f8026163bd182e973106e6846a13 (diff)
parent813d802443679a6f937a13680bc0ec3fb11a96b6 (diff)
Merge branch 'master' of http://git.drumgizmo.org/drumgizmo
Diffstat (limited to 'plugingui')
-rw-r--r--plugingui/plugingui.cc20
-rw-r--r--plugingui/scrollbar.cc4
2 files changed, 23 insertions, 1 deletions
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc
index 864f4d8..8e886ee 100644
--- a/plugingui/plugingui.cc
+++ b/plugingui/plugingui.cc
@@ -250,11 +250,31 @@ void PluginGUI::thread_main()
}
}
break;
+ case Message::LoadStatusMidimap:
+ {
+ LoadStatusMessageMidimap *ls = (LoadStatusMessageMidimap*)msg;
+ DEBUG(gui, "Midimap status (%d)\n",
+ ls->success);
+ progress2->setProgress(1);
+ if(ls->success) {
+ progress2->setState(GUI::ProgressBar::green);
+ } else {
+ progress2->setState(GUI::ProgressBar::red);
+ }
+ }
+ break;
case Message::EngineSettingsMessage:
{
EngineSettingsMessage *settings = (EngineSettingsMessage *)msg;
lineedit->setText(settings->drumkitfile);
lineedit2->setText(settings->midimapfile);
+ if(settings->midimap_loaded) {
+ progress2->setProgress(1);
+ progress2->setState(GUI::ProgressBar::green);
+ } else {
+ progress2->setProgress(0);
+ progress2->setState(GUI::ProgressBar::blue);
+ }
check->setChecked(settings->enable_velocity_modifier);
knob->setValue(settings->velocity_modifier_weight);
knob2->setValue(settings->velocity_modifier_falloff);
diff --git a/plugingui/scrollbar.cc b/plugingui/scrollbar.cc
index 3fc3ac8..d48da1a 100644
--- a/plugingui/scrollbar.cc
+++ b/plugingui/scrollbar.cc
@@ -141,7 +141,9 @@ void GUI::ScrollBar::mouseMoveEvent(MouseMoveEvent *e)
int h = height() - 2 * width() - 3;
delta /= (float)h / (float)max;
- setValue(value_offset - delta);
+
+ int newval = value_offset - delta;
+ if(newval != value()) setValue(newval);
}
void GUI::ScrollBar::buttonEvent(ButtonEvent *e)