diff options
author | David Robillard <d@drobilla.net> | 2011-04-16 19:02:36 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-16 19:02:36 +0000 |
commit | bf0d5e8785d4fdb258f907cc092fb3670cff020e (patch) | |
tree | d2bbaef3bbaec2b0d30ec8c612f485f4ea5ccf06 /src/gui | |
parent | df347f2545a8f39d55f7320a2f43b16dc0f2f32a (diff) | |
download | machina-bf0d5e8785d4fdb258f907cc092fb3670cff020e.tar.gz machina-bf0d5e8785d4fdb258f907cc092fb3670cff020e.tar.bz2 machina-bf0d5e8785d4fdb258f907cc092fb3670cff020e.zip |
Squeeze blank lines and delete trailing whitespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@3152 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/EdgeView.cpp | 6 | ||||
-rw-r--r-- | src/gui/EdgeView.hpp | 1 | ||||
-rw-r--r-- | src/gui/MachinaCanvas.hpp | 1 | ||||
-rw-r--r-- | src/gui/MachinaGUI.cpp | 30 | ||||
-rw-r--r-- | src/gui/MachinaGUI.hpp | 2 | ||||
-rw-r--r-- | src/gui/NodePropertiesWindow.cpp | 10 | ||||
-rw-r--r-- | src/gui/NodePropertiesWindow.hpp | 1 | ||||
-rw-r--r-- | src/gui/NodeView.cpp | 4 | ||||
-rw-r--r-- | src/gui/NodeView.hpp | 1 | ||||
-rw-r--r-- | src/gui/main.cpp | 2 |
10 files changed, 4 insertions, 54 deletions
diff --git a/src/gui/EdgeView.cpp b/src/gui/EdgeView.cpp index 725d685..9feb514 100644 --- a/src/gui/EdgeView.cpp +++ b/src/gui/EdgeView.cpp @@ -60,7 +60,6 @@ inline static uint32_t edge_color(float prob) /* end probability colour stuff */ - using namespace FlowCanvas; EdgeView::EdgeView(SharedPtr<Canvas> canvas, @@ -78,14 +77,12 @@ EdgeView::EdgeView(SharedPtr<Canvas> canvas, sigc::mem_fun(this, &EdgeView::on_property)); } - float EdgeView::probability() const { return _edge->get(URIs::instance().machina_probability).get_float(); } - double EdgeView::length_hint() const { @@ -93,7 +90,6 @@ EdgeView::length_hint() const return tail->node()->get(URIs::instance().machina_duration).get_float() * 10.0; } - void EdgeView::show_label(bool show) { @@ -101,7 +97,6 @@ EdgeView::show_label(bool show) set_color(edge_color(probability())); } - bool EdgeView::on_event(GdkEvent* ev) { @@ -126,7 +121,6 @@ EdgeView::on_event(GdkEvent* ev) return false; } - void EdgeView::on_property(Machina::URIInt key, const Raul::Atom& value) { diff --git a/src/gui/EdgeView.hpp b/src/gui/EdgeView.hpp index d9ffe71..09065c1 100644 --- a/src/gui/EdgeView.hpp +++ b/src/gui/EdgeView.hpp @@ -48,5 +48,4 @@ private: SharedPtr<Machina::Client::ClientObject> _edge; }; - #endif // MACHINA_EDGEVIEW_HPP diff --git a/src/gui/MachinaCanvas.hpp b/src/gui/MachinaCanvas.hpp index dc23505..875b694 100644 --- a/src/gui/MachinaCanvas.hpp +++ b/src/gui/MachinaCanvas.hpp @@ -66,5 +66,4 @@ private: WeakPtr<NodeView> _last_clicked; }; - #endif // MACHINA_CANVAS_HPP_HPP diff --git a/src/gui/MachinaGUI.cpp b/src/gui/MachinaGUI.cpp index fe7462e..c3083ed 100644 --- a/src/gui/MachinaGUI.cpp +++ b/src/gui/MachinaGUI.cpp @@ -43,7 +43,6 @@ using namespace Machina; - MachinaGUI::MachinaGUI(SharedPtr<Machina::Engine> engine) : _refresh(false) , _evolve(false) @@ -201,12 +200,10 @@ MachinaGUI::MachinaGUI(SharedPtr<Machina::Engine> engine) _client_model->signal_erase_object.connect(sigc::mem_fun(this, &MachinaGUI::on_erase_object)); } - MachinaGUI::~MachinaGUI() { } - #ifdef HAVE_EUGENE bool MachinaGUI::evolve_callback() @@ -222,7 +219,6 @@ MachinaGUI::evolve_callback() } #endif - bool MachinaGUI::idle_callback() { @@ -230,7 +226,6 @@ MachinaGUI::idle_callback() return true; } - bool MachinaGUI::scrolled_window_event(GdkEvent* event) { @@ -256,14 +251,12 @@ MachinaGUI::scrolled_window_event(GdkEvent* event) return false; } - void MachinaGUI::arrange() { _canvas->arrange(_menu_view_time_edges->get_active()); } - void MachinaGUI::load_target_clicked() { @@ -284,7 +277,6 @@ MachinaGUI::load_target_clicked() _target_filename = dialog.get_filename(); } - #ifdef HAVE_EUGENE void MachinaGUI::evolve_toggled() @@ -307,7 +299,6 @@ MachinaGUI::evolve_toggled() } #endif - void MachinaGUI::random_mutation(SharedPtr<Machine> machine) { @@ -317,7 +308,6 @@ MachinaGUI::random_mutation(SharedPtr<Machine> machine) mutate(machine, machine->nodes().size() < 2 ? 1 : rand() % 7); } - void MachinaGUI::mutate(SharedPtr<Machine> machine, unsigned mutation) { @@ -361,7 +351,6 @@ MachinaGUI::mutate(SharedPtr<Machine> machine, unsigned mutation) #endif } - void MachinaGUI::update_toolbar() { @@ -371,7 +360,6 @@ MachinaGUI::update_toolbar() _quantize_spinbutton->set_sensitive(_quantize_checkbutton->get_active()); } - void MachinaGUI::quantize_changed() { @@ -383,21 +371,18 @@ MachinaGUI::quantize_changed() update_toolbar(); } - void MachinaGUI::tempo_changed() { _engine->set_bpm(_bpm_spinbutton->get_value_as_int()); } - void MachinaGUI::zoom(double z) { _canvas->set_zoom(z); } - /** Update the sensitivity status of menus to reflect the present. */ void @@ -407,14 +392,12 @@ MachinaGUI::connect_widgets() using namespace std; - void MachinaGUI::menu_file_quit() { _main_window->hide(); } - void MachinaGUI::menu_file_open() { @@ -441,7 +424,6 @@ MachinaGUI::menu_file_open() } } - void MachinaGUI::menu_file_save() { @@ -457,7 +439,6 @@ MachinaGUI::menu_file_save() } } - void MachinaGUI::menu_file_save_as() { @@ -510,7 +491,6 @@ MachinaGUI::menu_file_save_as() } } - void MachinaGUI::menu_import_midi() { @@ -535,7 +515,6 @@ MachinaGUI::menu_import_midi() dialog.set_extra_widget(*extra_widget); extra_widget->show_all(); - const int result = dialog.run(); if (result == Gtk::RESPONSE_OK) { @@ -560,7 +539,6 @@ MachinaGUI::menu_import_midi() } } - void MachinaGUI::menu_export_midi() { @@ -594,7 +572,6 @@ MachinaGUI::menu_export_midi() } } - void MachinaGUI::menu_export_graphviz() { @@ -609,7 +586,6 @@ MachinaGUI::menu_export_graphviz() _canvas->render_to_dot(dialog.get_filename()); } - void MachinaGUI::show_toolbar_toggled() { @@ -619,7 +595,6 @@ MachinaGUI::show_toolbar_toggled() _toolbar->hide(); } - void MachinaGUI::show_labels_toggled() { @@ -639,7 +614,6 @@ MachinaGUI::show_labels_toggled() } } - void MachinaGUI::menu_help_about() { @@ -647,7 +621,6 @@ MachinaGUI::menu_help_about() _about_window->show(); } - void MachinaGUI::menu_help_help() { @@ -656,7 +629,6 @@ MachinaGUI::menu_help_help() _help_dialog->hide(); } - void MachinaGUI::record_toggled() { @@ -669,7 +641,6 @@ MachinaGUI::record_toggled() } } - void MachinaGUI::stop_clicked() { @@ -687,7 +658,6 @@ MachinaGUI::stop_clicked() update_toolbar(); } - void MachinaGUI::play_toggled() { diff --git a/src/gui/MachinaGUI.hpp b/src/gui/MachinaGUI.hpp index 58dc48f..72c2f62 100644 --- a/src/gui/MachinaGUI.hpp +++ b/src/gui/MachinaGUI.hpp @@ -113,7 +113,7 @@ protected: SharedPtr<Machina::Engine> _engine; SharedPtr<Machina::Client::ClientModel> _client_model; SharedPtr<Machina::Controller> _controller; - + SharedPtr<Raul::Maid> _maid; SharedPtr<Machina::Evolver> _evolver; diff --git a/src/gui/NodePropertiesWindow.cpp b/src/gui/NodePropertiesWindow.cpp index b896902..4f883e8 100644 --- a/src/gui/NodePropertiesWindow.cpp +++ b/src/gui/NodePropertiesWindow.cpp @@ -22,10 +22,8 @@ using namespace std; using namespace Machina; - NodePropertiesWindow* NodePropertiesWindow::_instance = NULL; - NodePropertiesWindow::NodePropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml) : Gtk::Dialog(cobject) { @@ -36,7 +34,7 @@ NodePropertiesWindow::NodePropertiesWindow(BaseObjectType* cobject, const Glib:: xml->get_widget("node_properties_apply_button", _apply_button); xml->get_widget("node_properties_cancel_button", _cancel_button); xml->get_widget("node_properties_ok_button", _ok_button); - + _apply_button->signal_clicked().connect( sigc::mem_fun(this, &NodePropertiesWindow::apply_clicked)); _cancel_button->signal_clicked().connect( @@ -45,12 +43,10 @@ NodePropertiesWindow::NodePropertiesWindow(BaseObjectType* cobject, const Glib:: sigc::mem_fun(this, &NodePropertiesWindow::ok_clicked)); } - NodePropertiesWindow::~NodePropertiesWindow() { } - void NodePropertiesWindow::apply_clicked() { @@ -73,7 +69,6 @@ NodePropertiesWindow::apply_clicked() #endif } - void NodePropertiesWindow::cancel_clicked() { @@ -82,7 +77,6 @@ NodePropertiesWindow::cancel_clicked() _instance = NULL; } - void NodePropertiesWindow::ok_clicked() { @@ -90,7 +84,6 @@ NodePropertiesWindow::ok_clicked() cancel_clicked(); } - void NodePropertiesWindow::set_node(SharedPtr<Machina::Client::ClientObject> node) { @@ -111,7 +104,6 @@ NodePropertiesWindow::set_node(SharedPtr<Machina::Client::ClientObject> node) #endif } - void NodePropertiesWindow::present(Gtk::Window* parent, SharedPtr<Machina::Client::ClientObject> node) { diff --git a/src/gui/NodePropertiesWindow.hpp b/src/gui/NodePropertiesWindow.hpp index 2751d77..9e9ecd7 100644 --- a/src/gui/NodePropertiesWindow.hpp +++ b/src/gui/NodePropertiesWindow.hpp @@ -53,5 +53,4 @@ private: Gtk::Button* _ok_button; }; - #endif // NODEPROPERTIESWINDOW_HPP diff --git a/src/gui/NodeView.cpp b/src/gui/NodeView.cpp index 2810f99..3d29cf7 100644 --- a/src/gui/NodeView.cpp +++ b/src/gui/NodeView.cpp @@ -86,7 +86,7 @@ midi_note_name(uint8_t num) const uint8_t octave = num / 12; num -= octave * 12; - + static char str[8]; snprintf(str, sizeof(str), "%s%d", notes[num], octave); return str; @@ -104,7 +104,7 @@ NodeView::show_label(bool show) } } } - + set_name(""); } diff --git a/src/gui/NodeView.hpp b/src/gui/NodeView.hpp index a70e821..8023058 100644 --- a/src/gui/NodeView.hpp +++ b/src/gui/NodeView.hpp @@ -58,5 +58,4 @@ private: sigc::connection _enter_action_connection; }; - #endif // MACHINA_NODEVIEW_HPP diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 4f23e18..b4842e1 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -30,7 +30,6 @@ using namespace std; using namespace Machina; - int main(int argc, char** argv) { @@ -89,4 +88,3 @@ main(int argc, char** argv) return 0; } - |