summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-13 16:04:14 +0000
committerDavid Robillard <d@drobilla.net>2009-05-13 16:04:14 +0000
commitaa473d19780f2670bb828835ee7ce970571016cf (patch)
tree0483fcb2cc350b3cc2f660f22449f803ae12f93d /src/gui
parent44ddb73018b96a6979b4339f4ba234e5c97741f8 (diff)
downloadingen-aa473d19780f2670bb828835ee7ce970571016cf.tar.gz
ingen-aa473d19780f2670bb828835ee7ce970571016cf.tar.bz2
ingen-aa473d19780f2670bb828835ee7ce970571016cf.zip
Strip trailing whitespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1999 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp64
-rw-r--r--src/gui/App.hpp34
-rw-r--r--src/gui/BreadCrumb.hpp8
-rw-r--r--src/gui/BreadCrumbBox.cpp18
-rw-r--r--src/gui/BreadCrumbBox.hpp10
-rw-r--r--src/gui/Configuration.cpp10
-rw-r--r--src/gui/Configuration.hpp18
-rw-r--r--src/gui/ConnectWindow.cpp52
-rw-r--r--src/gui/ConnectWindow.hpp10
-rw-r--r--src/gui/Connection.hpp10
-rw-r--r--src/gui/ControlPanel.cpp32
-rw-r--r--src/gui/ControlPanel.hpp18
-rw-r--r--src/gui/Controls.cpp48
-rw-r--r--src/gui/Controls.hpp42
-rw-r--r--src/gui/GladeFactory.cpp8
-rw-r--r--src/gui/GladeFactory.hpp6
-rw-r--r--src/gui/LoadPatchWindow.cpp18
-rw-r--r--src/gui/LoadPatchWindow.hpp10
-rw-r--r--src/gui/LoadPluginWindow.cpp42
-rw-r--r--src/gui/LoadPluginWindow.hpp24
-rw-r--r--src/gui/LoadRemotePatchWindow.cpp26
-rw-r--r--src/gui/LoadRemotePatchWindow.hpp10
-rw-r--r--src/gui/LoadSubpatchWindow.cpp14
-rw-r--r--src/gui/LoadSubpatchWindow.hpp16
-rw-r--r--src/gui/MessagesWindow.cpp6
-rw-r--r--src/gui/MessagesWindow.hpp8
-rw-r--r--src/gui/NewSubpatchWindow.cpp14
-rw-r--r--src/gui/NewSubpatchWindow.hpp12
-rw-r--r--src/gui/NodeControlWindow.cpp18
-rw-r--r--src/gui/NodeControlWindow.hpp12
-rw-r--r--src/gui/NodeMenu.cpp16
-rw-r--r--src/gui/NodeMenu.hpp14
-rw-r--r--src/gui/NodeModule.cpp32
-rw-r--r--src/gui/NodeModule.hpp20
-rw-r--r--src/gui/NodePropertiesWindow.cpp10
-rw-r--r--src/gui/NodePropertiesWindow.hpp8
-rw-r--r--src/gui/ObjectMenu.cpp16
-rw-r--r--src/gui/ObjectMenu.hpp8
-rw-r--r--src/gui/PatchCanvas.cpp86
-rw-r--r--src/gui/PatchCanvas.hpp24
-rw-r--r--src/gui/PatchPortModule.cpp20
-rw-r--r--src/gui/PatchPortModule.hpp14
-rw-r--r--src/gui/PatchPropertiesWindow.cpp12
-rw-r--r--src/gui/PatchPropertiesWindow.hpp10
-rw-r--r--src/gui/PatchTreeWindow.cpp32
-rw-r--r--src/gui/PatchTreeWindow.hpp18
-rw-r--r--src/gui/PatchView.cpp18
-rw-r--r--src/gui/PatchView.hpp12
-rw-r--r--src/gui/PatchWindow.cpp64
-rw-r--r--src/gui/PatchWindow.hpp16
-rw-r--r--src/gui/Port.cpp16
-rw-r--r--src/gui/Port.hpp14
-rw-r--r--src/gui/PortMenu.cpp14
-rw-r--r--src/gui/PortMenu.hpp8
-rw-r--r--src/gui/PortPropertiesWindow.cpp24
-rw-r--r--src/gui/PortPropertiesWindow.hpp8
-rw-r--r--src/gui/RenameWindow.cpp8
-rw-r--r--src/gui/RenameWindow.hpp10
-rw-r--r--src/gui/SubpatchModule.cpp10
-rw-r--r--src/gui/SubpatchModule.hpp8
-rw-r--r--src/gui/ThreadedLoader.cpp18
-rw-r--r--src/gui/ThreadedLoader.hpp10
-rw-r--r--src/gui/UploadPatchWindow.cpp26
-rw-r--r--src/gui/UploadPatchWindow.hpp14
-rw-r--r--src/gui/WindowFactory.cpp38
-rw-r--r--src/gui/WindowFactory.hpp8
-rw-r--r--src/gui/cmdline.h2
-rw-r--r--src/gui/gui.cpp6
-rw-r--r--src/gui/gui.hpp6
69 files changed, 658 insertions, 658 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index c7056a64..f15b3355 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -79,7 +79,7 @@ App::App(Ingen::Shared::World* world)
, _enable_signal(true)
{
Glib::RefPtr<Gnome::Glade::Xml> glade_xml = GladeFactory::new_glade_reference();
-
+
Glib::set_application_name("Ingen");
gtk_window_set_default_icon_name("ingen");
@@ -110,16 +110,16 @@ App::init(int argc, char** argv, Ingen::Shared::World* world)
if (!_instance)
_instance = new App(world);
-
+
// Load configuration settings
_instance->configuration()->load_settings();
_instance->configuration()->apply_settings();
-
+
// Set default window icon
_instance->_about_dialog->property_program_name() = "Ingen";
_instance->_about_dialog->property_logo_icon_name() = "ingen";
gtk_window_set_default_icon_name("ingen");
-
+
// Set style for embedded node GUIs
const string rc_style =
"style \"ingen_embedded_node_gui_style\" {"
@@ -135,9 +135,9 @@ App::init(int argc, char** argv, Ingen::Shared::World* world)
" fg[INSENSITIVE] = \"#FFFFFF\""
"}\n"
"widget \"*ingen_embedded_node_gui_container*\" style \"ingen_embedded_node_gui_style\"\n";
-
+
Gtk::RC::parse_string(rc_style);
-
+
App::instance().connect_window()->start(world);
// Run main iterations here until we're attached to the engine
@@ -166,14 +166,14 @@ App::attach(SharedPtr<SigClientInterface> client,
assert( ! _loader);
_world->engine->register_client(client.get());
-
+
_client = client;
_handle = handle;
_store = SharedPtr<ClientStore>(new ClientStore(_world->engine, client));
_loader = SharedPtr<ThreadedLoader>(new ThreadedLoader(_world->engine));
_patch_tree_window->init(*_store);
-
+
_client->signal_response_error.connect(sigc::mem_fun(this, &App::error_response));
_client->signal_error.connect(sigc::mem_fun(this, &App::error_message));
}
@@ -193,7 +193,7 @@ App::detach()
_world->engine.reset();
}
}
-
+
const SharedPtr<Serialiser>&
App::serialiser()
@@ -223,7 +223,7 @@ void
App::error_message(const string& str)
{
_messages_window->post(str);
-
+
if (!_messages_window->is_visible())
_messages_window->present();
@@ -256,7 +256,7 @@ App::activity_port_destroyed(Port* port)
ActivityPorts::iterator i = _activity_ports.find(port);
if (i != _activity_ports.end())
_activity_ports.erase(i);
-
+
return;
}
@@ -291,17 +291,17 @@ App::event_load_session()
{
Gtk::FileChooserDialog* dialog
= new Gtk::FileChooserDialog(*_main_window, "Load Session", Gtk::FILE_CHOOSER_ACTION_OPEN);
-
+
dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- dialog->add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
+ dialog->add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
int result = dialog->run();
string filename = dialog->get_filename();
delete dialog;
cout << result << endl;
-
+
assert(result == Gtk::RESPONSE_OK || result == Gtk::RESPONSE_CANCEL || result == Gtk::RESPONSE_NONE);
-
+
if (result == Gtk::RESPONSE_OK)
//configuration->load_session(filename);
_controller->load_session(filename);
@@ -312,7 +312,7 @@ void
App::event_save_session_as()
{
Gtk::FileChooserDialog dialog(*_main_window, "Save Session", Gtk::FILE_CHOOSER_ACTION_SAVE);
-
+
/*
Gtk::VBox* box = dialog.get_vbox();
Gtk::Label warning("Warning: Recursively saving will overwrite any subpatch files \
@@ -321,20 +321,20 @@ App::event_save_session_as()
Gtk::CheckButton recursive_checkbutton("Recursively save all subpatches");
box->pack_start(recursive_checkbutton, false, false, 0);
recursive_checkbutton.show();
- */
+ */
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
-
+ dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
+
int result = dialog.run();
//bool recursive = recursive_checkbutton.get_active();
-
+
assert(result == Gtk::RESPONSE_OK || result == Gtk::RESPONSE_CANCEL || result == Gtk::RESPONSE_NONE);
-
- if (result == Gtk::RESPONSE_OK) {
+
+ if (result == Gtk::RESPONSE_OK) {
string filename = dialog.get_filename();
if (filename.length() < 11 || filename.substr(filename.length()-10) != ".omsession")
filename += ".omsession";
-
+
bool confirm = false;
std::fstream fin;
fin.open(filename.c_str(), std::ios::in);
@@ -351,7 +351,7 @@ App::event_save_session_as()
confirm = true;
}
fin.close();
-
+
if (confirm) {
_controller->save_session(filename);
}
@@ -365,7 +365,7 @@ App::register_callbacks()
{
Glib::signal_timeout().connect(
sigc::mem_fun(App::instance(), &App::gtk_main_iteration), 25, G_PRIORITY_DEFAULT);
-
+
Glib::signal_timeout().connect(
sigc::mem_fun(App::instance(), &App::animate), 50, G_PRIORITY_DEFAULT);
}
@@ -384,7 +384,7 @@ App::gtk_main_iteration()
_client->emit_signals();
_enable_signal = true;
}
-
+
return true;
}
@@ -410,7 +410,7 @@ App::icon_from_path(const string& path, int size)
/* If weak references to Glib::Objects are needed somewhere else it will
probably be a good idea to create a proper WeakPtr class instead of
using raw pointers, but for a single use this will do. */
-
+
Glib::RefPtr<Gdk::Pixbuf> buf;
if (path.length() == 0)
return buf;
@@ -444,9 +444,9 @@ App::icon_destroyed(void* data)
Icons::iterator iter = instance()._icons.find(*p);
if (iter != instance()._icons.end())
instance()._icons.erase(iter);
-
+
delete p; // allocated in App::icon_from_path
-
+
return NULL;
}
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index a7b4236b..002ff9c2 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -30,7 +30,7 @@
#include "raul/Deletable.hpp"
#include "module/World.hpp"
-namespace Ingen {
+namespace Ingen {
class Engine;
namespace Shared {
class EngineInterface;
@@ -80,13 +80,13 @@ public:
SharedPtr<Raul::Deletable> handle=SharedPtr<Raul::Deletable>());
void detach();
-
+
void register_callbacks();
bool gtk_main_iteration();
void show_about();
void quit();
-
+
void port_activity(Port* port);
void activity_port_destroyed(Port* port);
@@ -99,16 +99,16 @@ public:
PatchTreeWindow* patch_tree() const { return _patch_tree_window; }
Configuration* configuration() const { return _configuration; }
WindowFactory* window_factory() const { return _window_factory; }
-
+
Glib::RefPtr<Gdk::Pixbuf> icon_from_path(const std::string& path, int size);
const SharedPtr<Shared::EngineInterface>& engine() const { return _world->engine; }
const SharedPtr<Client::SigClientInterface>& client() const { return _client; }
const SharedPtr<Client::ClientStore>& store() const { return _store; }
const SharedPtr<ThreadedLoader>& loader() const { return _loader; }
-
+
const SharedPtr<Serialisation::Serialiser>& serialiser();
-
+
static inline App& instance() { assert(_instance); return *_instance; }
static void init(int argc, char** argv, Ingen::Shared::World* world);
@@ -122,26 +122,26 @@ protected:
template <typename A, typename B>
struct LexicalCompare {
bool operator()(const std::pair<A, B>& p1, const std::pair<A, B>& p2) {
- return (p1.first < p2.first) ||
+ return (p1.first < p2.first) ||
((p1.first == p2.first) && (p1.second < p2.second));
}
};
-
+
typedef std::map< std::pair<std::string, int>,
Gdk::Pixbuf*,
LexicalCompare<std::string, int> > Icons;
Icons _icons;
-
+
App(Ingen::Shared::World* world);
-
+
bool animate();
void error_response(int32_t id, const std::string& str);
-
+
static void* icon_destroyed(void* data);
-
+
static Gtk::Main* _main;
static App* _instance;
-
+
SharedPtr<Client::SigClientInterface> _client;
SharedPtr<Raul::Deletable> _handle;
SharedPtr<Client::ClientStore> _store;
@@ -155,7 +155,7 @@ protected:
PatchTreeWindow* _patch_tree_window;
Gtk::AboutDialog* _about_dialog;
WindowFactory* _window_factory;
-
+
Ingen::Shared::World* _world;
typedef std::map<Port*, bool> ActivityPorts;
diff --git a/src/gui/BreadCrumb.hpp b/src/gui/BreadCrumb.hpp
index 846064d2..82cfff53 100644
--- a/src/gui/BreadCrumb.hpp
+++ b/src/gui/BreadCrumb.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -57,7 +57,7 @@ public:
const Raul::Path& path() const { return _path; }
SharedPtr<PatchView> view() const { return _view; }
-
+
void set_path(const Raul::Path& path)
{
remove();
diff --git a/src/gui/BreadCrumbBox.cpp b/src/gui/BreadCrumbBox.cpp
index 6a131806..86b4cf88 100644
--- a/src/gui/BreadCrumbBox.cpp
+++ b/src/gui/BreadCrumbBox.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -50,7 +50,7 @@ BreadCrumbBox::view(const Path& path)
/** Sets up the crumbs to display @a path.
*
- * If @a path is already part of the shown path, it will be selected and the
+ * If @a path is already part of the shown path, it will be selected and the
* children preserved.
*/
void
@@ -61,7 +61,7 @@ BreadCrumbBox::build(Path path, SharedPtr<PatchView> view)
// Moving to a path we already contain, just switch the active button
if (_breadcrumbs.size() > 0 && (path.is_parent_of(_full_path) || path == _full_path)) {
-
+
for (std::list<BreadCrumb*>::iterator i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i) {
if ((*i)->path() == path) {
(*i)->set_active(true);
@@ -75,7 +75,7 @@ BreadCrumbBox::build(Path path, SharedPtr<PatchView> view)
(*i)->set_active(false);
}
}
-
+
_active_path = path;
_enable_signal = old_enable_signal;
@@ -98,7 +98,7 @@ BreadCrumbBox::build(Path path, SharedPtr<PatchView> view)
else
suffix = suffix.substr(suffix.find("/")+1);
}
-
+
for (std::list<BreadCrumb*>::iterator i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i)
(*i)->set_active(false);
_breadcrumbs.back()->set_active(true);
@@ -140,7 +140,7 @@ BreadCrumbBox::build(Path path, SharedPtr<PatchView> view)
suffix = suffix.substr(suffix.find("/")+1);
}
}
-
+
_enable_signal = old_enable_signal;
}
@@ -154,7 +154,7 @@ BreadCrumbBox::create_crumb(const Path& path,
{
BreadCrumb* but = manage(new BreadCrumb(path,
(view && path == view->patch()->path()) ? view : SharedPtr<PatchView>()));
-
+
but->signal_toggled().connect(sigc::bind(sigc::mem_fun(
this, &BreadCrumbBox::breadcrumb_clicked), but));
diff --git a/src/gui/BreadCrumbBox.hpp b/src/gui/BreadCrumbBox.hpp
index 7c4764c1..67b82e92 100644
--- a/src/gui/BreadCrumbBox.hpp
+++ b/src/gui/BreadCrumbBox.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -42,7 +42,7 @@ class BreadCrumbBox : public Gtk::HBox
{
public:
BreadCrumbBox();
-
+
SharedPtr<PatchView> view(const Raul::Path& path);
void build(Raul::Path path, SharedPtr<PatchView> view);
@@ -54,7 +54,7 @@ private:
SharedPtr<PatchView> view = SharedPtr<PatchView>());
void breadcrumb_clicked(BreadCrumb* crumb);
-
+
void object_destroyed(const Raul::Path& path);
void object_renamed(const Raul::Path& old_path, const Raul::Path& new_path);
diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp
index 381d17fb..2d64e34e 100644
--- a/src/gui/Configuration.cpp
+++ b/src/gui/Configuration.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -94,10 +94,10 @@ Configuration::get_port_color(const PortModel* p)
} /*else if (p->type().is_osc()) {
return _osc_port_color;
}*/
-
+
cerr << "[Configuration] Unknown port type " << p->type().uri()
<< ", port will appear black." << endl;
-
+
return 0x000000FF;
}
diff --git a/src/gui/Configuration.hpp b/src/gui/Configuration.hpp
index 6ce66776..82cfbc8f 100644
--- a/src/gui/Configuration.hpp
+++ b/src/gui/Configuration.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -32,7 +32,7 @@ namespace GUI {
/** Singleton state manager for the entire app.
*
- * Stores settings like color preferences, search paths, etc.
+ * Stores settings like color preferences, search paths, etc.
* (ie any user-defined preferences to be stoed in the rc file).
*
* \ingroup GUI
@@ -50,9 +50,9 @@ public:
const string& patch_folder() { return _patch_folder; }
void set_patch_folder(const string& f) { _patch_folder = f; }
-
+
uint32_t get_port_color(const PortModel* pi);
-
+
enum NameStyle { PATH, HUMAN, NONE };
NameStyle name_style() const { return _name_style; }
@@ -61,9 +61,9 @@ public:
private:
/** Most recent patch folder shown in open dialog */
string _patch_folder;
-
+
NameStyle _name_style;
-
+
uint32_t _audio_port_color;
uint32_t _control_port_color;
uint32_t _event_port_color;
@@ -75,4 +75,4 @@ private:
#endif // CONFIG_H
-
+
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index f255ebdc..e20ac201 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -79,7 +79,7 @@ ConnectWindow::start(Ingen::Shared::World* world)
if (_widgets_loaded)
_internal_radio->set_active(true);
}
-
+
set_connected_to(world->engine);
connect(true);
@@ -90,7 +90,7 @@ void
ConnectWindow::set_connected_to(SharedPtr<Shared::EngineInterface> engine)
{
App::instance().world()->engine = engine;
-
+
if (!_widgets_loaded)
return;
@@ -132,7 +132,7 @@ ConnectWindow::set_connected_to(SharedPtr<Shared::EngineInterface> engine)
void
ConnectWindow::set_connecting_widget_states()
{
- if (!_widgets_loaded)
+ if (!_widgets_loaded)
return;
_connect_button->set_sensitive(false);
@@ -161,7 +161,7 @@ ConnectWindow::connect(bool existing)
_connect_stage = 0;
set_connecting_widget_states();
-
+
Ingen::Shared::World* world = App::instance().world();
#ifdef HAVE_LIBLO
@@ -175,10 +175,10 @@ ConnectWindow::connect(bool existing)
}
world->engine = SharedPtr<EngineInterface>(new OSCEngineSender(engine_url));
}
-
+
SharedPtr<ThreadedSigClientInterface> tsci(new ThreadedSigClientInterface(1024));
SharedPtr<Raul::Deletable> client;
-
+
const string& uri = world->engine->uri().str();
const string& scheme = uri.substr(0, uri.find(":"));
if (scheme == "osc.udp" || scheme == "osc.tcp")
@@ -187,7 +187,7 @@ ConnectWindow::connect(bool existing)
else if (scheme == "http")
client = SharedPtr<HTTPClientReceiver>(new HTTPClientReceiver(world, uri, tsci));
#endif
-
+
App::instance().attach(tsci, client);
App::instance().register_callbacks();
@@ -208,7 +208,7 @@ ConnectWindow::connect(bool existing)
// FIXME: static args
SharedPtr<ThreadedSigClientInterface> tsci(new ThreadedSigClientInterface(1024));
SharedPtr<OSCClientReceiver> client(new OSCClientReceiver(16181, tsci));
-
+
App::instance().attach(tsci, client);
App::instance().register_callbacks();
@@ -226,22 +226,22 @@ ConnectWindow::connect(bool existing)
assert(_new_engine);
world->local_engine = SharedPtr<Engine>(_new_engine(world));
}
-
+
if ( ! world->engine) {
SharedPtr<QueuedEngineInterface> interface(
new QueuedEngineInterface(*world->local_engine, Ingen::event_queue_size));
world->engine = interface;
world->local_engine->add_event_source(interface);
}
-
+
SharedPtr<SigClientInterface> client(new SigClientInterface());
-
+
Ingen::Driver* (*new_driver)(
Ingen::Engine& engine,
const std::string server_name,
const std::string client_name,
void* jack_client) = NULL;
-
+
if (!world->local_engine->audio_driver()) {
bool found = _engine_jack_module->get_symbol(
"new_jack_audio_driver", (void*&)(new_driver));
@@ -252,10 +252,10 @@ ConnectWindow::connect(bool existing)
}
world->local_engine->activate(1); // FIXME: parallelism
-
+
App::instance().attach(client);
App::instance().register_callbacks();
-
+
Glib::signal_timeout().connect(
sigc::mem_fun(this, &ConnectWindow::gtk_callback), 10);
}
@@ -336,10 +336,10 @@ ConnectWindow::load_widgets()
_connect_button->signal_clicked().connect(sigc::bind(
sigc::mem_fun(this, &ConnectWindow::connect), false));
_quit_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::quit));
-
+
_progress_bar->set_pulse_step(0.01);
_widgets_loaded = true;
-
+
_engine_module = Ingen::Shared::load_module("ingen_engine");
if (!_engine_module)
cerr << "Unable to load ingen_engine module, internal engine unavailable." << endl;
@@ -348,7 +348,7 @@ ConnectWindow::load_widgets()
cerr << "Unable to find module entry point, internal engine unavailable." << endl;
_engine_module.reset();
}
-
+
_engine_jack_module = Ingen::Shared::load_module("ingen_engine_jack");
server_toggled();
@@ -412,7 +412,7 @@ bool
ConnectWindow::gtk_callback()
{
/* If I call this a "state machine" it's not ugly code any more */
-
+
// Timing stuff for repeated attach attempts
timeval now;
gettimeofday(&now, NULL);
@@ -428,7 +428,7 @@ ConnectWindow::gtk_callback()
set_connecting_widget_states();
}
}
-
+
/* Connecting to engine */
if (_connect_stage == 0) {
@@ -439,11 +439,11 @@ ConnectWindow::gtk_callback()
App::instance().client()->signal_response_ok.connect(
sigc::mem_fun(this, &ConnectWindow::on_response));
-
+
_ping_id = abs(rand()) / 2 * 2; // avoid -1
App::instance().engine()->set_next_response_id(_ping_id);
App::instance().engine()->ping();
-
+
if (_widgets_loaded) {
_progress_label->set_text("Connecting to engine...");
_progress_bar->set_pulse_step(0.01);
@@ -490,10 +490,10 @@ ConnectWindow::gtk_callback()
_finished_connecting = true;
return false; // deregister this callback
}
-
+
if (_widgets_loaded)
_progress_bar->pulse();
-
+
if (_connect_stage == -1) { // we were cancelled
if (_widgets_loaded) {
_icon->set(Gtk::Stock::DISCONNECT, Gtk::ICON_SIZE_LARGE_TOOLBAR);
diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp
index a435e900..bc5b46f4 100644
--- a/src/gui/ConnectWindow.hpp
+++ b/src/gui/ConnectWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -50,7 +50,7 @@ class ConnectWindow : public Gtk::Dialog
{
public:
ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
-
+
void set_connected_to(SharedPtr<Shared::EngineInterface> engine);
void start(Ingen::Shared::World* world);
void on_response(int32_t id) { _attached = true; }
@@ -63,7 +63,7 @@ private:
void server_toggled();
void launch_toggled();
void internal_toggled();
-
+
void disconnect();
void connect(bool existing);
void activate();
diff --git a/src/gui/Connection.hpp b/src/gui/Connection.hpp
index 5291a7c7..ad5e4153 100644
--- a/src/gui/Connection.hpp
+++ b/src/gui/Connection.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -30,7 +30,7 @@ namespace GUI {
/** A Connection in a Patch.
- *
+ *
* \ingroup GUI
*/
class Connection : public FlowCanvas::Connection
@@ -48,7 +48,7 @@ public:
virtual ~Connection() {}
SharedPtr<ConnectionModel> model() const { return _connection_model; }
-
+
private:
SharedPtr<ConnectionModel> _connection_model;
};
diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp
index ccfb54d2..634d35e0 100644
--- a/src/gui/ControlPanel.cpp
+++ b/src/gui/ControlPanel.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License alongCont
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -30,7 +30,7 @@ using namespace Raul;
namespace Ingen {
namespace GUI {
-
+
ControlPanel::ControlPanel(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::HBox(cobject)
, _callback_enabled(true)
@@ -40,7 +40,7 @@ ControlPanel::ControlPanel(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
xml->get_widget("control_panel_all_voices_radio", _all_voices_radio);
xml->get_widget("control_panel_specific_voice_radio", _specific_voice_radio);
xml->get_widget("control_panel_voice_spinbutton", _voice_spinbutton);
-
+
_all_voices_radio->signal_toggled().connect(
sigc::mem_fun(this, &ControlPanel::all_voices_selected));
@@ -63,7 +63,7 @@ ControlPanel::init(SharedPtr<NodeModel> node, uint32_t poly)
{
assert(node != NULL);
assert(poly > 0);
-
+
if (node->polyphonic()) {
_voice_spinbutton->set_range(0, poly - 1);
_voice_control_box->show();
@@ -74,7 +74,7 @@ ControlPanel::init(SharedPtr<NodeModel> node, uint32_t poly)
for (NodeModel::Ports::const_iterator i = node->ports().begin(); i != node->ports().end(); ++i) {
add_port(*i);
}
-
+
node->signal_property.connect(
sigc::mem_fun(this, &ControlPanel::variable_changed));
@@ -84,7 +84,7 @@ ControlPanel::init(SharedPtr<NodeModel> node, uint32_t poly)
} else {
cerr << "[ControlPanel] No parent, polyphonic controls disabled" << endl;
}
-
+
_callback_enabled = true;
}
@@ -106,15 +106,15 @@ void
ControlPanel::add_port(SharedPtr<PortModel> pm)
{
assert(pm);
-
+
// Already have port, don't add another
if (find_port(pm->path()) != NULL)
return;
-
+
// Add port
if (pm->type().is_control() && pm->is_input()) {
Control* control = NULL;
-
+
if (pm->is_toggle()) {
ToggleControl* tc;
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("toggle_control");
@@ -126,12 +126,12 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
xml->get_widget_derived("control_strip", sc);
control = sc;
}
-
+
control->init(this, pm);
-
+
if (_controls.size() > 0)
_control_box->pack_start(*Gtk::manage(new Gtk::HSeparator()), false, false, 4);
-
+
_controls.push_back(control);
_control_box->pack_start(*control, false, false, 0);
@@ -143,7 +143,7 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
_control_box->size_request(controls_size);
_ideal_size.first = controls_size.width;
_ideal_size.second = controls_size.height;
-
+
Gtk::Requisition voice_size;
_voice_control_box->size_request(voice_size);
_ideal_size.first += voice_size.width;
@@ -270,6 +270,6 @@ ControlPanel::variable_changed(const Raul::URI& predicate, const Raul::Atom& val
}
}
-
+
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/ControlPanel.hpp b/src/gui/ControlPanel.hpp
index 4e2204ef..0895ad51 100644
--- a/src/gui/ControlPanel.hpp
+++ b/src/gui/ControlPanel.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -51,7 +51,7 @@ class ControlPanel : public Gtk::HBox {
public:
ControlPanel(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
virtual ~ControlPanel();
-
+
void init(SharedPtr<NodeModel> node, uint32_t poly);
Control* find_port(const Raul::Path& path) const;
@@ -61,22 +61,22 @@ public:
void enable_port(const Raul::Path& path);
void disable_port(const Raul::Path& path);
-
+
size_t num_controls() const { return _controls.size(); }
std::pair<int,int> ideal_size() const { return _ideal_size; }
-
+
// Callback for Control
void value_changed(SharedPtr<PortModel> port_path, float val);
-
+
private:
void all_voices_selected();
void specific_voice_selected();
-
+
void variable_changed(const Raul::URI& predicate, const Raul::Atom& value);
void parent_property_changed(const Raul::URI& predicate, const Raul::Atom& value);
bool _callback_enabled;
-
+
std::pair<int,int> _ideal_size;
std::vector<Control*> _controls;
diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp
index f163befe..0314f799 100644
--- a/src/gui/Controls.cpp
+++ b/src/gui/Controls.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -46,11 +46,11 @@ Control::Control(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>&
Glib::RefPtr<Gnome::Glade::Xml> menu_xml = GladeFactory::new_glade_reference("port_control_menu");
menu_xml->get_widget("port_control_menu", _menu);
menu_xml->get_widget("port_control_menu_properties", _menu_properties);
-
+
_menu_properties->signal_activate().connect(
sigc::mem_fun(this, &SliderControl::menu_properties));
}
-
+
Control::~Control()
{
@@ -72,7 +72,7 @@ Control::init(ControlPanel* panel, SharedPtr<PortModel> pm)
_control_connection = pm->signal_value_changed.connect(sigc::mem_fun(this, &Control::set_value));
}
-
+
void
Control::menu_properties()
{
@@ -109,7 +109,7 @@ SliderControl::init(ControlPanel* panel, SharedPtr<PortModel> pm)
assert(_slider);
set_name(pm->path().name());
-
+
_slider->set_draw_value(false);
signal_button_press_event().connect(sigc::mem_fun(*this, &SliderControl::clicked));
@@ -120,12 +120,12 @@ SliderControl::init(ControlPanel* panel, SharedPtr<PortModel> pm)
_slider->signal_value_changed().connect(
sigc::mem_fun(*this, &SliderControl::update_value_from_slider));
-
+
_value_spinner->signal_value_changed().connect(
sigc::mem_fun(*this, &SliderControl::update_value_from_spinner));
float min = 0.0f, max = 1.0f;
-
+
boost::shared_ptr<NodeModel> parent = PtrCast<NodeModel>(_port_model->parent());
if (parent)
parent->port_value_range(_port_model, min, max);
@@ -136,7 +136,7 @@ SliderControl::init(ControlPanel* panel, SharedPtr<PortModel> pm)
} else {
_slider->set_increments(0, 0);
}
-
+
pm->signal_variable.connect(sigc::mem_fun(this, &SliderControl::port_variable_change));
_slider->set_range(std::min(min, pm->value().get_float()), std::max(max, pm->value().get_float()));
@@ -166,7 +166,7 @@ void
SliderControl::set_value(const Atom& atom)
{
float val = atom.get_float();
-
+
if (_port_model->is_integer())
val = lrintf(val);
@@ -186,17 +186,17 @@ SliderControl::set_value(const Atom& atom)
_enable_signal = true;
}
-
+
void
SliderControl::port_variable_change(const URI& key, const Atom& value)
{
_enable_signal = false;
-
+
if (key.str() == "lv2:minimum" && value.type() == Atom::FLOAT)
set_range(value.get_float(), _slider->get_adjustment()->get_upper());
else if (key.str() == "lv2:maximum" && value.type() == Atom::FLOAT)
set_range(_slider->get_adjustment()->get_lower(), value.get_float());
-
+
_enable_signal = true;
}
@@ -206,7 +206,7 @@ SliderControl::set_range(float min, float max)
{
if (max <= min)
max = min + 1.0;
-
+
_slider->set_range(min, max);
//_value_spinner->set_range(min, max);
}
@@ -249,20 +249,20 @@ SliderControl::update_value_from_slider()
if (_enable_signal) {
float value = _slider->get_value();
bool change = true;
-
+
_enable_signal = false;
-
+
if (_port_model->is_integer()) {
value = lrintf(value);
if (value == lrintf(_port_model->value().get_float()))
change = false;
}
-
+
if (change) {
_value_spinner->set_value(value);
_control_panel->value_changed(_port_model, value);
}
-
+
_enable_signal = true;
}
}
@@ -278,7 +278,7 @@ SliderControl::update_value_from_spinner()
set_value(value);
_control_panel->value_changed(_port_model, value);
-
+
//m_port_model->value(value);
_enable_signal = true;
}
@@ -299,7 +299,7 @@ SliderControl::slider_pressed(GdkEvent* ev)
_enabled = true;
//GtkClientInterface::instance()->clear_ignore_port();
}
-
+
return false;
}
@@ -321,7 +321,7 @@ IntegerControl::IntegerControl(ControlPanel* panel, SharedPtr<PortModel> pm)
_spinner.signal_value_changed().connect(
sigc::mem_fun(*this, &IntegerControl::update_value));
_spinner.set_increments(1, 10);
-
+
_alignment.add(_spinner);
pack_start(_name_label);
pack_start(_alignment);
@@ -389,7 +389,7 @@ ToggleControl::ToggleControl(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
xml->get_widget("toggle_control_check", _checkbutton);
}
-
+
void
ToggleControl::init(ControlPanel* panel, SharedPtr<PortModel> pm)
{
@@ -435,7 +435,7 @@ ToggleControl::set_value(const Atom& val)
default:
cerr << "Unsupported value type for toggle control" << endl;
}
-
+
_enable_signal = false;
_checkbutton->set_active(enable);
_enable_signal = true;
diff --git a/src/gui/Controls.hpp b/src/gui/Controls.hpp
index d83a0bff..d85afffc 100644
--- a/src/gui/Controls.hpp
+++ b/src/gui/Controls.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -42,25 +42,25 @@ class Control : public Gtk::VBox
public:
Control(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
virtual ~Control();
-
+
virtual void init(ControlPanel* panel, SharedPtr<Client::PortModel> pm);
-
+
virtual void enable() = 0;
virtual void disable() = 0;
-
+
inline const SharedPtr<Client::PortModel> port_model() const { return _port_model; }
protected:
virtual void set_value(const Raul::Atom& value) = 0;
virtual void set_range(float min, float max) {}
-
+
void menu_properties();
ControlPanel* _control_panel;
SharedPtr<Client::PortModel> _port_model;
sigc::connection _control_connection;
bool _enable_signal;
-
+
Gtk::Menu* _menu;
Gtk::MenuItem* _menu_properties;
};
@@ -78,7 +78,7 @@ public:
void enable();
void disable();
-
+
void set_min(float val);
void set_max(float val);
@@ -86,18 +86,18 @@ private:
void set_name(const std::string& name);
void set_value(const Raul::Atom& value);
void set_range(float min, float max);
-
+
void port_variable_change(const Raul::URI& key, const Raul::Atom& value);
void update_range();
void update_value_from_slider();
void update_value_from_spinner();
-
+
bool slider_pressed(GdkEvent* ev);
bool clicked(GdkEventButton* ev);
bool _enabled;
-
+
Gtk::Label* _name_label;
Gtk::SpinButton* _value_spinner;
Gtk::HScale* _slider;
@@ -107,23 +107,23 @@ private:
#if 0
/** A spinbutton for integer controls.
- *
+ *
* \ingroup GUI
*/
class IntegerControl : public Control
{
public:
IntegerControl(ControlPanel* panel, SharedPtr<PortModel> pm);
-
+
void enable();
void disable();
-
+
private:
void set_name(const string& name);
void set_value(float val);
void update_value();
-
+
bool _enable_signal;
Gtk::Alignment _alignment;
Gtk::Label _name_label;
@@ -133,25 +133,25 @@ private:
/** A radio button for toggle controls.
- *
+ *
* \ingroup GUI
*/
class ToggleControl : public Control
{
public:
ToggleControl(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
-
+
void init(ControlPanel* panel, SharedPtr<Client::PortModel> pm);
-
+
void enable();
void disable();
-
+
private:
void set_name(const std::string& name);
void set_value(const Raul::Atom& value);
void toggled();
-
+
Gtk::Label* _name_label;
Gtk::CheckButton* _checkbutton;
};
diff --git a/src/gui/GladeFactory.cpp b/src/gui/GladeFactory.cpp
index 0cbb0470..aa445f30 100644
--- a/src/gui/GladeFactory.cpp
+++ b/src/gui/GladeFactory.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -44,7 +44,7 @@ GladeFactory::find_glade_file()
cerr << "Unable to find ingen_gui.glade in " << INGEN_DATA_DIR << endl;
throw;
}
-
+
fs.close();
cerr << "[GladeFactory] Loading widgets from " << glade_filename.c_str() << endl;
}
diff --git a/src/gui/GladeFactory.hpp b/src/gui/GladeFactory.hpp
index 6da2da5f..f0e15373 100644
--- a/src/gui/GladeFactory.hpp
+++ b/src/gui/GladeFactory.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp
index d693704f..17ea7640 100644
--- a/src/gui/LoadPatchWindow.cpp
+++ b/src/gui/LoadPatchWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -46,7 +46,7 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno
xml->get_widget("load_patch_poly_spinbutton", _poly_spinbutton);
xml->get_widget("load_patch_ok_button", _ok_button);
xml->get_widget("load_patch_cancel_button", _cancel_button);
-
+
_poly_from_current_radio->signal_toggled().connect(
sigc::mem_fun(this, &LoadPatchWindow::poly_from_file_selected));
_poly_from_file_radio->signal_toggled().connect(
@@ -57,7 +57,7 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno
sigc::mem_fun(this, &LoadPatchWindow::ok_clicked));
_cancel_button->signal_clicked().connect(
sigc::mem_fun(this, &LoadPatchWindow::cancel_clicked));
-
+
_poly_from_current_radio->set_active(true);
Gtk::FileFilter filt;
@@ -132,10 +132,10 @@ LoadPatchWindow::ok_clicked()
// If unset load_patch will load value
optional<Path> parent;
optional<Symbol> symbol;
-
+
if (_poly_from_user_radio->get_active())
_initial_data.insert(make_pair("ingen:polyphony", _poly_spinbutton->get_value_as_int()));
-
+
if (_replace)
App::instance().engine()->clear_patch(_patch->path());
@@ -146,10 +146,10 @@ LoadPatchWindow::ok_clicked()
_patch.reset();
hide();
-
+
App::instance().loader()->load_patch(true, get_uri(), Path("/"),
parent, symbol, _initial_data);
-}
+}
void
diff --git a/src/gui/LoadPatchWindow.hpp b/src/gui/LoadPatchWindow.hpp
index 2cd9ef9e..58c421ef 100644
--- a/src/gui/LoadPatchWindow.hpp
+++ b/src/gui/LoadPatchWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -32,7 +32,7 @@ using Ingen::Client::PluginModel;
using Ingen::Client::PatchModel;
namespace GUI {
-
+
/** 'Load Patch' window.
*
@@ -77,7 +77,7 @@ private:
Gtk::Button* _ok_button;
Gtk::Button* _cancel_button;
};
-
+
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index 5b2c7925..7361d5a9 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -47,10 +47,10 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<G
xml->get_widget("load_plugin_add_button", _add_button);
//xml->get_widget("load_plugin_close_button", _close_button);
//xml->get_widget("load_plugin_ok_button", _add_button);
-
+
xml->get_widget("load_plugin_filter_combo", _filter_combo);
xml->get_widget("load_plugin_search_entry", _search_entry);
-
+
// Set up the plugins list
_plugins_liststore = Gtk::ListStore::create(_plugins_columns);
_plugins_treeview->set_model(_plugins_liststore);
@@ -58,7 +58,7 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<G
_plugins_treeview->append_column("Name", _plugins_columns._col_name);
_plugins_treeview->append_column("Type", _plugins_columns._col_type);
_plugins_treeview->append_column("URI", _plugins_columns._col_uri);
-
+
// This could be nicer.. store the TreeViewColumns locally maybe?
_plugins_treeview->get_column(1)->set_sort_column(_plugins_columns._col_name);
_plugins_treeview->get_column(2)->set_sort_column(_plugins_columns._col_type);
@@ -67,7 +67,7 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<G
//m_plugins_treeview->get_column(4)->set_sort_column(_plugins_columns._col_label);
for (int i=0; i < 3; ++i)
_plugins_treeview->get_column(i)->set_resizable(true);
-
+
_plugins_liststore->set_default_sort_func(
sigc::mem_fun(this, &LoadPluginWindow::plugin_compare));
@@ -139,7 +139,7 @@ LoadPluginWindow::name_changed()
} else {
//m_message_label->set_text("");
_add_button->property_sensitive() = true;
- }
+ }
}
@@ -168,7 +168,7 @@ LoadPluginWindow::set_patch(SharedPtr<PatchModel> patch)
*
* This is done here instead of construction time as the list population is
* really expensive and bogs down creation of a patch. This is especially
- * important when many patch notifications are sent at one time from the
+ * important when many patch notifications are sent at one time from the
* engine.
*/
void
@@ -244,7 +244,7 @@ LoadPluginWindow::add_plugin(SharedPtr<PluginModel> plugin)
Gtk::TreeModel::iterator iter = _plugins_liststore->append();
Gtk::TreeModel::Row row = *iter;
_rows.insert(make_pair(plugin->uri(), iter));
-
+
row[_plugins_columns._col_name] = plugin->name();
if (!strcmp(plugin->type_uri(), "ingen:Internal"))
row[_plugins_columns._col_type] = "Internal";
@@ -307,7 +307,7 @@ LoadPluginWindow::generate_module_name(int offset)
string name = "";
Gtk::TreeModel::iterator iter = _selection->get_selected();
-
+
if (iter) {
Gtk::TreeModel::Row row = *iter;
SharedPtr<PluginModel> plugin = row.get_value(_plugins_columns._col_plugin_model);
@@ -327,8 +327,8 @@ LoadPluginWindow::add_clicked()
{
Gtk::TreeModel::iterator iter = _selection->get_selected();
bool polyphonic = _polyphonic_checkbutton->get_active();
-
- if (iter) { // If anything is selected
+
+ if (iter) { // If anything is selected
Gtk::TreeModel::Row row = *iter;
SharedPtr<PluginModel> plugin = row.get_value(_plugins_columns._col_plugin_model);
string name = _node_name_entry->get_text();
@@ -349,7 +349,7 @@ LoadPluginWindow::add_clicked()
i != _initial_data.end(); ++i)
App::instance().engine()->set_variable(path, i->first, i->second);
_node_name_entry->set_text(generate_module_name(++_plugin_name_offset));
-
+
// Cascade
Atom& x = _initial_data["ingenuity:canvas-x"];
x = Atom(x.get_float() + 20.0f);
@@ -388,16 +388,16 @@ LoadPluginWindow::filter_changed()
// Get selected criteria
const Gtk::TreeModel::Row row = *(_filter_combo->get_active());
CriteriaColumns::Criteria criteria = row[_criteria_columns._col_criteria];
-
+
string field;
-
+
Gtk::TreeModel::Row model_row;
Gtk::TreeModel::iterator model_iter;
size_t num_visible = 0;
-
+
for (ClientStore::Plugins::const_iterator i = App::instance().store()->plugins()->begin();
i != App::instance().store()->plugins()->end(); ++i) {
-
+
const SharedPtr<PluginModel> plugin = (*i).second;
switch (criteria) {
@@ -410,13 +410,13 @@ LoadPluginWindow::filter_changed()
default:
throw;
}
-
+
transform(field.begin(), field.end(), field.begin(), ::toupper);
-
+
if (field.find(search) != string::npos) {
model_iter = _plugins_liststore->append();
model_row = *model_iter;
-
+
model_row[_plugins_columns._col_name] = plugin->name();
model_row[_plugins_columns._col_type] = plugin->type_uri();
model_row[_plugins_columns._col_uri] = plugin->uri().str();
diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp
index 0ff24ed7..09169ec0 100644
--- a/src/gui/LoadPluginWindow.hpp
+++ b/src/gui/LoadPluginWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -36,7 +36,7 @@ using Ingen::Client::PluginModel;
using Ingen::Client::PatchModel;
namespace GUI {
-
+
// Gtkmm _really_ needs to add some helper to abstract away this stupid nonsense
@@ -75,9 +75,9 @@ class CriteriaColumns : public Gtk::TreeModel::ColumnRecord
{
public:
enum Criteria { NAME, TYPE, URI, };
-
+
CriteriaColumns() { add(_col_label); add(_col_criteria); }
-
+
Gtk::TreeModelColumn<Glib::ustring> _col_label;
Gtk::TreeModelColumn<Criteria> _col_criteria;
};
@@ -104,7 +104,7 @@ public:
protected:
void on_show();
bool on_key_press_event(GdkEventKey* event);
-
+
private:
void add_clicked();
//void close_clicked();
@@ -112,7 +112,7 @@ private:
void filter_changed();
void clear_clicked();
void name_changed();
-
+
void new_plugin(SharedPtr<PluginModel> plugin);
void plugin_property_changed(const Raul::URI& plugin,
@@ -132,17 +132,17 @@ private:
typedef std::map<Raul::URI, Gtk::TreeModel::iterator> Rows;
Rows _rows;
-
+
Glib::RefPtr<Gtk::ListStore> _plugins_liststore;
ModelColumns _plugins_columns;
Glib::RefPtr<Gtk::ListStore> _criteria_liststore;
CriteriaColumns _criteria_columns;
-
+
Glib::RefPtr<Gtk::TreeSelection> _selection;
-
+
int _plugin_name_offset; // see comments for generate_plugin_name
-
+
bool _has_shown;
bool _refresh_list;
Gtk::TreeView* _plugins_treeview;
diff --git a/src/gui/LoadRemotePatchWindow.cpp b/src/gui/LoadRemotePatchWindow.cpp
index ecfe5240..fc2a1653 100644
--- a/src/gui/LoadRemotePatchWindow.cpp
+++ b/src/gui/LoadRemotePatchWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -44,12 +44,12 @@ LoadRemotePatchWindow::LoadRemotePatchWindow(BaseObjectType* cobject, const Glib
xml->get_widget("load_remote_patch_uri_entry", _uri_entry);
xml->get_widget("load_remote_patch_cancel_button", _cancel_button);
xml->get_widget("load_remote_patch_open_button", _open_button);
-
+
_liststore = Gtk::ListStore::create(_columns);
_treeview->set_model(_liststore);
_treeview->append_column("Name", _columns._col_name);
_treeview->append_column("URI", _columns._col_uri);
-
+
_selection = _treeview->get_selection();
_selection->signal_changed().connect(sigc::mem_fun(this, &LoadRemotePatchWindow::patch_selected));
_treeview->signal_row_activated().connect(sigc::mem_fun(this, &LoadRemotePatchWindow::patch_activated));
@@ -67,7 +67,7 @@ LoadRemotePatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Propert
set_patch(patch);
_initial_data = data;
-
+
Redland::Model model(*App::instance().world()->rdf_world,
"http://rdf.drobilla.net/ingen_patches/index.ttl",
"http://rdf.drobilla.net/ingen_patches/");
@@ -79,7 +79,7 @@ LoadRemotePatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Propert
"}"));
Redland::Query::Results results = query.run(*App::instance().world()->rdf_world, model);
-
+
for (Redland::Query::Results::iterator i = results.begin(); i != results.end(); ++i) {
Gtk::TreeModel::iterator iter = _liststore->append();
(*iter)[_columns._col_name] = (*i)["name"].to_string();
@@ -87,7 +87,7 @@ LoadRemotePatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Propert
}
_treeview->columns_autosize();
-
+
Gtk::Window::present();
}
@@ -121,8 +121,8 @@ void
LoadRemotePatchWindow::patch_selected()
{
Gtk::TreeModel::iterator selected_i = _selection->get_selected();
-
- if (selected_i) { // If anything is selected
+
+ if (selected_i) { // If anything is selected
const Glib::ustring uri = selected_i->get_value(_columns._col_uri);
_uri_entry->set_text(uri);
}
@@ -137,7 +137,7 @@ LoadRemotePatchWindow::open_clicked()
// If unset load_patch will load values
optional<Path> parent;
optional<Symbol> symbol;
-
+
if (_replace)
App::instance().engine()->clear_patch(_patch->path());
@@ -146,9 +146,9 @@ LoadRemotePatchWindow::open_clicked()
App::instance().loader()->load_patch(true, uri, Path("/"),
parent, symbol, _initial_data);
-
+
hide();
-}
+}
void
diff --git a/src/gui/LoadRemotePatchWindow.hpp b/src/gui/LoadRemotePatchWindow.hpp
index 211924d5..9af0d922 100644
--- a/src/gui/LoadRemotePatchWindow.hpp
+++ b/src/gui/LoadRemotePatchWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -77,7 +77,7 @@ private:
SharedPtr<PatchModel> _patch;
bool _replace;
-
+
Glib::RefPtr<Gtk::TreeSelection> _selection;
Glib::RefPtr<Gtk::ListStore> _liststore;
PatchColumns _columns;
@@ -87,7 +87,7 @@ private:
Gtk::Button* _open_button;
Gtk::Button* _cancel_button;
};
-
+
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/LoadSubpatchWindow.cpp b/src/gui/LoadSubpatchWindow.cpp
index 302b5387..548039c5 100644
--- a/src/gui/LoadSubpatchWindow.cpp
+++ b/src/gui/LoadSubpatchWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -66,7 +66,7 @@ LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefP
set_filter(filt);
property_select_multiple() = true;
-
+
// Add global examples directory to "shortcut folders" (bookmarks)
const string examples_dir = Shared::data_file_path("patches");
DIR* d = opendir(examples_dir.c_str());
@@ -146,11 +146,11 @@ void
LoadSubpatchWindow::ok_clicked()
{
assert(_patch);
-
+
// If unset load_patch will load values
optional<Raul::Symbol> symbol;
string name_str = "";
-
+
if (_name_from_user_radio->get_active()) {
name_str = _name_entry->get_text();
symbol = Symbol::symbolify(name_str);
@@ -176,7 +176,7 @@ LoadSubpatchWindow::ok_clicked()
}
hide();
-}
+}
void
diff --git a/src/gui/LoadSubpatchWindow.hpp b/src/gui/LoadSubpatchWindow.hpp
index 9e4fda0d..5a34363b 100644
--- a/src/gui/LoadSubpatchWindow.hpp
+++ b/src/gui/LoadSubpatchWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -30,7 +30,7 @@ namespace Client { class PatchModel; }
using Ingen::Client::PatchModel;
namespace GUI {
-
+
/** 'Add Subpatch' window.
*
@@ -44,7 +44,7 @@ public:
LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
void set_patch(SharedPtr<PatchModel> patch);
-
+
void present(SharedPtr<PatchModel> patch, GraphObject::Properties data);
protected:
@@ -55,14 +55,14 @@ private:
void enable_name_entry();
void disable_poly_spinner();
void enable_poly_spinner();
-
+
void ok_clicked();
void cancel_clicked();
GraphObject::Properties _initial_data;
SharedPtr<PatchModel> _patch;
-
+
Gtk::RadioButton* _name_from_file_radio;
Gtk::RadioButton* _name_from_user_radio;
Gtk::Entry* _name_entry;
@@ -73,7 +73,7 @@ private:
Gtk::Button* _ok_button;
Gtk::Button* _cancel_button;
};
-
+
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/MessagesWindow.cpp b/src/gui/MessagesWindow.cpp
index 3da810f6..71967a0e 100644
--- a/src/gui/MessagesWindow.cpp
+++ b/src/gui/MessagesWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/gui/MessagesWindow.hpp b/src/gui/MessagesWindow.hpp
index dea0fdd4..4099fee7 100644
--- a/src/gui/MessagesWindow.hpp
+++ b/src/gui/MessagesWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -26,7 +26,7 @@ using std::string;
namespace Ingen {
namespace GUI {
-
+
/** Messages Window.
*
diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp
index c6be5230..b5145afe 100644
--- a/src/gui/NewSubpatchWindow.cpp
+++ b/src/gui/NewSubpatchWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -41,7 +41,7 @@ NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr
_name_entry->signal_changed().connect(sigc::mem_fun(this, &NewSubpatchWindow::name_changed));
_ok_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::ok_clicked));
_cancel_button->signal_clicked().connect(sigc::mem_fun(this, &NewSubpatchWindow::cancel_clicked));
-
+
_ok_button->property_sensitive() = false;
}
@@ -84,7 +84,7 @@ NewSubpatchWindow::name_changed()
} else {
_message_label->set_text("");
_ok_button->property_sensitive() = true;
- }
+ }
}
@@ -99,9 +99,9 @@ NewSubpatchWindow::ok_clicked()
App::instance().engine()->set_variable(path, i->first, i->second);
App::instance().engine()->set_variable(path, "ingen:enabled", (bool)true);
-
+
hide();
-}
+}
void
diff --git a/src/gui/NewSubpatchWindow.hpp b/src/gui/NewSubpatchWindow.hpp
index 186e0953..6a0882cc 100644
--- a/src/gui/NewSubpatchWindow.hpp
+++ b/src/gui/NewSubpatchWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -30,7 +30,7 @@ namespace Client { class PatchModel; }
using Ingen::Client::PatchModel;
namespace GUI {
-
+
/** 'New Subpatch' window.
*
@@ -54,14 +54,14 @@ private:
GraphObject::Properties _initial_data;
SharedPtr<PatchModel> _patch;
-
+
Gtk::Entry* _name_entry;
Gtk::Label* _message_label;
Gtk::SpinButton* _poly_spinbutton;
Gtk::Button* _ok_button;
Gtk::Button* _cancel_button;
};
-
+
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/NodeControlWindow.cpp b/src/gui/NodeControlWindow.cpp
index 0384c934..505599b6 100644
--- a/src/gui/NodeControlWindow.cpp
+++ b/src/gui/NodeControlWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License alongCont
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -41,7 +41,7 @@ NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, uint32_t poly)
, _y(0)
{
assert(_node != NULL);
-
+
property_resizable() = true;
set_border_width(5);
@@ -49,15 +49,15 @@ NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, uint32_t poly)
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference("warehouse_win");
xml->get_widget_derived("control_panel_vbox", _control_panel);
-
+
show_all_children();
-
+
_control_panel->reparent(*this);
_control_panel->init(_node, poly);
_control_panel->show();
resize();
-
+
_callback_enabled = true;
}
@@ -69,7 +69,7 @@ NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, ControlPanel* pa
, _control_panel(panel)
{
assert(_node);
-
+
property_resizable() = true;
set_border_width(5);
@@ -79,7 +79,7 @@ NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, ControlPanel* pa
show_all_children();
resize();
-
+
_callback_enabled = true;
}
diff --git a/src/gui/NodeControlWindow.hpp b/src/gui/NodeControlWindow.hpp
index 2e6c5837..0e3374eb 100644
--- a/src/gui/NodeControlWindow.hpp
+++ b/src/gui/NodeControlWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -33,7 +33,7 @@ using Ingen::Client::NodeModel;
namespace Ingen {
namespace GUI {
-
+
class ControlGroup;
class ControlPanel;
@@ -52,7 +52,7 @@ public:
SharedPtr<NodeModel> node() { return _node; }
ControlPanel* control_panel() const { return _control_panel; }
-
+
void resize();
protected:
@@ -63,7 +63,7 @@ private:
SharedPtr<NodeModel> _node;
ControlPanel* _control_panel;
bool _callback_enabled;
-
+
bool _position_stored;
int _x;
int _y;
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 5917b400..6a9734cb 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -49,7 +49,7 @@ NodeMenu::NodeMenu(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml
node_menu->remove(*_popup_gui_menuitem);
node_menu->remove(*_embed_gui_menuitem);
node_menu->remove(*_randomize_menuitem);
-
+
insert(*_randomize_menuitem, 0);
items().push_front(Gtk::Menu_Helpers::SeparatorElem());
insert(*_controls_menuitem, 0);
@@ -63,7 +63,7 @@ void
NodeMenu::init(SharedPtr<NodeModel> node)
{
ObjectMenu::init(node);
-
+
_learn_menuitem->signal_activate().connect(sigc::mem_fun(this,
&NodeMenu::on_menu_learn));
_controls_menuitem->signal_activate().connect(sigc::bind(
@@ -84,7 +84,7 @@ NodeMenu::init(SharedPtr<NodeModel> node)
_popup_gui_menuitem->hide();
_embed_gui_menuitem->hide();
}
-
+
#ifdef HAVE_SLV2
if (plugin && plugin->type() == PluginModel::LV2) {
SLV2Results presets = slv2_plugin_query_sparql(plugin->slv2_plugin(),
@@ -160,7 +160,7 @@ NodeMenu::on_menu_learn()
App::instance().engine()->midi_learn(_object->path());
}
-
+
void
NodeMenu::on_menu_disconnect()
{
@@ -202,7 +202,7 @@ NodeMenu::has_control_inputs()
for (NodeModel::Ports::const_iterator i = nm->ports().begin(); i != nm->ports().end(); ++i)
if ((*i)->is_input() && (*i)->type().is_control())
return true;
-
+
return false;
}
diff --git a/src/gui/NodeMenu.hpp b/src/gui/NodeMenu.hpp
index a15b2b91..de930449 100644
--- a/src/gui/NodeMenu.hpp
+++ b/src/gui/NodeMenu.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -38,19 +38,19 @@ class NodeMenu : public ObjectMenu
{
public:
NodeMenu(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
-
+
virtual void program_add(int bank, int program, const std::string& name) {}
virtual void program_remove(int bank, int program) {}
void init(SharedPtr<NodeModel> node);
bool has_control_inputs();
-
+
sigc::signal<void> signal_popup_gui;
sigc::signal<void, bool> signal_embed_gui;
-
+
protected:
-
+
virtual void enable_controls_menuitem();
virtual void disable_controls_menuitem();
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index efc2febd..9dd8b7a7 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -60,7 +60,7 @@ NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeMode
NodeModule::~NodeModule()
{
NodeControlWindow* win = App::instance().window_factory()->control_window(_node);
-
+
if (win) {
// Should remove from window factory via signal
delete win;
@@ -76,7 +76,7 @@ NodeModule::create_menu()
_menu->init(_node);
_menu->signal_embed_gui.connect(sigc::mem_fun(this, &NodeModule::embed_gui));
_menu->signal_popup_gui.connect(sigc::hide_return(sigc::mem_fun(this, &NodeModule::popup_gui)));
-
+
set_menu(_menu);
}
@@ -98,7 +98,7 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n
for (NodeModel::Ports::const_iterator p = node->ports().begin(); p != node->ports().end(); ++p) {
ret->add_port(*p, false);
}
-
+
ret->set_stacked_border(node->polyphonic());
if (human)
@@ -119,7 +119,7 @@ NodeModule::show_human_names(bool b)
} else {
b = false;
}
-
+
if (!b)
set_name(node()->symbol());
@@ -210,7 +210,7 @@ NodeModule::embed_gui(bool embed)
if ((*p)->type().is_control() && (*p)->is_output())
App::instance().engine()->set_property((*p)->path(), "ingen:broadcast", false);
}
-
+
if (embed && _embed_item) {
initialise_gui_values();
set_base_color(0x212222FF);
@@ -234,7 +234,7 @@ void
NodeModule::add_port(SharedPtr<PortModel> port, bool resize_to_fit)
{
uint32_t index = _ports.size(); // FIXME: kludge, engine needs to tell us this
-
+
string name = port->path().name();
if (App::instance().configuration()->name_style() == Configuration::HUMAN && node()->plugin()) {
string hn = ((PluginModel*)node()->plugin())->port_human_name(index);
@@ -244,7 +244,7 @@ NodeModule::add_port(SharedPtr<PortModel> port, bool resize_to_fit)
Module::add_port(boost::shared_ptr<Port>(
new Port(PtrCast<NodeModule>(shared_from_this()), port, name)));
-
+
port->signal_value_changed.connect(sigc::bind<0>(
sigc::mem_fun(this, &NodeModule::value_changed), index));
@@ -252,7 +252,7 @@ NodeModule::add_port(SharedPtr<PortModel> port, bool resize_to_fit)
resize();
}
-
+
boost::shared_ptr<Port>
NodeModule::port(boost::shared_ptr<PortModel> model)
{
@@ -296,7 +296,7 @@ NodeModule::popup_gui()
if (_plugin_ui) {
GtkWidget* c_widget = (GtkWidget*)slv2_ui_instance_get_widget(_plugin_ui->instance());
_gui_widget = Glib::wrap(c_widget);
-
+
_gui_window = new Gtk::Window();
_gui_window->add(*_gui_widget);
_gui_widget->show_all();
@@ -324,7 +324,7 @@ NodeModule::on_gui_window_close()
_plugin_ui.reset();
_gui_widget = NULL;
}
-
+
void
NodeModule::initialise_gui_values()
@@ -343,7 +343,7 @@ NodeModule::show_control_window()
{
App::instance().window_factory()->present_controls(_node);
}
-
+
void
NodeModule::on_double_click(GdkEventButton* ev)
@@ -358,10 +358,10 @@ NodeModule::store_location()
{
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
-
+
const Atom& existing_x = _node->get_variable("ingenuity:canvas-x");
const Atom& existing_y = _node->get_variable("ingenuity:canvas-y");
-
+
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
App::instance().engine()->set_variable(_node->path(), "ingenuity:canvas-x", Atom(x));
diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp
index 47dfa374..6960a00e 100644
--- a/src/gui/NodeModule.hpp
+++ b/src/gui/NodeModule.hpp
@@ -1,14 +1,14 @@
/* This file is part of In* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -34,7 +34,7 @@ using namespace Ingen::Client;
namespace Ingen {
namespace GUI {
-
+
class PatchCanvas;
class Port;
class NodeMenu;
@@ -42,7 +42,7 @@ class NodeMenu;
/** A module in a patch.
*
- * This base class is extended for various types of modules.
+ * This base class is extended for various types of modules.
*
* \ingroup GUI
*/
@@ -55,9 +55,9 @@ public:
bool human_names);
virtual ~NodeModule();
-
+
boost::shared_ptr<Port> port(boost::shared_ptr<PortModel> model);
-
+
void remove_port(SharedPtr<PortModel> port);
virtual void store_location();
@@ -75,17 +75,17 @@ protected:
bool popup_gui();
void on_gui_window_close();
void set_selected(bool b);
-
+
void rename();
void set_variable(const Raul::URI& predicate, const Raul::Atom& value);
-
+
void add_port(SharedPtr<PortModel> port, bool resize=true);
void value_changed(uint32_t index, const Raul::Atom& value);
void initialise_gui_values();
void create_menu();
-
+
SharedPtr<NodeModel> _node;
NodeMenu* _menu;
SharedPtr<PluginUI> _plugin_ui;
diff --git a/src/gui/NodePropertiesWindow.cpp b/src/gui/NodePropertiesWindow.cpp
index 3739cd5e..1b01ab8b 100644
--- a/src/gui/NodePropertiesWindow.cpp
+++ b/src/gui/NodePropertiesWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -46,11 +46,11 @@ void
NodePropertiesWindow::set_node(SharedPtr<NodeModel> node_model)
{
assert(node_model);
-
+
_node_model = node_model;
set_title(node_model->path().str() + " Properties");
-
+
_node_path_label->set_text(node_model->path().str());
_node_polyphonic_toggle->set_active(node_model->polyphonic());
diff --git a/src/gui/NodePropertiesWindow.hpp b/src/gui/NodePropertiesWindow.hpp
index 0152ed5b..d626e225 100644
--- a/src/gui/NodePropertiesWindow.hpp
+++ b/src/gui/NodePropertiesWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -43,7 +43,7 @@ public:
void set_node(SharedPtr<NodeModel> node_model);
private:
-
+
SharedPtr<NodeModel> _node_model;
Gtk::Label* _node_path_label;
Gtk::CheckButton* _node_polyphonic_toggle;
diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp
index 904ada74..5b61857c 100644
--- a/src/gui/ObjectMenu.cpp
+++ b/src/gui/ObjectMenu.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -51,22 +51,22 @@ ObjectMenu::init(SharedPtr<ObjectModel> object)
_object = object;
App& app = App::instance();
-
+
_polyphonic_menuitem->signal_toggled().connect(
sigc::mem_fun(this, &ObjectMenu::on_menu_polyphonic));
-
+
_polyphonic_menuitem->set_active(object->polyphonic());
-
+
_disconnect_menuitem->signal_activate().connect(
sigc::mem_fun(this, &ObjectMenu::on_menu_disconnect));
_rename_menuitem->signal_activate().connect(sigc::bind(
sigc::mem_fun(app.window_factory(), &WindowFactory::present_rename),
object));
-
+
_destroy_menuitem->signal_activate().connect(
sigc::mem_fun(this, &ObjectMenu::on_menu_destroy));
-
+
_properties_menuitem->signal_activate().connect(
sigc::mem_fun(this, &ObjectMenu::on_menu_properties));
diff --git a/src/gui/ObjectMenu.hpp b/src/gui/ObjectMenu.hpp
index 3c59580c..ff93f7c9 100644
--- a/src/gui/ObjectMenu.hpp
+++ b/src/gui/ObjectMenu.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -40,7 +40,7 @@ class ObjectMenu : public Gtk::Menu
{
public:
ObjectMenu(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
-
+
void init(SharedPtr<ObjectModel> object);
protected:
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 99ed8446..8d71ca6a 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -72,7 +72,7 @@ PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
{
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference();
xml->get_widget("canvas_menu", _menu);
-
+
/*xml->get_widget("canvas_menu_add_number_control", _menu_add_number_control);
xml->get_widget("canvas_menu_add_button_control", _menu_add_button_control);*/
xml->get_widget("canvas_menu_add_audio_input", _menu_add_audio_input);
@@ -104,7 +104,7 @@ PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
_menu_add_event_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"event_out", "Event Out", "lv2ev:EventPort", true));
-
+
// Add control menu items
/*_menu_add_number_control->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_control), NUMBER));
@@ -118,9 +118,9 @@ PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
_patch->signal_removed_port.connect(sigc::mem_fun(this, &PatchCanvas::remove_port));
_patch->signal_new_connection.connect(sigc::mem_fun(this, &PatchCanvas::connection));
_patch->signal_removed_connection.connect(sigc::mem_fun(this, &PatchCanvas::disconnection));
-
+
App::instance().store()->signal_new_plugin.connect(sigc::mem_fun(this, &PatchCanvas::add_plugin));
-
+
// Connect widget signals to do things
_menu_load_plugin->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_plugin));
_menu_load_patch->signal_activate().connect(sigc::mem_fun(this, &PatchCanvas::menu_load_patch));
@@ -133,7 +133,7 @@ PatchCanvas::show_menu(GdkEvent* event)
{
if (!_internal_menu)
build_menus();
-
+
_menu->popup(event->button.button, event->button.time);
}
@@ -157,7 +157,7 @@ PatchCanvas::build_menus()
#ifdef HAVE_SLV2
if (!_plugin_menu)
build_plugin_menu();
-
+
// Build (or clear existing) uncategorized (classless, heh) plugins menu
if (_classless_menu) {
_classless_menu->items().clear();
@@ -169,7 +169,7 @@ PatchCanvas::build_menus()
_classless_menu->hide();
}
#endif
-
+
// Add known plugins to menu heirarchy
SharedPtr<const ClientStore::Plugins> plugins = App::instance().store()->plugins();
for (ClientStore::Plugins::const_iterator i = plugins->begin(); i != plugins->end(); ++i) {
@@ -191,11 +191,11 @@ PatchCanvas::build_plugin_class_menu(Gtk::Menu* menu,
const char* class_uri_str = slv2_value_as_string(class_uri);
_class_menus.insert(make_pair(class_uri_str, menu));
-
+
LV2Children::const_iterator kids_begin = children.find(class_uri_str);
if (kids_begin == children.end())
return 0;
-
+
LV2Children::const_iterator kids_end = children.upper_bound(class_uri_str);
// Add submenus
@@ -252,7 +252,7 @@ PatchCanvas::build()
{
boost::shared_ptr<PatchCanvas> shared_this =
boost::dynamic_pointer_cast<PatchCanvas>(shared_from_this());
-
+
// Create modules for nodes
for (ObjectModel::const_iterator i = App::instance().store()->children_begin(_patch);
i != App::instance().store()->children_end(_patch); ++i) {
@@ -274,12 +274,12 @@ PatchCanvas::build()
}
}
-
+
void
PatchCanvas::arrange(bool ingen_doesnt_use_length_hints)
{
FlowCanvas::Canvas::arrange(false);
-
+
for (list<boost::shared_ptr<Item> >::iterator i = _items.begin(); i != _items.end(); ++i)
(*i)->store_location();
}
@@ -293,7 +293,7 @@ PatchCanvas::show_human_names(bool b)
boost::shared_ptr<NodeModule> mod = boost::dynamic_pointer_cast<NodeModule>(*m);
if (mod)
mod->show_human_names(b);
-
+
boost::shared_ptr<PatchPortModule> pmod = boost::dynamic_pointer_cast<PatchPortModule>(*m);
if (pmod)
pmod->show_human_names(b);
@@ -312,7 +312,7 @@ PatchCanvas::show_port_names(bool b)
}
}
-
+
void
PatchCanvas::add_plugin(SharedPtr<PluginModel> p)
{
@@ -367,7 +367,7 @@ PatchCanvas::add_node(SharedPtr<NodeModel> nm)
if (plugm && plugm->icon_path() != "")
module->set_icon(App::instance().icon_from_path(plugm->icon_path(), 100));
}
-
+
add_item(module);
module->show();
_views.insert(std::make_pair(nm, module));
@@ -411,12 +411,12 @@ PatchCanvas::remove_port(SharedPtr<PortModel> pm)
cerr << "WARNING: Failed to remove port item: " << pm->path() << endl;
i->second.reset();
_views.erase(i);
-
+
} else {
SharedPtr<NodeModule> module = PtrCast<NodeModule>(_views[pm->parent()]);
module->remove_port(pm);
}
-
+
assert(_views.find(pm) == _views.end());
}
@@ -425,7 +425,7 @@ SharedPtr<FlowCanvas::Port>
PatchCanvas::get_port_view(SharedPtr<PortModel> port)
{
SharedPtr<FlowCanvas::Module> module = _views[port];
-
+
// Port on this patch
if (module) {
return (PtrCast<PatchPortModule>(module))
@@ -442,7 +442,7 @@ PatchCanvas::get_port_view(SharedPtr<PortModel> port)
}
}
}
-
+
return SharedPtr<FlowCanvas::Port>();
}
@@ -451,7 +451,7 @@ void
PatchCanvas::connection(SharedPtr<ConnectionModel> cm)
{
assert(cm);
-
+
const SharedPtr<FlowCanvas::Port> src = get_port_view(cm->src_port());
const SharedPtr<FlowCanvas::Port> dst = get_port_view(cm->dst_port());
@@ -470,7 +470,7 @@ PatchCanvas::disconnection(SharedPtr<ConnectionModel> cm)
{
const SharedPtr<FlowCanvas::Port> src = get_port_view(cm->src_port());
const SharedPtr<FlowCanvas::Port> dst = get_port_view(cm->dst_port());
-
+
if (src && dst)
remove_connection(src, dst);
else
@@ -488,7 +488,7 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
const boost::shared_ptr<Ingen::GUI::Port> dst
= boost::dynamic_pointer_cast<Ingen::GUI::Port>(dst_port);
-
+
if (!src || !dst)
return;
@@ -507,9 +507,9 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
App::instance().engine()->connect(src->model()->path(), nm->path() + "/MIDI_In");
App::instance().engine()->connect(nm->path() + "/Out_(CR)", dst->model()->path());
App::instance().engine()->midi_learn(nm->path());
-
+
// Set control node range to port's user range
-
+
App::instance().engine()->set_port_value_queued(nm->path().base() + "Min",
dst->model()->get_variable("user-min").get_float());
App::instance().engine()->set_port_value_queued(nm->path().base() + "Max",
@@ -530,7 +530,7 @@ PatchCanvas::disconnect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
const boost::shared_ptr<Ingen::GUI::Port> dst
= boost::dynamic_pointer_cast<Ingen::GUI::Port>(dst_port);
-
+
App::instance().engine()->disconnect(src->model()->path(),
dst->model()->path());
}
@@ -540,7 +540,7 @@ bool
PatchCanvas::canvas_event(GdkEvent* event)
{
assert(event);
-
+
bool ret = false;
switch (event->type) {
@@ -553,11 +553,11 @@ PatchCanvas::canvas_event(GdkEvent* event)
ret = true;
}
break;
-
+
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
ret = canvas_key_event(&event->key);
-
+
default:
break;
}
@@ -565,7 +565,7 @@ PatchCanvas::canvas_event(GdkEvent* event)
return (ret ? true : Canvas::canvas_event(event));
}
-
+
bool
PatchCanvas::canvas_key_event(GdkEventKey* event)
{
@@ -635,22 +635,22 @@ PatchCanvas::copy_selection()
serialiser.serialise(port_module->port());
}
}
-
+
for (list<boost::shared_ptr<FlowCanvas::Connection> >::iterator c = _selected_connections.begin();
c != _selected_connections.end(); ++c) {
boost::shared_ptr<Connection> connection = boost::dynamic_pointer_cast<Connection>(*c);
if (connection)
serialiser.serialise_connection(_patch, connection->model());
}
-
+
string result = serialiser.finish();
_paste_count = 0;
-
+
Glib::RefPtr<Gtk::Clipboard> clipboard = Gtk::Clipboard::get();
clipboard->set_text(result);
}
-
+
void
PatchCanvas::paste()
{
@@ -683,7 +683,7 @@ PatchCanvas::paste()
if (!_patch->path().is_root())
clipboard.new_patch(_patch->path(), _patch->poly());
-
+
boost::optional<Raul::Path> data_path;
boost::optional<Raul::Path> parent;
boost::optional<Raul::Symbol> symbol;
@@ -695,7 +695,7 @@ PatchCanvas::paste()
ClashAvoider avoider(*App::instance().store().get(), clipboard, &clipboard);
parser->parse_string(App::instance().world(), &avoider, str, "", data_path,
parent, symbol);
-
+
for (Store::iterator i = clipboard.begin(); i != clipboard.end(); ++i) {
if (_patch->path().is_root() && i->first.is_root()) {
//cout << "Skipping root" << endl;
@@ -732,7 +732,7 @@ PatchCanvas::paste()
App::instance().engine()->connect(i->first, i->second);
}*/
}
-
+
void
PatchCanvas::generate_port_name(
@@ -765,7 +765,7 @@ PatchCanvas::menu_add_control(ControlType type)
GraphObject::Properties data = get_initial_data();
float x = data["ingenuity:canvas-x"].get_float();
float y = data["ingenuity:canvas-y"].get_float();
-
+
cerr << "ADD CONTROL: " << (unsigned)type << " @ " << x << ", " << y << endl;
add_item(boost::shared_ptr<FlowCanvas::Item>(
@@ -803,7 +803,7 @@ PatchCanvas::load_plugin(WeakPtr<PluginModel> weak_plugin)
ss << name << "_" << offset;
name = ss.str();
}
-
+
const Path path = _patch->path().base() + name;
// FIXME: polyphony?
App::instance().engine()->new_node(path, plugin->uri());
@@ -830,10 +830,10 @@ GraphObject::Properties
PatchCanvas::get_initial_data()
{
GraphObject::Properties result;
-
+
result["ingenuity:canvas-x"] = Atom((float)_last_click_x);
result["ingenuity:canvas-y"] = Atom((float)_last_click_y);
-
+
return result;
}
diff --git a/src/gui/PatchCanvas.hpp b/src/gui/PatchCanvas.hpp
index d3b55936..6a708869 100644
--- a/src/gui/PatchCanvas.hpp
+++ b/src/gui/PatchCanvas.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -45,7 +45,7 @@ namespace Client { class PatchModel; }
using Ingen::Client::PatchModel;
namespace GUI {
-
+
class NodeModule;
@@ -57,7 +57,7 @@ class PatchCanvas : public FlowCanvas::Canvas
{
public:
PatchCanvas(SharedPtr<PatchModel> patch, int width, int height);
-
+
virtual ~PatchCanvas() {}
void build();
@@ -82,13 +82,13 @@ public:
void select_all();
void show_menu(GdkEvent* event);
-
+
bool canvas_key_event(GdkEventKey* event);
-
+
private:
enum ControlType { NUMBER, BUTTON };
void menu_add_control(ControlType type);
-
+
void generate_port_name(
const string& sym_base, string& sym,
const string& name_base, string& name);
@@ -96,7 +96,7 @@ private:
void menu_add_port(
const string& sym_base, const string& name_base,
const string& type, bool is_output);
-
+
void menu_load_plugin();
void menu_new_patch();
void menu_load_patch();
@@ -116,11 +116,11 @@ private:
SLV2PluginClasses classes,
const LV2Children& children);
#endif
-
+
GraphObject::Properties get_initial_data();
bool canvas_event(GdkEvent* event);
-
+
SharedPtr<FlowCanvas::Port> get_port_view(SharedPtr<PortModel> port);
void connect(boost::shared_ptr<FlowCanvas::Connectable> src,
@@ -140,7 +140,7 @@ private:
typedef std::multimap<const std::string, Gtk::Menu*> ClassMenus;
ClassMenus _class_menus;
-
+
bool _human_names;
bool _show_port_names;
Gtk::Menu* _menu;
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index ffb05e8d..d7933b1d 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -62,11 +62,11 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod
ret->add_port(port);
ret->set_port(port);
ret->set_menu(port->menu());
-
+
for (GraphObject::Properties::const_iterator m = model->variables().begin();
m != model->variables().end(); ++m)
ret->set_variable(m->first, m->second);
-
+
for (GraphObject::Properties::const_iterator m = model->properties().begin();
m != model->properties().end(); ++m)
ret->set_property(m->first, m->second);
@@ -86,20 +86,20 @@ PatchPortModule::create_menu()
Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference();
xml->get_widget_derived("object_menu", _menu);
_menu->init(_model, true);
-
+
set_menu(_menu);
}
void
PatchPortModule::store_location()
-{
+{
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
-
+
const Atom& existing_x = _model->get_property("ingenuity:canvas-x");
const Atom& existing_y = _model->get_property("ingenuity:canvas-y");
-
+
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
App::instance().engine()->set_property(_model->path(), "ingenuity:canvas-x", Atom(x));
@@ -118,7 +118,7 @@ PatchPortModule::show_human_names(bool b)
set_name(name.get_string());
else
set_name(_model->symbol());
-
+
resize();
}
diff --git a/src/gui/PatchPortModule.hpp b/src/gui/PatchPortModule.hpp
index 2a1cf704..c9363a3d 100644
--- a/src/gui/PatchPortModule.hpp
+++ b/src/gui/PatchPortModule.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -35,7 +35,7 @@ using namespace Ingen::Client;
namespace Ingen {
namespace GUI {
-
+
class PatchCanvas;
class Port;
class PortMenu;
@@ -53,10 +53,10 @@ public:
static boost::shared_ptr<PatchPortModule> create(boost::shared_ptr<PatchCanvas> canvas,
SharedPtr<PortModel> model,
bool human);
-
+
virtual void store_location();
void show_human_names(bool b);
-
+
void set_name(const std::string& n);
SharedPtr<PortModel> port() const { return _model; }
@@ -68,7 +68,7 @@ protected:
void set_selected(bool b);
void set_port(SharedPtr<Port> port) { _port = port; }
-
+
void set_variable(const Raul::URI& predicate, const Raul::Atom& value);
void set_property(const Raul::URI& predicate, const Raul::Atom& value);
diff --git a/src/gui/PatchPropertiesWindow.cpp b/src/gui/PatchPropertiesWindow.cpp
index 0fc080e0..915379fe 100644
--- a/src/gui/PatchPropertiesWindow.cpp
+++ b/src/gui/PatchPropertiesWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -52,11 +52,11 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
{
property_title() = patch_model->path().str() + " Properties";
_patch_model = patch_model;
-
+
const Atom& name_atom = _patch_model->get_property("doap:name");
_name_entry->set_text(
(name_atom.type() == Atom::STRING) ? name_atom.get_string() : "" );
-
+
const Atom& author_atom = _patch_model->get_property("dc:creator");
_author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
@@ -81,7 +81,7 @@ PatchPropertiesWindow::cancel_clicked()
const Atom& desc_atom = _patch_model->get_property("dc:description");
_textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
-
+
hide();
}
diff --git a/src/gui/PatchPropertiesWindow.hpp b/src/gui/PatchPropertiesWindow.hpp
index 1020bffc..8954a3ca 100644
--- a/src/gui/PatchPropertiesWindow.hpp
+++ b/src/gui/PatchPropertiesWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -29,7 +29,7 @@ using Ingen::Client::PatchModel;
namespace Ingen {
namespace GUI {
-
+
/** Patch Properties Window.
*
@@ -44,7 +44,7 @@ public:
void present(SharedPtr<PatchModel> patch_model) { set_patch(patch_model); Gtk::Window::present(); }
void set_patch(SharedPtr<PatchModel> patch_model);
-
+
void cancel_clicked();
void ok_clicked();
diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp
index 0b699f64..bf78a803 100644
--- a/src/gui/PatchTreeWindow.cpp
+++ b/src/gui/PatchTreeWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -29,7 +29,7 @@ using namespace Raul;
namespace Ingen {
namespace GUI {
-
+
PatchTreeWindow::PatchTreeWindow(BaseObjectType* cobject,
const Glib::RefPtr<Gnome::Glade::Xml>& xml)
@@ -37,7 +37,7 @@ PatchTreeWindow::PatchTreeWindow(BaseObjectType* cobject,
, _enable_signal(true)
{
xml->get_widget_derived("patches_treeview", _patches_treeview);
-
+
_patch_treestore = Gtk::TreeStore::create(_patch_tree_columns);
_patches_treeview->set_window(this);
_patches_treeview->set_model(_patch_treestore);
@@ -53,16 +53,16 @@ PatchTreeWindow::PatchTreeWindow(BaseObjectType* cobject,
Gtk::CellRendererToggle* enabled_renderer = dynamic_cast<Gtk::CellRendererToggle*>(
_patches_treeview->get_column_cell_renderer(1));
enabled_renderer->property_activatable() = true;
-
+
_patch_tree_selection = _patches_treeview->get_selection();
-
+
//m_patch_tree_selection->signal_changed().connect(
- // sigc::mem_fun(this, &PatchTreeWindow::event_patch_selected));
+ // sigc::mem_fun(this, &PatchTreeWindow::event_patch_selected));
_patches_treeview->signal_row_activated().connect(
sigc::mem_fun(this, &PatchTreeWindow::event_patch_activated));
enabled_renderer->signal_toggled().connect(
sigc::mem_fun(this, &PatchTreeWindow::event_patch_enabled_toggled));
-
+
_patches_treeview->columns_autosize();
}
@@ -100,7 +100,7 @@ PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
} else {
Gtk::TreeModel::Children children = _patch_treestore->children();
Gtk::TreeModel::iterator c = find_patch(children, pm->parent()->path());
-
+
if (c != children.end()) {
Gtk::TreeModel::iterator iter = _patch_treestore->append(c->children());
Gtk::TreeModel::Row row = *iter;
@@ -181,7 +181,7 @@ PatchTreeWindow::event_patch_activated(const Gtk::TreeModel::Path& path, Gtk::Tr
Gtk::TreeModel::iterator active = _patch_treestore->get_iter(path);
Gtk::TreeModel::Row row = *active;
SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
-
+
App::instance().window_factory()->present_patch(pm);
}
@@ -192,10 +192,10 @@ PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
Gtk::TreeModel::Path path(path_str);
Gtk::TreeModel::iterator active = _patch_treestore->get_iter(path);
Gtk::TreeModel::Row row = *active;
-
+
SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
assert(pm);
-
+
if (_enable_signal)
App::instance().engine()->set_variable(pm->path(), "ingen:enabled", (bool)!pm->enabled());
}
@@ -225,17 +225,17 @@ PatchTreeWindow::patch_renamed(const Path& old_path, const Path& new_path)
Gtk::TreeModel::iterator i
= find_patch(_patch_treestore->children(), old_path);
-
+
if (i != _patch_treestore->children().end()) {
Gtk::TreeModel::Row row = *i;
row[_patch_tree_columns.name_col] = new_path.name();
} else {
cerr << "[PatchTreeWindow] Unable to find patch " << old_path << endl;
}
-
+
_enable_signal = true;
}
-
+
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/PatchTreeWindow.hpp b/src/gui/PatchTreeWindow.hpp
index 3998891c..f662a29a 100644
--- a/src/gui/PatchTreeWindow.hpp
+++ b/src/gui/PatchTreeWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -59,14 +59,14 @@ protected:
void event_patch_enabled_toggled(const Glib::ustring& path_str);
Gtk::TreeModel::iterator find_patch(Gtk::TreeModel::Children root, const Raul::Path& path);
-
+
PatchTreeView* _patches_treeview;
struct PatchTreeModelColumns : public Gtk::TreeModel::ColumnRecord
{
PatchTreeModelColumns()
{ add(name_col); add(enabled_col); add(patch_model_col); }
-
+
Gtk::TreeModelColumn<Glib::ustring> name_col;
Gtk::TreeModelColumn<bool> enabled_col;
Gtk::TreeModelColumn<SharedPtr<Client::PatchModel> > patch_model_col;
@@ -88,22 +88,22 @@ public:
{}
void set_window(PatchTreeWindow* win) { _window = win; }
-
+
bool on_button_press_event(GdkEventButton* ev) {
bool ret = Gtk::TreeView::on_button_press_event(ev);
-
+
if ((ev->type == GDK_BUTTON_PRESS) && (ev->button == 3))
_window->show_patch_menu(ev);
return ret;
}
-
+
private:
PatchTreeWindow* _window;
}; // struct PatchTreeView
-
+
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp
index 9b4f291a..a36a08d5 100644
--- a/src/gui/PatchView.cpp
+++ b/src/gui/PatchView.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -84,7 +84,7 @@ PatchView::set_patch(SharedPtr<PatchModel> patch)
for (GraphObject::Properties::const_iterator i = patch->properties().begin();
i != patch->properties().end(); ++i)
property_changed(i->first, i->second);
-
+
for (GraphObject::Properties::const_iterator i = patch->variables().begin();
i != patch->variables().end(); ++i)
variable_changed(i->first, i->second);
@@ -109,13 +109,13 @@ PatchView::set_patch(SharedPtr<PatchModel> patch)
_edit_mode_but->signal_toggled().connect(sigc::mem_fun(
*this, &PatchView::editable_toggled));
-
+
_poly_spin->signal_value_changed().connect(
sigc::mem_fun(*this, &PatchView::poly_changed));
_canvas->signal_item_entered.connect(
sigc::mem_fun(*this, &PatchView::canvas_item_entered));
-
+
_canvas->signal_item_left.connect(
sigc::mem_fun(*this, &PatchView::canvas_item_left));
@@ -133,7 +133,7 @@ SharedPtr<PatchView>
PatchView::create(SharedPtr<PatchModel> patch)
{
-
+
const Glib::RefPtr<Gnome::Glade::Xml>& xml = GladeFactory::new_glade_reference("patch_view_box");
PatchView* result = NULL;
xml->get_widget_derived("patch_view_box", result);
@@ -173,7 +173,7 @@ PatchView::canvas_item_entered(Gnome::Canvas::Item* item)
NodeModule* m = dynamic_cast<NodeModule*>(item);
if (m)
signal_object_entered.emit(m->node().get());
-
+
Port* p = dynamic_cast<Port*>(item);
if (p)
signal_object_entered.emit(p->model().get());
@@ -188,7 +188,7 @@ PatchView::canvas_item_left(Gnome::Canvas::Item* item)
signal_object_left.emit(m->node().get());
return;
}
-
+
Port* p = dynamic_cast<Port*>(item);
if (p)
signal_object_left.emit(p->model().get());
diff --git a/src/gui/PatchView.hpp b/src/gui/PatchView.hpp
index 705af7b8..339e0159 100644
--- a/src/gui/PatchView.hpp
+++ b/src/gui/PatchView.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -63,7 +63,7 @@ public:
SharedPtr<PatchCanvas> canvas() const { return _canvas; }
SharedPtr<PatchModel> patch() const { return _patch; }
Gtk::ToolItem* breadcrumb_container() const { return _breadcrumb_container; }
-
+
void set_editable(bool editable);
static SharedPtr<PatchView> create(SharedPtr<PatchModel> patch);
@@ -83,7 +83,7 @@ private:
void canvas_item_entered(Gnome::Canvas::Item* item);
void canvas_item_left(Gnome::Canvas::Item* item);
-
+
void property_changed(const Raul::URI& predicate, const Raul::Atom& value);
void variable_changed(const Raul::URI& predicate, const Raul::Atom& value);
@@ -91,7 +91,7 @@ private:
SharedPtr<PatchModel> _patch;
SharedPtr<PatchCanvas> _canvas;
-
+
Gtk::ScrolledWindow* _canvas_scrolledwindow;
Gtk::Toolbar* _toolbar;
diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp
index cc882f8d..6fc6e954 100644
--- a/src/gui/PatchWindow.cpp
+++ b/src/gui/PatchWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -98,7 +98,7 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad
if (engine_name == "ingen:internal")
engine_name = "internal engine";
_status_bar->push(string("Connected to ") + engine_name, STATUS_CONTEXT_ENGINE);
-
+
_menu_import->signal_activate().connect(
sigc::mem_fun(this, &PatchWindow::event_import));
_menu_import_location->signal_activate().connect(
@@ -150,14 +150,14 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad
_menu_help_about->signal_activate().connect(sigc::hide_return(
sigc::mem_fun(App::instance(), &App::show_about)));
-
+
_breadcrumb_box = new BreadCrumbBox();
_breadcrumb_box->signal_patch_selected.connect(sigc::mem_fun(this, &PatchWindow::set_patch_from_path));
#ifndef HAVE_CURL
_menu_upload->hide();
#endif
-
+
Glib::RefPtr<Gtk::Clipboard> clipboard = Gtk::Clipboard::get();
clipboard->signal_owner_change().connect(sigc::mem_fun(this, &PatchWindow::event_clipboard_changed));
}
@@ -174,9 +174,9 @@ PatchWindow::~PatchWindow()
/** Set the patch controller from a Path (for use by eg. BreadCrumbBox)
*/
-void
+void
PatchWindow::set_patch_from_path(const Path& path, SharedPtr<PatchView> view)
-{
+{
if (view) {
assert(view->patch()->path() == path);
App::instance().window_factory()->present_patch(view->patch(), this, view);
@@ -199,7 +199,7 @@ PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view)
return;
_enable_signal = false;
-
+
new_port_connection.disconnect();
removed_port_connection.disconnect();
edit_mode_connection.disconnect();
@@ -213,10 +213,10 @@ PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view)
if (!_view)
_view = _breadcrumb_box->view(patch->path());
-
+
if (!_view)
_view = PatchView::create(patch);
-
+
assert(_view);
// Add view to our viewport
@@ -236,7 +236,7 @@ PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view)
_breadcrumb_box->build(patch->path(), _view);
_breadcrumb_box->show();
-
+
_menu_view_control_window->property_sensitive() = false;
for (NodeModel::Ports::const_iterator p = patch->ports().begin();
@@ -261,7 +261,7 @@ PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view)
sigc::mem_fun(this, &PatchWindow::patch_port_removed));
removed_port_connection = patch->signal_editable.connect(
sigc::mem_fun(this, &PatchWindow::editable_changed));
-
+
show_all();
_view->signal_object_entered.connect(sigc::mem_fun(this, &PatchWindow::object_entered));
@@ -284,7 +284,7 @@ void
PatchWindow::patch_port_removed(SharedPtr<PortModel> port)
{
if (port->type().is_control() && port->is_input()) {
-
+
bool found_control = false;
for (NodeModel::Ports::const_iterator i = _patch->ports().begin(); i != _patch->ports().end(); ++i) {
@@ -293,7 +293,7 @@ PatchWindow::patch_port_removed(SharedPtr<PortModel> port)
break;
}
}
-
+
_menu_view_control_window->property_sensitive() = found_control;
}
}
@@ -309,7 +309,7 @@ PatchWindow::object_entered(ObjectModel* model)
if (plugin)
msg.append((boost::format(" (%1%)") % plugin->human_name()).str());
}
-
+
PortModel* port = dynamic_cast<PortModel*>(model);
if (port) {
NodeModel* parent = dynamic_cast<NodeModel*>(port->parent().get());
@@ -322,7 +322,7 @@ PatchWindow::object_entered(ObjectModel* model)
msg.append((boost::format(" (%1%)") % human_name).str());
}
}
-
+
const Atom& value = port->value();
if (value.is_valid()) {
const Redland::Node node = AtomRDF::atom_to_node(
@@ -416,7 +416,7 @@ PatchWindow::event_save_as()
Gtk::FileChooserDialog dialog(*this, "Save Patch", Gtk::FILE_CHOOSER_ACTION_SAVE);
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- Gtk::Button* save_button = dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
+ Gtk::Button* save_button = dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
save_button->property_has_default() = true;
Gtk::FileFilter filt;
@@ -441,7 +441,7 @@ PatchWindow::event_save_as()
string base = filename.substr(0, filename.find("."));
if (base.find("/") != string::npos)
base = base.substr(base.find_last_of("/") + 1);
-
+
if (!Symbol::is_valid(base)) {
Gtk::MessageDialog error_dialog(*this,
"<b>Ingen patch file names must be valid symbols</b>", true,
@@ -500,14 +500,14 @@ void
PatchWindow::event_draw()
{
Gtk::FileChooserDialog dialog(*this, "Draw to DOT", Gtk::FILE_CHOOSER_ACTION_SAVE);
-
+
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- Gtk::Button* save_button = dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
+ Gtk::Button* save_button = dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
save_button->property_has_default() = true;
-
+
int result = dialog.run();
-
- if (result == Gtk::RESPONSE_OK) {
+
+ if (result == Gtk::RESPONSE_OK) {
string filename = dialog.get_filename();
if (filename.find(".") == string::npos)
filename += ".dot";
@@ -523,7 +523,7 @@ PatchWindow::event_draw()
confirm = (confirm_dialog.run() == Gtk::RESPONSE_YES);
}
fin.close();
-
+
if (confirm) {
_view->canvas()->render_to_dot(filename);
_status_bar->push(
@@ -599,24 +599,24 @@ PatchWindow::on_key_press_event(GdkEventKey* event)
bool ret = false;
ret = _view->canvas()->canvas_key_event(event);
-
+
if (!ret)
ret = Gtk::Window::on_key_press_event(event);
-
+
return ret;
}
-
+
bool
PatchWindow::on_key_release_event(GdkEventKey* event)
{
bool ret = false;
ret = _view->canvas()->canvas_key_event(event);
-
+
if (!ret)
ret = Gtk::Window::on_key_release_event(event);
-
+
return ret;
}
@@ -633,7 +633,7 @@ PatchWindow::event_quit()
{
Gtk::Widget* kill_img = Gtk::manage(
new Gtk::Image(Gtk::Stock::CLOSE, Gtk::ICON_SIZE_BUTTON));
-
+
Gtk::Widget* close_img = Gtk::manage(
new Gtk::Image(Gtk::Stock::QUIT, Gtk::ICON_SIZE_BUTTON));
@@ -643,7 +643,7 @@ PatchWindow::event_quit()
Gtk::MessageDialog d(*this, msg,
true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE, true);
-
+
d.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
if (!App::instance().world()->local_engine) {
diff --git a/src/gui/PatchWindow.hpp b/src/gui/PatchWindow.hpp
index 63707a1e..696262aa 100644
--- a/src/gui/PatchWindow.hpp
+++ b/src/gui/PatchWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -37,7 +37,7 @@ namespace Client {
using namespace Ingen::Client;
namespace GUI {
-
+
class LoadPluginWindow;
class LoadPatchWindow;
class NewSubpatchWindow;
@@ -59,7 +59,7 @@ class PatchWindow : public Gtk::Window
public:
PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
~PatchWindow();
-
+
void set_patch_from_path(const Raul::Path& path, SharedPtr<PatchView> view);
void set_patch(SharedPtr<PatchModel> pc, SharedPtr<PatchView> view);
@@ -72,7 +72,7 @@ protected:
void on_hide();
bool on_key_press_event(GdkEventKey* event);
bool on_key_release_event(GdkEventKey* event);
-
+
private:
void patch_port_added(SharedPtr<PortModel> port);
@@ -107,7 +107,7 @@ private:
SharedPtr<PatchModel> _patch;
SharedPtr<PatchView> _view;
-
+
sigc::connection new_port_connection;
sigc::connection removed_port_connection;
sigc::connection edit_mode_connection;
@@ -116,7 +116,7 @@ private:
bool _position_stored;
int _x;
int _y;
-
+
Gtk::MenuItem* _menu_import;
Gtk::MenuItem* _menu_import_location;
Gtk::MenuItem* _menu_save;
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index e7daac0a..974be2b4 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -54,13 +54,13 @@ Port::Port(
delete _menu;
_menu = NULL;
-
+
pm->signal_renamed.connect(sigc::mem_fun(this, &Port::renamed));
if (pm->type().is_control()) {
set_toggled(pm->is_toggle());
show_control();
-
+
float min = 0.0f, max = 1.0f;
boost::shared_ptr<NodeModel> parent = PtrCast<NodeModel>(pm->parent());
if (parent)
@@ -72,9 +72,9 @@ Port::Port(
pm->signal_variable.connect(sigc::mem_fun(this, &Port::variable_changed));
pm->signal_value_changed.connect(sigc::mem_fun(this, &Port::value_changed));
}
-
+
pm->signal_activity.connect(sigc::mem_fun(this, &Port::activity));
-
+
value_changed(pm->value());
}
@@ -113,7 +113,7 @@ Port::value_changed(const Atom& value)
cerr << "WARNING: Unknown port value type " << (unsigned)value.type() << endl;
}
-
+
void
Port::activity()
{
diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp
index 10e00a88..82ec0833 100644
--- a/src/gui/Port.hpp
+++ b/src/gui/Port.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -35,7 +35,7 @@ namespace GUI {
/** A Port on an Module.
- *
+ *
* \ingroup GUI
*/
class Port : public FlowCanvas::Port
@@ -51,13 +51,13 @@ public:
SharedPtr<PortModel> model() const { return _port_model.lock(); }
void create_menu();
-
+
virtual void set_control(float value, bool signal);
void value_changed(const Raul::Atom& value);
void activity();
-
+
private:
-
+
void variable_changed(const Raul::URI& key, const Raul::Atom& value);
void renamed();
diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp
index 11c1243a..e224f0d4 100644
--- a/src/gui/PortMenu.cpp
+++ b/src/gui/PortMenu.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -41,20 +41,20 @@ PortMenu::init(SharedPtr<PortModel> port, bool patch_port)
{
ObjectMenu::init(port);
_patch_port = patch_port;
-
+
if ( ! PtrCast<PatchModel>(port->parent()) ) {
_polyphonic_menuitem->set_sensitive(false);
_rename_menuitem->hide();
_destroy_menuitem->hide();
}
-
+
if (port->type() == DataType::EVENT)
_polyphonic_menuitem->hide();
-
+
_enable_signal = true;
}
-
+
void
PortMenu::on_menu_disconnect()
{
diff --git a/src/gui/PortMenu.hpp b/src/gui/PortMenu.hpp
index d617e01f..ae55029a 100644
--- a/src/gui/PortMenu.hpp
+++ b/src/gui/PortMenu.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -38,7 +38,7 @@ class PortMenu : public ObjectMenu
{
public:
PortMenu(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
-
+
void init(SharedPtr<PortModel> port, bool patch_port = false);
private:
diff --git a/src/gui/PortPropertiesWindow.cpp b/src/gui/PortPropertiesWindow.cpp
index 3333ae70..54f015e5 100644
--- a/src/gui/PortPropertiesWindow.cpp
+++ b/src/gui/PortPropertiesWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -40,10 +40,10 @@ PortPropertiesWindow::PortPropertiesWindow(BaseObjectType* cobject, const Glib::
xml->get_widget("port_properties_max_spinner", _max_spinner);
xml->get_widget("port_properties_cancel_button", _cancel_button);
xml->get_widget("port_properties_ok_button", _ok_button);
-
+
_cancel_button->signal_clicked().connect(sigc::mem_fun(this,
&PortPropertiesWindow::cancel));
-
+
_ok_button->signal_clicked().connect(sigc::mem_fun(this,
&PortPropertiesWindow::ok));
}
@@ -56,7 +56,7 @@ void
PortPropertiesWindow::present(SharedPtr<PortModel> pm)
{
assert(pm);
-
+
for (list<sigc::connection>::iterator i = _connections.begin(); i != _connections.end(); ++i)
(*i).disconnect();
@@ -65,7 +65,7 @@ PortPropertiesWindow::present(SharedPtr<PortModel> pm)
_port_model = pm;
set_title(pm->path().str() + " Properties");
-
+
float min = 0.0f, max = 1.0f;
boost::shared_ptr<NodeModel> parent = PtrCast<NodeModel>(_port_model->parent());
if (parent)
@@ -77,11 +77,11 @@ PortPropertiesWindow::present(SharedPtr<PortModel> pm)
_min_spinner->set_value(min);
_connections.push_back(_min_spinner->signal_value_changed().connect(
sigc::mem_fun(*this, &PortPropertiesWindow::min_changed)));
-
+
_max_spinner->set_value(max);
_connections.push_back(_max_spinner->signal_value_changed().connect(
sigc::mem_fun(*this, &PortPropertiesWindow::max_changed)));
-
+
_connections.push_back(pm->signal_variable.connect(
sigc::mem_fun(this, &PortPropertiesWindow::variable_change)));
@@ -102,7 +102,7 @@ PortPropertiesWindow::variable_change(const URI& key, const Atom& value)
else if (key.str() == "lv2:maximum")
_max_spinner->set_value(value.get_float());
}
-
+
//_enable_signal = true;
}
@@ -113,7 +113,7 @@ PortPropertiesWindow::min_changed()
const float val = _port_model->value().get_float();
float min = _min_spinner->get_value();
float max = _max_spinner->get_value();
-
+
if (min > val) {
_min_spinner->set_value(val);
return; // avoid recursion
@@ -135,7 +135,7 @@ PortPropertiesWindow::max_changed()
const float val = _port_model->value().get_float();
float min = _min_spinner->get_value();
float max = _max_spinner->get_value();
-
+
if (max < val) {
_max_spinner->set_value(val);
return; // avoid recursion
diff --git a/src/gui/PortPropertiesWindow.hpp b/src/gui/PortPropertiesWindow.hpp
index 2cf160bc..6e9c8c26 100644
--- a/src/gui/PortPropertiesWindow.hpp
+++ b/src/gui/PortPropertiesWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -44,7 +44,7 @@ private:
void variable_change(const Raul::URI& key, const Raul::Atom& value);
void min_changed();
void max_changed();
-
+
void ok();
void cancel();
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp
index 8770a89e..cd5a1f61 100644
--- a/src/gui/RenameWindow.cpp
+++ b/src/gui/RenameWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -96,7 +96,7 @@ RenameWindow::name_changed()
} else {
_message_label->set_text("");
_ok_button->property_sensitive() = true;
- }
+ }
}
diff --git a/src/gui/RenameWindow.hpp b/src/gui/RenameWindow.hpp
index 524f97ff..e3b50ca5 100644
--- a/src/gui/RenameWindow.hpp
+++ b/src/gui/RenameWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -28,7 +28,7 @@ namespace Ingen {
namespace GUI {
-/** Rename window. Handles renaming of any (Ingen) object.
+/** Rename window. Handles renaming of any (Ingen) object.
*
* \ingroup GUI
*/
@@ -45,7 +45,7 @@ private:
void name_changed();
void cancel_clicked();
void ok_clicked();
-
+
SharedPtr<ObjectModel> _object;
Gtk::Entry* _name_entry;
diff --git a/src/gui/SubpatchModule.cpp b/src/gui/SubpatchModule.cpp
index d407f6db..48baf299 100644
--- a/src/gui/SubpatchModule.cpp
+++ b/src/gui/SubpatchModule.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -64,13 +64,13 @@ void
SubpatchModule::browse_to_patch()
{
assert(_patch->parent());
-
+
SharedPtr<PatchModel> parent = PtrCast<PatchModel>(_patch->parent());
PatchWindow* const preferred = ( (parent)
? App::instance().window_factory()->patch_window(parent)
: NULL );
-
+
App::instance().window_factory()->present_patch(_patch, preferred);
}
diff --git a/src/gui/SubpatchModule.hpp b/src/gui/SubpatchModule.hpp
index b01e1e29..edf77761 100644
--- a/src/gui/SubpatchModule.hpp
+++ b/src/gui/SubpatchModule.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -36,7 +36,7 @@ using namespace Ingen::Client;
namespace Ingen {
namespace GUI {
-
+
class PatchCanvas;
class NodeControlWindow;
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 3a33d5ac..361440be 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -36,7 +36,7 @@ ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine)
, _deprecated_loader(engine)
{
set_name("Loader");
-
+
if (parser())
start();
else
@@ -72,7 +72,7 @@ void
ThreadedLoader::_whipped()
{
_mutex.lock();
-
+
while ( ! _events.empty() ) {
_events.front()();
_events.pop_front();
@@ -98,7 +98,7 @@ ThreadedLoader::load_patch(bool merge,
else
engine_base = engine_parent.get().base();
}
-
+
// Filthy hack to load deprecated patches based on file extension
if (document_uri.substr(document_uri.length()-3) == ".om") {
_events.push_back(sigc::hide_return(sigc::bind(
@@ -120,9 +120,9 @@ ThreadedLoader::load_patch(bool merge,
engine_symbol,
engine_data)));
}
-
+
whip();
-
+
_mutex.unlock();
}
@@ -137,7 +137,7 @@ ThreadedLoader::save_patch(SharedPtr<PatchModel> model, const string& filename)
model, filename)));
_mutex.unlock();
-
+
whip();
}
diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp
index cdf331a4..eb334413 100644
--- a/src/gui/ThreadedLoader.hpp
+++ b/src/gui/ThreadedLoader.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -68,10 +68,10 @@ public:
SharedPtr<Parser> parser();
-private:
+private:
void save_patch_event(SharedPtr<PatchModel> model, const string& filename);
-
+
/** Returns nothing and takes no parameters (because they have all been bound) */
typedef sigc::slot<void> Closure;
diff --git a/src/gui/UploadPatchWindow.cpp b/src/gui/UploadPatchWindow.cpp
index 96594924..b5834a1d 100644
--- a/src/gui/UploadPatchWindow.cpp
+++ b/src/gui/UploadPatchWindow.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -52,7 +52,7 @@ UploadPatchWindow::UploadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr
xml->get_widget("upload_patch_progress", _upload_progress);
xml->get_widget("upload_patch_cancel_button", _cancel_button);
xml->get_widget("upload_patch_upload_button", _upload_button);
-
+
_symbol_entry->signal_changed().connect(sigc::mem_fun(this, &UploadPatchWindow::symbol_changed));
_short_name_entry->signal_changed().connect(sigc::mem_fun(this, &UploadPatchWindow::short_name_changed));
@@ -65,7 +65,7 @@ void
UploadPatchWindow::present(SharedPtr<PatchModel> patch)
{
_patch = patch;
-
+
Gtk::Window::present();
}
@@ -78,7 +78,7 @@ UploadPatchWindow::on_show()
Raul::Atom atom = _patch->get_property("lv2:symbol");
if (atom.is_valid())
_symbol_entry->set_text(atom.get_string());
-
+
atom = _patch->get_variable("doap:name");
if (atom.is_valid())
_short_name_entry->set_text(atom.get_string());
@@ -129,7 +129,7 @@ UploadPatchWindow::short_name_changed()
&& _short_name_entry->get_text().length() > 0);
}
-
+
size_t
UploadThread::curl_read_cb(void *ptr, size_t size, size_t nmemb, void *data)
{
@@ -187,7 +187,7 @@ UploadThread::_run()
long response;
curl_easy_getinfo(_curl, CURLINFO_RESPONSE_CODE, &response);
-
+
printf("Server returned %ld\n", response);
_win->set_response(response);
@@ -195,7 +195,7 @@ UploadThread::_run()
curl_slist_free_all(_headers);
curl_easy_cleanup(_curl);
-
+
_headers = NULL;
_curl = NULL;
}
@@ -208,7 +208,7 @@ UploadPatchWindow::progress_callback()
const int response = _response.get();
_upload_progress->set_fraction(progress / 100.0);
-
+
if (progress == 100) {
if (response == 200) {
_upload_progress->set_text("Transfer completed");
@@ -252,18 +252,18 @@ UploadPatchWindow::upload_clicked()
const string uri = string("http://rdf.drobilla.net/ingen_patches/")
.append(symbol).append(".ingen.ttl");
-
+
const string str = s.to_string(_patch, uri, extra_rdf);
_thread = new UploadThread(this, str, uri);
_thread->start();
-
+
_upload_button->set_sensitive(false);
Glib::signal_timeout().connect(
sigc::mem_fun(this, &UploadPatchWindow::progress_callback), 100);
-}
+}
void
diff --git a/src/gui/UploadPatchWindow.hpp b/src/gui/UploadPatchWindow.hpp
index 7bc08bfb..9f314af3 100644
--- a/src/gui/UploadPatchWindow.hpp
+++ b/src/gui/UploadPatchWindow.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -46,7 +46,7 @@ public:
private:
static size_t curl_read_cb(void* ptr, size_t size, size_t nmemb, void *stream);
static int curl_progress_cb(void* thread, double dltotal, double dlnow, double ultotal, double ulnow);
-
+
void _run();
CURL* _curl;
@@ -73,7 +73,7 @@ public:
void set_response(int response) { _response = response; }
void set_progress(int pct) { _progress_pct = pct; }
-
+
private:
bool is_symbol(const Glib::ustring& str);
void symbol_changed();
@@ -87,7 +87,7 @@ private:
UploadThread* _thread;
SharedPtr<PatchModel> _patch;
-
+
Raul::AtomicInt _progress_pct;
Raul::AtomicInt _response;
@@ -98,7 +98,7 @@ private:
Gtk::Button* _upload_button;
};
-
+
} // namespace GUI
} // namespace Ingen
diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp
index 5d05c853..38ed8cfe 100644
--- a/src/gui/WindowFactory.cpp
+++ b/src/gui/WindowFactory.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -62,7 +62,7 @@ WindowFactory::WindowFactory()
xml->get_widget_derived("node_properties_win", _node_properties_win);
xml->get_widget_derived("port_properties_win", _port_properties_win);
xml->get_widget_derived("rename_win", _rename_win);
-
+
#ifdef HAVE_CURL
xml->get_widget_derived("upload_patch_win", _upload_patch_win);
#endif
@@ -73,10 +73,10 @@ WindowFactory::~WindowFactory()
{
for (PatchWindowMap::iterator i = _patch_windows.begin(); i != _patch_windows.end(); ++i)
delete i->second;
-
+
for (ControlWindowMap::iterator i = _control_windows.begin(); i != _control_windows.end(); ++i)
delete i->second;
-
+
}
@@ -85,12 +85,12 @@ WindowFactory::clear()
{
for (PatchWindowMap::iterator i = _patch_windows.begin(); i != _patch_windows.end(); ++i)
delete i->second;
-
+
_patch_windows.clear();
-
+
for (ControlWindowMap::iterator i = _control_windows.begin(); i != _control_windows.end(); ++i)
delete i->second;
-
+
_control_windows.clear();
}
@@ -118,7 +118,7 @@ WindowFactory::patch_window(SharedPtr<PatchModel> patch)
return (w == _patch_windows.end()) ? NULL : w->second;
}
-
+
NodeControlWindow*
WindowFactory::control_window(SharedPtr<NodeModel> node)
{
@@ -169,7 +169,7 @@ WindowFactory::new_patch_window(SharedPtr<PatchModel> patch, SharedPtr<PatchView
PatchWindow* win = NULL;
xml->get_widget_derived("patch_win", win);
assert(win);
-
+
win->set_patch(patch, view);
_patch_windows[patch->path()] = win;
@@ -204,7 +204,7 @@ WindowFactory::remove_patch_window(PatchWindow* win, GdkEventAny* ignored)
_patch_windows.erase(w);
delete win;
-
+
return false;
}
@@ -250,7 +250,7 @@ WindowFactory::remove_control_window(NodeControlWindow* win, GdkEventAny* ignore
_control_windows.erase(w);
delete win;
-
+
return true;
}
@@ -281,7 +281,7 @@ WindowFactory::present_load_patch(SharedPtr<PatchModel> patch, GraphObject::Prop
_load_patch_win->present(patch, data);
}
-
+
void
WindowFactory::present_load_remote_patch(SharedPtr<PatchModel> patch, GraphObject::Properties data)
{
@@ -328,7 +328,7 @@ WindowFactory::present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::P
if (w != _patch_windows.end())
_load_subpatch_win->set_transient_for(*w->second);
-
+
_load_subpatch_win->present(patch, data);
}
@@ -340,7 +340,7 @@ WindowFactory::present_rename(SharedPtr<ObjectModel> object)
if (w != _patch_windows.end())
_rename_win->set_transient_for(*w->second);
-
+
_rename_win->present(object);
}
@@ -357,17 +357,17 @@ WindowFactory::present_properties(SharedPtr<ObjectModel> object)
_patch_properties_win->present(patch);
return;
}
-
+
SharedPtr<NodeModel> node = PtrCast<NodeModel>(object);
if (node) {
PatchWindowMap::iterator w = _patch_windows.find(node->path().parent());
if (w != _patch_windows.end())
_node_properties_win->set_transient_for(*w->second);
-
+
_node_properties_win->present(node);
return;
}
-
+
SharedPtr<PortModel> port = PtrCast<PortModel>(object);
if (port) {
PatchWindowMap::iterator w = _patch_windows.find(port->path().parent().parent());
diff --git a/src/gui/WindowFactory.hpp b/src/gui/WindowFactory.hpp
index 60f195f2..a5e60b2c 100644
--- a/src/gui/WindowFactory.hpp
+++ b/src/gui/WindowFactory.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -81,7 +81,7 @@ public:
void present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::Properties data=GraphObject::Properties());
void present_rename(SharedPtr<ObjectModel> object);
void present_properties(SharedPtr<ObjectModel> object);
-
+
bool remove_patch_window(PatchWindow* win, GdkEventAny* ignored = NULL);
void clear();
diff --git a/src/gui/cmdline.h b/src/gui/cmdline.h
index 6f1f9259..c2e004e6 100644
--- a/src/gui/cmdline.h
+++ b/src/gui/cmdline.h
@@ -45,7 +45,7 @@ struct gengetopt_args_info
char * path_arg; /* Target path for loaded patch. */
char * path_orig; /* Target path for loaded patch original value given at command line. */
const char *path_help; /* Target path for loaded patch help description. */
-
+
int help_given ; /* Whether help was given. */
int version_given ; /* Whether version was given. */
int engine_given ; /* Whether engine was given. */
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 984651f4..050ed927 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/gui/gui.hpp b/src/gui/gui.hpp
index d4e8f399..6395d7df 100644
--- a/src/gui/gui.hpp
+++ b/src/gui/gui.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA