diff options
Diffstat (limited to 'src/gui/NodePropertiesWindow.cpp')
-rw-r--r-- | src/gui/NodePropertiesWindow.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/gui/NodePropertiesWindow.cpp b/src/gui/NodePropertiesWindow.cpp index 90e1269..52ad5af 100644 --- a/src/gui/NodePropertiesWindow.cpp +++ b/src/gui/NodePropertiesWindow.cpp @@ -24,8 +24,9 @@ using namespace Machina; NodePropertiesWindow* NodePropertiesWindow::_instance = NULL; -NodePropertiesWindow::NodePropertiesWindow(BaseObjectType* cobject, - const Glib::RefPtr<Gtk::Builder>& xml) +NodePropertiesWindow::NodePropertiesWindow( + BaseObjectType* cobject, + const Glib::RefPtr<Gtk::Builder>& xml) : Gtk::Dialog(cobject) { property_visible() = false; @@ -45,13 +46,12 @@ NodePropertiesWindow::NodePropertiesWindow(BaseObjectType* cob } NodePropertiesWindow::~NodePropertiesWindow() -{ -} +{} void NodePropertiesWindow::apply_clicked() { - #if 0 +#if 0 const uint8_t note = _note_spinbutton->get_value(); if (!_node->enter_action()) { _node->set_enter_action(ActionFactory::note_on(note)); @@ -59,15 +59,15 @@ NodePropertiesWindow::apply_clicked() } else { SharedPtr<MidiAction> action = PtrCast<MidiAction>(_node->enter_action()); action->event()[1] = note; - action = PtrCast<MidiAction>(_node->exit_action()); + action = PtrCast<MidiAction>(_node->exit_action()); action->event()[1] = note; } const double duration_dbl = _duration_spinbutton->get_value(); - TimeStamp duration(TimeUnit(TimeUnit::BEATS, 19200), duration_dbl); + TimeStamp duration(TimeUnit(TimeUnit::BEATS, 19200), duration_dbl); _node->set_duration(duration); _node->set_changed(); - #endif +#endif } void @@ -89,10 +89,10 @@ void NodePropertiesWindow::set_node(SharedPtr<Machina::Client::ClientObject> node) { _node = node; - #if 0 +#if 0 SharedPtr<MidiAction> enter_action = PtrCast<MidiAction>(node->enter_action()); - if (enter_action && enter_action->event_size() > 1 - && (enter_action->event()[0] & 0xF0) == 0x90) { + if (enter_action && ( enter_action->event_size() > 1) + && ( (enter_action->event()[0] & 0xF0) == 0x90) ) { _note_spinbutton->set_value(enter_action->event()[1]); _note_spinbutton->show(); } else if (!enter_action) { @@ -102,22 +102,23 @@ NodePropertiesWindow::set_node(SharedPtr<Machina::Client::ClientObject> node) _note_spinbutton->hide(); } _duration_spinbutton->set_value(node->duration().to_double()); - #endif +#endif } void -NodePropertiesWindow::present(Gtk::Window* parent, SharedPtr<Machina::Client::ClientObject> node) +NodePropertiesWindow::present(Gtk::Window* parent, + SharedPtr<Machina::Client::ClientObject> node) { if (!_instance) { Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create(); xml->get_widget_derived("node_properties_dialog", _instance); - if (parent) + if (parent) { _instance->set_transient_for(*parent); + } } _instance->set_node(node); _instance->show(); } - |