From 70f4bcdde45e94dbe27300a5069994aebc523cab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 28 Apr 2012 01:10:26 +0000 Subject: Remove using declarations from headers. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4288 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/App.cpp | 10 +++++-- src/gui/Configuration.cpp | 2 +- src/gui/Configuration.hpp | 14 ++++----- src/gui/Connection.cpp | 10 +++---- src/gui/Connection.hpp | 15 +++++----- src/gui/ControlPanel.cpp | 3 ++ src/gui/ControlPanel.hpp | 10 +++---- src/gui/LoadPatchWindow.cpp | 4 +++ src/gui/LoadPatchWindow.hpp | 13 ++++----- src/gui/LoadPluginWindow.cpp | 4 +++ src/gui/LoadPluginWindow.hpp | 24 +++++++-------- src/gui/NewSubpatchWindow.cpp | 6 ++-- src/gui/NewSubpatchWindow.hpp | 13 ++++----- src/gui/NodeControlWindow.cpp | 11 ++++--- src/gui/NodeControlWindow.hpp | 13 ++++----- src/gui/NodeMenu.cpp | 6 ++-- src/gui/NodeMenu.hpp | 4 +-- src/gui/NodeModule.cpp | 4 +++ src/gui/NodeModule.hpp | 27 +++++++++-------- src/gui/ObjectMenu.cpp | 4 +++ src/gui/ObjectMenu.hpp | 22 +++++++------- src/gui/PatchBox.cpp | 15 ++++++---- src/gui/PatchBox.hpp | 34 ++++++++++++---------- src/gui/PatchCanvas.cpp | 11 +++---- src/gui/PatchCanvas.hpp | 48 ++++++++++++------------------ src/gui/PatchPortModule.cpp | 8 +++-- src/gui/PatchPortModule.hpp | 17 +++++------ src/gui/PatchTreeWindow.cpp | 4 +++ src/gui/PatchView.cpp | 3 ++ src/gui/PatchView.hpp | 20 ++++++------- src/gui/PatchWindow.hpp | 8 ++--- src/gui/Port.hpp | 31 ++++++++++---------- src/gui/PortMenu.cpp | 4 +++ src/gui/PortMenu.hpp | 8 ++--- src/gui/PropertiesWindow.cpp | 4 +++ src/gui/PropertiesWindow.hpp | 25 ++++++++-------- src/gui/RenameWindow.cpp | 3 ++ src/gui/RenameWindow.hpp | 8 ++--- src/gui/SubpatchModule.cpp | 5 +++- src/gui/SubpatchModule.hpp | 10 +++---- src/gui/ThreadedLoader.cpp | 13 +++++---- src/gui/ThreadedLoader.hpp | 28 +++++++----------- src/gui/WindowFactory.cpp | 3 ++ src/gui/WindowFactory.hpp | 58 +++++++++++++++++-------------------- src/server/AudioBuffer.hpp | 2 -- src/server/BufferFactory.cpp | 2 +- src/server/ClientBroadcaster.hpp | 2 -- src/server/ConnectionImpl.cpp | 11 +++---- src/server/ConnectionImpl.hpp | 2 -- src/server/InputPort.cpp | 5 ++-- src/server/LV2Info.cpp | 2 -- src/server/LV2RequestRunFeature.hpp | 3 -- src/server/LV2ResizeFeature.hpp | 3 -- src/server/ingen_lv2.cpp | 8 ++--- src/server/mix.hpp | 2 -- 55 files changed, 318 insertions(+), 311 deletions(-) (limited to 'src') diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 38685d5b..9fd2c214 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -58,9 +58,13 @@ using namespace Ingen::Client; namespace Raul { class Deletable; } -namespace Ingen { namespace Client { class PluginModel; } } - namespace Ingen { + +namespace Client { class PluginModel; } + +using namespace Client; +using namespace Shared; + namespace GUI { class Port; @@ -190,7 +194,7 @@ App::detach() } } -SharedPtr +SharedPtr App::serialiser() { if (!_world->serialiser()) diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp index 58499e26..23246719 100644 --- a/src/gui/Configuration.cpp +++ b/src/gui/Configuration.cpp @@ -80,7 +80,7 @@ Configuration::apply_settings() } uint32_t -Configuration::get_port_color(const PortModel* p) +Configuration::get_port_color(const Client::PortModel* p) { assert(p != NULL); const Shared::URIs& uris = _app.uris(); diff --git a/src/gui/Configuration.hpp b/src/gui/Configuration.hpp index ac95fbe9..0b33016b 100644 --- a/src/gui/Configuration.hpp +++ b/src/gui/Configuration.hpp @@ -24,8 +24,6 @@ #include "raul/SharedPtr.hpp" namespace Ingen { namespace Client { class PortModel; } } -using Ingen::Client::PortModel; -using std::string; namespace Ingen { namespace GUI { @@ -46,15 +44,15 @@ public: Configuration(App& app); ~Configuration(); - void load_settings(string filename = ""); - void save_settings(string filename = ""); + void load_settings(std::string filename = ""); + void save_settings(std::string filename = ""); void apply_settings(); - const string& patch_folder() { return _patch_folder; } - void set_patch_folder(const string& f) { _patch_folder = f; } + const std::string& patch_folder() { return _patch_folder; } + void set_patch_folder(const std::string& f) { _patch_folder = f; } - uint32_t get_port_color(const PortModel* p); + uint32_t get_port_color(const Client::PortModel* p); enum NameStyle { PATH, HUMAN, NONE }; @@ -65,7 +63,7 @@ private: App& _app; /** Most recent patch folder shown in open dialog */ - string _patch_folder; + std::string _patch_folder; NameStyle _name_style; diff --git a/src/gui/Connection.cpp b/src/gui/Connection.cpp index e0376a33..6b29c1d5 100644 --- a/src/gui/Connection.cpp +++ b/src/gui/Connection.cpp @@ -24,11 +24,11 @@ using namespace std; namespace Ingen { namespace GUI { -Connection::Connection(Ganv::Canvas& canvas, - boost::shared_ptr model, - Ganv::Node* src, - Ganv::Node* dst, - uint32_t color) +Connection::Connection(Ganv::Canvas& canvas, + boost::shared_ptr model, + Ganv::Node* src, + Ganv::Node* dst, + uint32_t color) : Ganv::Edge(canvas, src, dst, color) , _connection_model(model) { diff --git a/src/gui/Connection.hpp b/src/gui/Connection.hpp index a35968b9..3f2b04a9 100644 --- a/src/gui/Connection.hpp +++ b/src/gui/Connection.hpp @@ -25,7 +25,6 @@ namespace Ingen { namespace Client { class ConnectionModel; } -using Client::ConnectionModel; namespace GUI { @@ -36,16 +35,16 @@ namespace GUI { class Connection : public Ganv::Edge { public: - Connection(Ganv::Canvas& canvas, - boost::shared_ptr model, - Ganv::Node* src, - Ganv::Node* dst, - uint32_t color); + Connection(Ganv::Canvas& canvas, + boost::shared_ptr model, + Ganv::Node* src, + Ganv::Node* dst, + uint32_t color); - SharedPtr model() const { return _connection_model; } + SharedPtr model() const { return _connection_model; } private: - SharedPtr _connection_model; + SharedPtr _connection_model; }; } // namespace GUI diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp index 5cbfd38a..ca838e53 100644 --- a/src/gui/ControlPanel.cpp +++ b/src/gui/ControlPanel.cpp @@ -28,6 +28,9 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { ControlPanel::ControlPanel(BaseObjectType* cobject, diff --git a/src/gui/ControlPanel.hpp b/src/gui/ControlPanel.hpp index 52d169a4..2c3551e5 100644 --- a/src/gui/ControlPanel.hpp +++ b/src/gui/ControlPanel.hpp @@ -33,7 +33,6 @@ namespace Client { class PortModel; class NodeModel; } -using namespace Ingen::Client; namespace GUI { @@ -51,11 +50,11 @@ public: const Glib::RefPtr& xml); virtual ~ControlPanel(); - void init(App& app, SharedPtr node, uint32_t poly); + void init(App& app, SharedPtr node, uint32_t poly); Control* find_port(const Raul::Path& path) const; - void add_port(SharedPtr port); + void add_port(SharedPtr port); void remove_port(const Raul::Path& path); void enable_port(const Raul::Path& path); @@ -65,10 +64,11 @@ public: std::pair ideal_size() const { return _ideal_size; } // Callback for Control - void value_changed_atom(SharedPtr port, const Raul::Atom& val); + void value_changed_atom(SharedPtr port, + const Raul::Atom& val); template - void value_changed(SharedPtr port, T val) { + void value_changed(SharedPtr port, T val) { this->value_changed_atom(port, _app->forge().make(val)); } diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp index c3e937c0..75c0b4d8 100644 --- a/src/gui/LoadPatchWindow.cpp +++ b/src/gui/LoadPatchWindow.cpp @@ -34,6 +34,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, diff --git a/src/gui/LoadPatchWindow.hpp b/src/gui/LoadPatchWindow.hpp index 5f69eb94..25194309 100644 --- a/src/gui/LoadPatchWindow.hpp +++ b/src/gui/LoadPatchWindow.hpp @@ -23,12 +23,9 @@ #include "ingen/GraphObject.hpp" -using namespace Ingen::Shared; - namespace Ingen { namespace Client { class PatchModel; } -using Ingen::Client::PatchModel; namespace GUI { @@ -46,11 +43,11 @@ public: void init(App& app) { _app = &app; } - void set_patch(SharedPtr patch); + void set_patch(SharedPtr patch); - void present(SharedPtr patch, - bool import, - GraphObject::Properties data); + void present(SharedPtr patch, + bool import, + GraphObject::Properties data); protected: void on_show(); @@ -70,7 +67,7 @@ private: GraphObject::Properties _initial_data; - SharedPtr _patch; + SharedPtr _patch; Gtk::Label* _symbol_label; Gtk::Entry* _symbol_entry; diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index 7cf0cce7..067a706e 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -36,6 +36,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp index d580f367..86ec5b2a 100644 --- a/src/gui/LoadPluginWindow.hpp +++ b/src/gui/LoadPluginWindow.hpp @@ -30,13 +30,9 @@ #include "Window.hpp" -using namespace Ingen::Shared; - namespace Ingen { namespace Client { class PatchModel; class PluginModel; } -using Ingen::Client::PluginModel; -using Ingen::Client::PatchModel; namespace GUI { @@ -52,12 +48,13 @@ public: LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void set_patch(SharedPtr patch); + void set_patch(SharedPtr patch); void set_plugins(SharedPtr plugins); - void add_plugin(SharedPtr plugin); + void add_plugin(SharedPtr plugin); - void present(SharedPtr patch, GraphObject::Properties data); + void present(SharedPtr patch, + GraphObject::Properties data); protected: void on_show(); @@ -81,7 +78,7 @@ private: Gtk::TreeModelColumn _col_uri; // Not displayed: - Gtk::TreeModelColumn< SharedPtr > _col_plugin; + Gtk::TreeModelColumn< SharedPtr > _col_plugin; }; /** Column for the filter criteria combo box. */ @@ -103,8 +100,8 @@ private: void name_cleared(Gtk::EntryIconPosition pos, const GdkEventButton* event); #endif - void set_row(Gtk::TreeModel::Row& row, SharedPtr plugin); - void new_plugin(SharedPtr plugin); + void set_row(Gtk::TreeModel::Row& row, SharedPtr plugin); + void new_plugin(SharedPtr plugin); void plugin_property_changed(const Raul::URI& plugin, const Raul::URI& predicate, @@ -113,14 +110,15 @@ private: void plugin_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* col); void plugin_selection_changed(); - std::string generate_module_name(SharedPtr plugin, - int offset=0); + std::string generate_module_name( + SharedPtr plugin, + int offset=0); void load_plugin(const Gtk::TreeModel::iterator& iter); GraphObject::Properties _initial_data; - SharedPtr _patch; + SharedPtr _patch; typedef std::map Rows; Rows _rows; diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp index 914c9c4f..720f8876 100644 --- a/src/gui/NewSubpatchWindow.cpp +++ b/src/gui/NewSubpatchWindow.cpp @@ -48,8 +48,8 @@ NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, } void -NewSubpatchWindow::present(SharedPtr patch, - GraphObject::Properties data) +NewSubpatchWindow::present(SharedPtr patch, + GraphObject::Properties data) { set_patch(patch); _initial_data = data; @@ -61,7 +61,7 @@ NewSubpatchWindow::present(SharedPtr patch, * This function MUST be called before using the window in any way! */ void -NewSubpatchWindow::set_patch(SharedPtr patch) +NewSubpatchWindow::set_patch(SharedPtr patch) { _patch = patch; } diff --git a/src/gui/NewSubpatchWindow.hpp b/src/gui/NewSubpatchWindow.hpp index e0d0cfb3..c74b5fe2 100644 --- a/src/gui/NewSubpatchWindow.hpp +++ b/src/gui/NewSubpatchWindow.hpp @@ -27,10 +27,7 @@ namespace Ingen { -using namespace Shared; - namespace Client { class PatchModel; } -using Ingen::Client::PatchModel; namespace GUI { @@ -46,18 +43,18 @@ public: NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void set_patch(SharedPtr patch); + void set_patch(SharedPtr patch); - void present(SharedPtr patch, - GraphObject::Properties data); + void present(SharedPtr patch, + GraphObject::Properties data); private: void name_changed(); void ok_clicked(); void cancel_clicked(); - GraphObject::Properties _initial_data; - SharedPtr _patch; + GraphObject::Properties _initial_data; + SharedPtr _patch; Gtk::Entry* _name_entry; Gtk::Label* _message_label; diff --git a/src/gui/NodeControlWindow.cpp b/src/gui/NodeControlWindow.cpp index 824c549f..ddc99348 100644 --- a/src/gui/NodeControlWindow.cpp +++ b/src/gui/NodeControlWindow.cpp @@ -28,19 +28,22 @@ using namespace std; namespace Ingen { + +using namespace Client; + namespace GUI { /** Create a node control window and load a new ControlPanel for it. */ -NodeControlWindow::NodeControlWindow(App& app, - SharedPtr node, - uint32_t poly) +NodeControlWindow::NodeControlWindow(App& app, + SharedPtr node, + uint32_t poly) : _node(node) , _position_stored(false) , _x(0) , _y(0) { - assert(_node != NULL); + assert(_node); property_resizable() = true; set_border_width(5); diff --git a/src/gui/NodeControlWindow.hpp b/src/gui/NodeControlWindow.hpp index c75ca255..a9bc7c5c 100644 --- a/src/gui/NodeControlWindow.hpp +++ b/src/gui/NodeControlWindow.hpp @@ -27,7 +27,6 @@ namespace Ingen { namespace Client { class NodeModel; } } -using Ingen::Client::NodeModel; namespace Ingen { namespace GUI { @@ -42,12 +41,12 @@ class ControlPanel; class NodeControlWindow : public Window { public: - NodeControlWindow(App& app, SharedPtr node, uint32_t poly); - NodeControlWindow(App& app, SharedPtr node, ControlPanel* panel); + NodeControlWindow(App& app, SharedPtr node, uint32_t poly); + NodeControlWindow(App& app, SharedPtr node, ControlPanel* panel); virtual ~NodeControlWindow(); - SharedPtr node() const { return _node; } + SharedPtr node() const { return _node; } ControlPanel* control_panel() const { return _control_panel; } @@ -58,9 +57,9 @@ protected: void on_hide(); private: - SharedPtr _node; - ControlPanel* _control_panel; - bool _callback_enabled; + SharedPtr _node; + ControlPanel* _control_panel; + bool _callback_enabled; bool _position_stored; int _x; diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index 0d58d40c..e12c1b9f 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -28,9 +28,11 @@ #include "WindowFactory.hpp" using namespace std; -using namespace Ingen::Client; namespace Ingen { + +using namespace Client; + namespace GUI { NodeMenu::NodeMenu(BaseObjectType* cobject, @@ -46,7 +48,7 @@ NodeMenu::NodeMenu(BaseObjectType* cobject, } void -NodeMenu::init(App& app, SharedPtr node) +NodeMenu::init(App& app, SharedPtr node) { ObjectMenu::init(app, node); diff --git a/src/gui/NodeMenu.hpp b/src/gui/NodeMenu.hpp index 55d73f3a..307d2680 100644 --- a/src/gui/NodeMenu.hpp +++ b/src/gui/NodeMenu.hpp @@ -23,8 +23,6 @@ #include "ingen/client/NodeModel.hpp" #include "ObjectMenu.hpp" -using Ingen::Client::NodeModel; - namespace Ingen { namespace GUI { @@ -38,7 +36,7 @@ public: NodeMenu(BaseObjectType* cobject, const Glib::RefPtr& xml); - void init(App& app, SharedPtr node); + void init(App& app, SharedPtr node); bool has_control_inputs(); diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 87b3ba5d..1336c9e9 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -40,6 +40,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { NodeModule::NodeModule(PatchCanvas& canvas, diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp index 6d83230a..a887fe3a 100644 --- a/src/gui/NodeModule.hpp +++ b/src/gui/NodeModule.hpp @@ -29,7 +29,6 @@ namespace Ingen { namespace Client { class PluginUI; class PortModel; } } -using namespace Ingen::Client; namespace Ingen { namespace GUI { @@ -48,25 +47,25 @@ class NodeModule : public Ganv::Module { public: static NodeModule* create( - PatchCanvas& canvas, - SharedPtr node, - bool human_names); + PatchCanvas& canvas, + SharedPtr node, + bool human_names); virtual ~NodeModule(); App& app() const; - Port* port(boost::shared_ptr model); + Port* port(boost::shared_ptr model); - void delete_port_view(SharedPtr port); + void delete_port_view(SharedPtr port); virtual void store_location(double x, double y); void show_human_names(bool b); - SharedPtr node() const { return _node; } + SharedPtr node() const { return _node; } protected: - NodeModule(PatchCanvas& canvas, SharedPtr node); + NodeModule(PatchCanvas& canvas, SharedPtr node); virtual bool on_double_click(GdkEventButton* ev); @@ -82,7 +81,7 @@ protected: void rename(); void property_changed(const Raul::URI& predicate, const Raul::Atom& value); - void new_port_view(SharedPtr port); + void new_port_view(SharedPtr port); void value_changed(uint32_t index, const Raul::Atom& value); void plugin_changed(); @@ -90,11 +89,11 @@ protected: bool show_menu(GdkEventButton* ev); - SharedPtr _node; - NodeMenu* _menu; - SharedPtr _plugin_ui; - Gtk::Widget* _gui_widget; - Gtk::Window* _gui_window; ///< iff popped up + SharedPtr _node; + NodeMenu* _menu; + SharedPtr _plugin_ui; + Gtk::Widget* _gui_widget; + Gtk::Window* _gui_window; ///< iff popped up }; } // namespace GUI diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp index c4b482fd..60b170f7 100644 --- a/src/gui/ObjectMenu.cpp +++ b/src/gui/ObjectMenu.cpp @@ -30,6 +30,10 @@ using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { ObjectMenu::ObjectMenu(BaseObjectType* cobject, diff --git a/src/gui/ObjectMenu.hpp b/src/gui/ObjectMenu.hpp index 3ed91e2f..9bab5945 100644 --- a/src/gui/ObjectMenu.hpp +++ b/src/gui/ObjectMenu.hpp @@ -25,8 +25,6 @@ #include "ingen/client/ObjectModel.hpp" -using Ingen::Client::ObjectModel; - namespace Ingen { namespace GUI { @@ -44,7 +42,7 @@ public: ObjectMenu(BaseObjectType* cobject, const Glib::RefPtr& xml); - void init(App& app, SharedPtr object); + void init(App& app, SharedPtr object); protected: void on_menu_learn(); @@ -56,15 +54,15 @@ protected: void property_changed(const Raul::URI& predicate, const Raul::Atom& value); - App* _app; - SharedPtr _object; - Gtk::MenuItem* _learn_menuitem; - Gtk::MenuItem* _unlearn_menuitem; - Gtk::CheckMenuItem* _polyphonic_menuitem; - Gtk::MenuItem* _disconnect_menuitem; - Gtk::MenuItem* _rename_menuitem; - Gtk::MenuItem* _destroy_menuitem; - Gtk::MenuItem* _properties_menuitem; + App* _app; + SharedPtr _object; + Gtk::MenuItem* _learn_menuitem; + Gtk::MenuItem* _unlearn_menuitem; + Gtk::CheckMenuItem* _polyphonic_menuitem; + Gtk::MenuItem* _disconnect_menuitem; + Gtk::MenuItem* _rename_menuitem; + Gtk::MenuItem* _destroy_menuitem; + Gtk::MenuItem* _properties_menuitem; bool _enable_signal; }; diff --git a/src/gui/PatchBox.cpp b/src/gui/PatchBox.cpp index 77428203..a97c4e52 100644 --- a/src/gui/PatchBox.cpp +++ b/src/gui/PatchBox.cpp @@ -51,6 +51,9 @@ using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { static const int STATUS_CONTEXT_ENGINE = 0; @@ -173,11 +176,11 @@ PatchBox::init_box(App& app) { _app = &app; - string engine_name = _app->engine()->uri().str(); + std::string engine_name = _app->engine()->uri().str(); if (engine_name == "http://drobilla.net/ns/ingen#internal") { engine_name = "internal engine"; } - _status_bar->push(string("Connected to ") + engine_name, STATUS_CONTEXT_ENGINE); + _status_bar->push(std::string("Connected to ") + engine_name, STATUS_CONTEXT_ENGINE); _menu_view_messages_window->signal_activate().connect( sigc::mem_fun(_app->messages_dialog(), &MessagesWindow::present)); @@ -367,7 +370,7 @@ PatchBox::show_port_status(const PortModel* port, const Raul::Atom& value) if (parent) { const PluginModel* plugin = dynamic_cast(parent->plugin()); if (plugin) { - const string& human_name = plugin->port_human_name(port->index()); + const std::string& human_name = plugin->port_human_name(port->index()); if (!human_name.empty()) msg << " (" << human_name << ")"; } @@ -487,7 +490,7 @@ PatchBox::event_save_as() std::string filename = dialog.get_filename(); std::string basename = Glib::path_get_basename(filename); - if (basename.find('.') == string::npos) { + if (basename.find('.') == std::string::npos) { filename += ".ingen"; basename += ".ingen"; } else if (filename.substr(filename.length() - 10) != ".ingen") { @@ -573,8 +576,8 @@ PatchBox::event_draw() int result = dialog.run(); if (result == Gtk::RESPONSE_OK) { - string filename = dialog.get_filename(); - if (filename.find(".") == string::npos) + std::string filename = dialog.get_filename(); + if (filename.find(".") == std::string::npos) filename += ".dot"; bool confirm = true; diff --git a/src/gui/PatchBox.hpp b/src/gui/PatchBox.hpp index 17855261..c7d4168a 100644 --- a/src/gui/PatchBox.hpp +++ b/src/gui/PatchBox.hpp @@ -32,7 +32,6 @@ namespace Client { class PortModel; class ObjectModel; } -using namespace Ingen::Client; namespace GUI { @@ -57,29 +56,34 @@ public: const Glib::RefPtr& xml); ~PatchBox(); - static SharedPtr create(App& app, SharedPtr patch); + static SharedPtr create( + App& app, SharedPtr patch); void init_box(App& app); - void set_patch(SharedPtr pc, SharedPtr view); + + void set_patch(SharedPtr pc, + SharedPtr view); + void set_window(PatchWindow* win) { _window = win; } void show_documentation(const std::string& doc, bool html); void hide_documentation(); - SharedPtr patch() const { return _patch; } - SharedPtr view() const { return _view; } + SharedPtr patch() const { return _patch; } + SharedPtr view() const { return _view; } - void show_port_status(const PortModel* model, const Raul::Atom& value); + void show_port_status(const Client::PortModel* model, + const Raul::Atom& value); void set_patch_from_path(const Raul::Path& path, SharedPtr view); - void object_entered(const ObjectModel* model); - void object_left(const ObjectModel* model); + void object_entered(const Client::ObjectModel* model); + void object_left(const Client::ObjectModel* model); private: - void patch_port_added(SharedPtr port); - void patch_port_removed(SharedPtr port); - void show_status(const ObjectModel* model); + void patch_port_added(SharedPtr port); + void patch_port_removed(SharedPtr port); + void show_status(const Client::ObjectModel* model); int message_dialog(const Glib::ustring& message, const Glib::ustring& secondary_text, @@ -109,10 +113,10 @@ private: void event_show_engine(); void event_clipboard_changed(GdkEventOwnerChange* ev); - App* _app; - SharedPtr _patch; - SharedPtr _view; - PatchWindow* _window; + App* _app; + SharedPtr _patch; + SharedPtr _view; + PatchWindow* _window; sigc::connection new_port_connection; sigc::connection removed_port_connection; diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp index bf79e504..589f4214 100644 --- a/src/gui/PatchCanvas.cpp +++ b/src/gui/PatchCanvas.cpp @@ -55,13 +55,14 @@ for (Items::const_iterator (iter) = coll.begin(); \ (iter) != coll.end(); ++(iter)) -using Ingen::Client::ClientStore; -using Ingen::Serialisation::Serialiser; -using Ingen::Client::PluginModel; using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { PatchCanvas::PatchCanvas(App& app, @@ -459,7 +460,7 @@ PatchCanvas::get_port_view(SharedPtr port) } else { module = dynamic_cast(_views[port->parent()]); if (module) { - for (Module::iterator p = module->begin(); + for (Ganv::Module::iterator p = module->begin(); p != module->end(); ++p) { GUI::Port* pv = dynamic_cast(*p); if (pv && pv->model() == port) @@ -683,7 +684,7 @@ void PatchCanvas::paste() { Glib::ustring str = Gtk::Clipboard::get()->wait_for_text(); - SharedPtr parser = _app.loader()->parser(); + SharedPtr parser = _app.loader()->parser(); if (!parser) { LOG(error) << "Unable to load parser, paste unavailable" << endl; return; diff --git a/src/gui/PatchCanvas.hpp b/src/gui/PatchCanvas.hpp index ab29863a..2b97d650 100644 --- a/src/gui/PatchCanvas.hpp +++ b/src/gui/PatchCanvas.hpp @@ -34,19 +34,9 @@ #include "ingen/GraphObject.hpp" #include "NodeModule.hpp" -using namespace Ganv; -using namespace Ingen::Shared; - -using std::string; -using Ganv::Port; -using Ingen::Client::ConnectionModel; -using Ingen::Client::NodeModel; -using Ingen::Client::PortModel; - namespace Ingen { namespace Client { class PatchModel; } -using Ingen::Client::PatchModel; namespace GUI { @@ -59,10 +49,10 @@ class NodeModule; class PatchCanvas : public Ganv::Canvas { public: - PatchCanvas(App& app, - SharedPtr patch, - int width, - int height); + PatchCanvas(App& app, + SharedPtr patch, + int width, + int height); virtual ~PatchCanvas() {} @@ -73,13 +63,13 @@ public: void show_port_names(bool show); bool show_port_names() const { return _show_port_names; } - void add_plugin(SharedPtr pm); - void add_node(SharedPtr nm); - void remove_node(SharedPtr nm); - void add_port(SharedPtr pm); - void remove_port(SharedPtr pm); - void connection(SharedPtr cm); - void disconnection(SharedPtr cm); + void add_plugin(SharedPtr pm); + void add_node(SharedPtr nm); + void remove_node(SharedPtr nm); + void add_port(SharedPtr pm); + void remove_port(SharedPtr pm); + void connection(SharedPtr cm); + void disconnection(SharedPtr cm); void get_new_module_location(double& x, double& y); @@ -95,17 +85,17 @@ public: private: enum ControlType { NUMBER, BUTTON }; void generate_port_name( - const string& sym_base, string& sym, - const string& name_base, string& name); + const std::string& sym_base, std::string& sym, + const std::string& name_base, std::string& name); void menu_add_port( - const string& sym_base, const string& name_base, + const std::string& sym_base, const std::string& name_base, const Raul::URI& type, bool is_output); void menu_load_plugin(); void menu_new_patch(); void menu_load_patch(); - void load_plugin(WeakPtr plugin); + void load_plugin(WeakPtr plugin); void build_menus(); @@ -125,7 +115,7 @@ private: GraphObject::Properties get_initial_data(Resource::Graph ctx=Resource::DEFAULT); - Ganv::Port* get_port_view(SharedPtr port); + Ganv::Port* get_port_view(SharedPtr port); void connect(Ganv::Node* src, Ganv::Node* dst); @@ -133,10 +123,10 @@ private: void disconnect(Ganv::Node* src, Ganv::Node* dst); - App& _app; - SharedPtr _patch; + App& _app; + SharedPtr _patch; - typedef std::map, Ganv::Module*> Views; + typedef std::map, Ganv::Module*> Views; Views _views; int _auto_position_count; diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp index 49877e5f..16451821 100644 --- a/src/gui/PatchPortModule.cpp +++ b/src/gui/PatchPortModule.cpp @@ -35,10 +35,14 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { -PatchPortModule::PatchPortModule(PatchCanvas& canvas, - SharedPtr model) +PatchPortModule::PatchPortModule(PatchCanvas& canvas, + SharedPtr model) : Ganv::Module(canvas, "", 0, 0, false) // FIXME: coords? , _model(model) { diff --git a/src/gui/PatchPortModule.hpp b/src/gui/PatchPortModule.hpp index 267aebca..8e3a320c 100644 --- a/src/gui/PatchPortModule.hpp +++ b/src/gui/PatchPortModule.hpp @@ -29,7 +29,6 @@ namespace Ingen { namespace Client { class PortModel; class NodeModel; } } -using namespace Ingen::Client; namespace Ingen { namespace GUI { @@ -48,9 +47,9 @@ class PatchPortModule : public Ganv::Module { public: static PatchPortModule* create( - PatchCanvas& canvas, - SharedPtr model, - bool human); + PatchCanvas& canvas, + SharedPtr model, + bool human); App& app() const; @@ -59,11 +58,11 @@ public: void set_name(const std::string& n); - SharedPtr port() const { return _model; } + SharedPtr port() const { return _model; } protected: - PatchPortModule(PatchCanvas& canvas, - SharedPtr model); + PatchPortModule(PatchCanvas& canvas, + SharedPtr model); bool show_menu(GdkEventButton* ev); void set_selected(gboolean b); @@ -72,8 +71,8 @@ protected: void property_changed(const Raul::URI& predicate, const Raul::Atom& value); - SharedPtr _model; - Port* _port; + SharedPtr _model; + Port* _port; }; } // namespace GUI diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp index 578d14e1..638ba7fc 100644 --- a/src/gui/PatchTreeWindow.cpp +++ b/src/gui/PatchTreeWindow.cpp @@ -31,6 +31,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { PatchTreeWindow::PatchTreeWindow(BaseObjectType* cobject, diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp index 07af108b..2fde6ad8 100644 --- a/src/gui/PatchView.cpp +++ b/src/gui/PatchView.cpp @@ -33,6 +33,9 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { PatchView::PatchView(BaseObjectType* cobject, diff --git a/src/gui/PatchView.hpp b/src/gui/PatchView.hpp index c9ce938a..39e8bab1 100644 --- a/src/gui/PatchView.hpp +++ b/src/gui/PatchView.hpp @@ -35,7 +35,6 @@ namespace Client { class PatchModel; class ObjectModel; } -using namespace Ingen::Client; namespace GUI { @@ -59,17 +58,18 @@ public: void init(App& app); - SharedPtr canvas() const { return _canvas; } - SharedPtr patch() const { return _patch; } - Gtk::ToolItem* breadcrumb_container() const { return _breadcrumb_container; } + SharedPtr canvas() const { return _canvas; } + SharedPtr patch() const { return _patch; } + Gtk::ToolItem* breadcrumb_container() const { return _breadcrumb_container; } - static SharedPtr create(App& app, SharedPtr patch); + static SharedPtr create(App& app, + SharedPtr patch); - sigc::signal signal_object_entered; - sigc::signal signal_object_left; + sigc::signal signal_object_entered; + sigc::signal signal_object_left; private: - void set_patch(SharedPtr patch); + void set_patch(SharedPtr patch); void process_toggled(); void poly_changed(); @@ -87,8 +87,8 @@ private: App* _app; - SharedPtr _patch; - SharedPtr _canvas; + SharedPtr _patch; + SharedPtr _canvas; Gtk::ScrolledWindow* _canvas_scrolledwindow; Gtk::Toolbar* _toolbar; diff --git a/src/gui/PatchWindow.hpp b/src/gui/PatchWindow.hpp index 5310af29..c6a73210 100644 --- a/src/gui/PatchWindow.hpp +++ b/src/gui/PatchWindow.hpp @@ -29,7 +29,6 @@ namespace Ingen { namespace Client { class PatchModel; } -using namespace Ingen::Client; namespace GUI { @@ -47,8 +46,8 @@ public: void init_window(App& app); - SharedPtr patch() const { return _box->patch(); } - PatchBox* box() const { return _box; } + SharedPtr patch() const { return _box->patch(); } + PatchBox* box() const { return _box; } void show_documentation(const std::string& doc, bool html) { _box->show_documentation(doc, html); @@ -58,7 +57,8 @@ public: _box->hide_documentation(); } - void show_port_status(const PortModel* model, const Raul::Atom& value) { + void show_port_status(const Client::PortModel* model, + const Raul::Atom& value) { _box->show_port_status(model, value); } diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index 0781127f..e8801e5f 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -28,7 +28,6 @@ namespace Raul { class Atom; class URI; } namespace Ingen { namespace Client { class PortModel; } -using Ingen::Client::PortModel; namespace GUI { @@ -43,15 +42,15 @@ class Port : public Ganv::Port { public: static Port* create( - App& app, - Ganv::Module& module, - SharedPtr pm, - bool human_name, - bool flip = false); + App& app, + Ganv::Module& module, + SharedPtr pm, + bool human_name, + bool flip = false); ~Port(); - SharedPtr model() const { return _port_model.lock(); } + SharedPtr model() const { return _port_model.lock(); } bool show_menu(GdkEventButton* ev); void update_metadata(); @@ -62,11 +61,11 @@ public: void set_selected(gboolean b); private: - Port(App& app, - Ganv::Module& module, - SharedPtr pm, - const std::string& name, - bool flip = false); + Port(App& app, + Ganv::Module& module, + SharedPtr pm, + const std::string& name, + bool flip = false); PatchBox* get_patch_box() const; @@ -76,10 +75,10 @@ private: void on_value_changed(GVariant* value); bool on_event(GdkEvent* ev); - App& _app; - WeakPtr _port_model; - bool _pressed : 1; - bool _flipped : 1; + App& _app; + WeakPtr _port_model; + bool _pressed : 1; + bool _flipped : 1; }; } // namespace GUI diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp index 6583f36c..df256d15 100644 --- a/src/gui/PortMenu.cpp +++ b/src/gui/PortMenu.cpp @@ -26,6 +26,10 @@ #include "WindowFactory.hpp" namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { PortMenu::PortMenu(BaseObjectType* cobject, diff --git a/src/gui/PortMenu.hpp b/src/gui/PortMenu.hpp index 6c7d2f15..cba9359d 100644 --- a/src/gui/PortMenu.hpp +++ b/src/gui/PortMenu.hpp @@ -23,8 +23,6 @@ #include "ingen/client/PortModel.hpp" #include "ObjectMenu.hpp" -using Ingen::Client::PortModel; - namespace Ingen { namespace GUI { @@ -38,9 +36,9 @@ public: PortMenu(BaseObjectType* cobject, const Glib::RefPtr& xml); - void init(App& app, - SharedPtr port, - bool patch_port=false); + void init(App& app, + SharedPtr port, + bool patch_port = false); private: void on_menu_disconnect(); diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 0540b7e1..098640ec 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -29,6 +29,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { PropertiesWindow::PropertiesWindow(BaseObjectType* cobject, diff --git a/src/gui/PropertiesWindow.hpp b/src/gui/PropertiesWindow.hpp index 03babf36..c545be92 100644 --- a/src/gui/PropertiesWindow.hpp +++ b/src/gui/PropertiesWindow.hpp @@ -25,9 +25,10 @@ #include "Window.hpp" -using namespace Ingen::Client; - namespace Ingen { + +namespace Client { class ObjectModel; } + namespace GUI { /** Object properties window. @@ -42,8 +43,8 @@ public: PropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void present(SharedPtr model); - void set_object(SharedPtr model); + void present(SharedPtr model); + void set_object(SharedPtr model); private: /** Record of a property (row in the table) */ @@ -74,14 +75,14 @@ private: typedef std::map Records; Records _records; - SharedPtr _model; - sigc::connection _property_connection; - Gtk::VBox* _vbox; - Gtk::ScrolledWindow* _scrolledwindow; - Gtk::Table* _table; - Gtk::Button* _cancel_button; - Gtk::Button* _apply_button; - Gtk::Button* _ok_button; + SharedPtr _model; + sigc::connection _property_connection; + Gtk::VBox* _vbox; + Gtk::ScrolledWindow* _scrolledwindow; + Gtk::Table* _table; + Gtk::Button* _cancel_button; + Gtk::Button* _apply_button; + Gtk::Button* _ok_button; }; } // namespace GUI diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp index 3584c12e..5a426eeb 100644 --- a/src/gui/RenameWindow.cpp +++ b/src/gui/RenameWindow.cpp @@ -30,6 +30,9 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { RenameWindow::RenameWindow(BaseObjectType* cobject, diff --git a/src/gui/RenameWindow.hpp b/src/gui/RenameWindow.hpp index e56e54bf..2fc782de 100644 --- a/src/gui/RenameWindow.hpp +++ b/src/gui/RenameWindow.hpp @@ -25,8 +25,6 @@ #include "Window.hpp" -using Ingen::Client::ObjectModel; - namespace Ingen { namespace GUI { @@ -40,16 +38,16 @@ public: RenameWindow(BaseObjectType* cobject, const Glib::RefPtr& xml); - void present(SharedPtr object); + void present(SharedPtr object); private: - void set_object(SharedPtr object); + void set_object(SharedPtr object); void values_changed(); void cancel_clicked(); void ok_clicked(); - SharedPtr _object; + SharedPtr _object; Gtk::Entry* _symbol_entry; Gtk::Entry* _label_entry; diff --git a/src/gui/SubpatchModule.cpp b/src/gui/SubpatchModule.cpp index 3960b4fd..fd3c20bf 100644 --- a/src/gui/SubpatchModule.cpp +++ b/src/gui/SubpatchModule.cpp @@ -35,6 +35,9 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { SubpatchModule::SubpatchModule(PatchCanvas& canvas, @@ -66,7 +69,7 @@ SubpatchModule::store_location(double ax, double ay) const Atom x(app().forge().make(static_cast(ax))); const Atom y(app().forge().make(static_cast(ay))); - const URIs& uris = app().uris(); + const Shared::URIs& uris = app().uris(); const Atom& existing_x = _node->get_property(uris.ingen_canvasX); const Atom& existing_y = _node->get_property(uris.ingen_canvasY); diff --git a/src/gui/SubpatchModule.hpp b/src/gui/SubpatchModule.hpp index 93a7b647..9caa6331 100644 --- a/src/gui/SubpatchModule.hpp +++ b/src/gui/SubpatchModule.hpp @@ -21,7 +21,6 @@ #include "raul/SharedPtr.hpp" #include "PatchPortModule.hpp" #include "NodeModule.hpp" -using std::string; using std::list; namespace Ingen { namespace Client { class PatchModel; @@ -29,7 +28,6 @@ namespace Ingen { namespace Client { class PortModel; class PatchWindow; } } -using namespace Ingen::Client; namespace Ingen { namespace GUI { @@ -44,8 +42,8 @@ class NodeControlWindow; class SubpatchModule : public NodeModule { public: - SubpatchModule(PatchCanvas& canvas, - SharedPtr controller); + SubpatchModule(PatchCanvas& canvas, + SharedPtr controller); virtual ~SubpatchModule() {} @@ -56,10 +54,10 @@ public: void browse_to_patch(); void menu_remove(); - SharedPtr patch() const { return _patch; } + SharedPtr patch() const { return _patch; } protected: - SharedPtr _patch; + SharedPtr _patch; }; } // namespace GUI diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index 50758632..4800d003 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -22,8 +22,9 @@ #include "ThreadedLoader.hpp" #include "ingen/client/PatchModel.hpp" -using namespace std; using namespace Raul; +using namespace boost; +using namespace std; namespace Ingen { namespace GUI { @@ -40,7 +41,7 @@ ThreadedLoader::ThreadedLoader(App& app, SharedPtr engine) warn << "Failed to load ingen_serialisation module, load disabled." << endl; } -SharedPtr +SharedPtr ThreadedLoader::parser() { Ingen::Shared::World* world = _app.world(); @@ -100,8 +101,8 @@ ThreadedLoader::load_patch(bool merge, } void -ThreadedLoader::save_patch(SharedPtr model, - const string& filename) +ThreadedLoader::save_patch(SharedPtr model, + const string& filename) { _mutex.lock(); @@ -115,8 +116,8 @@ ThreadedLoader::save_patch(SharedPtr model, } void -ThreadedLoader::save_patch_event(SharedPtr model, - const string& filename) +ThreadedLoader::save_patch_event(SharedPtr model, + const string& filename) { if (_app.serialiser()) { if (filename.find(".ingen") != string::npos) diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp index be05e6c1..b9b613b8 100644 --- a/src/gui/ThreadedLoader.hpp +++ b/src/gui/ThreadedLoader.hpp @@ -28,15 +28,7 @@ #include "ingen/serialisation/Serialiser.hpp" #include "ingen/serialisation/Parser.hpp" -using std::string; -using std::list; -using boost::optional; - namespace Ingen { -using namespace Shared; -using namespace Client; -using namespace Serialisation; - namespace GUI { /** Thread for loading patch files. @@ -56,18 +48,20 @@ public: ThreadedLoader(App& app, SharedPtr engine); - void load_patch(bool merge, - const Glib::ustring& document_uri, - optional engine_parent, - optional engine_symbol, - optional engine_data); + void load_patch(bool merge, + const Glib::ustring& document_uri, + boost::optional engine_parent, + boost::optional engine_symbol, + boost::optional engine_data); - void save_patch(SharedPtr model, const string& filename); + void save_patch(SharedPtr model, + const std::string& filename); - SharedPtr parser(); + SharedPtr parser(); private: - void save_patch_event(SharedPtr model, const string& filename); + void save_patch_event(SharedPtr model, + const std::string& filename); /** Returns nothing and takes no parameters (because they have all been bound) */ typedef sigc::slot Closure; @@ -77,7 +71,7 @@ private: App& _app; SharedPtr _engine; Glib::Mutex _mutex; - list _events; + std::list _events; }; } // namespace GUI diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp index cac4e15a..a8deb459 100644 --- a/src/gui/WindowFactory.cpp +++ b/src/gui/WindowFactory.cpp @@ -32,6 +32,9 @@ using namespace std; namespace Ingen { + +using namespace Client; + namespace GUI { WindowFactory::WindowFactory(App& app) diff --git a/src/gui/WindowFactory.hpp b/src/gui/WindowFactory.hpp index 18117570..69e66e72 100644 --- a/src/gui/WindowFactory.hpp +++ b/src/gui/WindowFactory.hpp @@ -24,16 +24,11 @@ #include "ingen/GraphObject.hpp" #include "raul/SharedPtr.hpp" -using namespace Ingen::Shared; - namespace Raul { class Path; } namespace Ingen { namespace Client { class PatchModel; class NodeModel; class ObjectModel; } -using Ingen::Client::PatchModel; -using Ingen::Client::NodeModel; -using Ingen::Client::ObjectModel; namespace GUI { @@ -62,25 +57,26 @@ public: size_t num_open_patch_windows(); - PatchBox* patch_box(SharedPtr patch); - PatchWindow* patch_window(SharedPtr patch); - PatchWindow* parent_patch_window(SharedPtr node); - NodeControlWindow* control_window(SharedPtr node); + PatchBox* patch_box(SharedPtr patch); + PatchWindow* patch_window(SharedPtr patch); + PatchWindow* parent_patch_window(SharedPtr node); + NodeControlWindow* control_window(SharedPtr node); - void present_patch(SharedPtr model, - PatchWindow* preferred = NULL, - SharedPtr view = SharedPtr()); + void present_patch( + SharedPtr model, + PatchWindow* preferred = NULL, + SharedPtr view = SharedPtr()); - void present_controls(SharedPtr node); + void present_controls(SharedPtr node); typedef GraphObject::Properties Properties; - void present_load_plugin(SharedPtr patch, Properties data=Properties()); - void present_load_patch(SharedPtr patch, Properties data=Properties()); - void present_load_subpatch(SharedPtr patch, Properties data=Properties()); - void present_new_subpatch(SharedPtr patch, Properties data=Properties()); - void present_rename(SharedPtr object); - void present_properties(SharedPtr object); + void present_load_plugin(SharedPtr patch, Properties data=Properties()); + void present_load_patch(SharedPtr patch, Properties data=Properties()); + void present_load_subpatch(SharedPtr patch, Properties data=Properties()); + void present_new_subpatch(SharedPtr patch, Properties data=Properties()); + void present_rename(SharedPtr object); + void present_properties(SharedPtr object); bool remove_patch_window(PatchWindow* win, GdkEventAny* ignored = NULL); @@ -92,22 +88,22 @@ private: typedef std::map PatchWindowMap; typedef std::map ControlWindowMap; - PatchWindow* new_patch_window(SharedPtr patch, - SharedPtr view); + PatchWindow* new_patch_window(SharedPtr patch, + SharedPtr view); - NodeControlWindow* new_control_window(SharedPtr node); + NodeControlWindow* new_control_window(SharedPtr node); bool remove_control_window(NodeControlWindow* win, GdkEventAny* ignored); - App& _app; - PatchBox* _main_box; - PatchWindowMap _patch_windows; - ControlWindowMap _control_windows; - LoadPluginWindow* _load_plugin_win; - LoadPatchWindow* _load_patch_win; - NewSubpatchWindow* _new_subpatch_win; - PropertiesWindow* _properties_win; - RenameWindow* _rename_win; + App& _app; + PatchBox* _main_box; + PatchWindowMap _patch_windows; + ControlWindowMap _control_windows; + LoadPluginWindow* _load_plugin_win; + LoadPatchWindow* _load_patch_win; + NewSubpatchWindow* _new_subpatch_win; + PropertiesWindow* _properties_win; + RenameWindow* _rename_win; }; } // namespace GUI diff --git a/src/server/AudioBuffer.hpp b/src/server/AudioBuffer.hpp index 1a3cf312..087c799f 100644 --- a/src/server/AudioBuffer.hpp +++ b/src/server/AudioBuffer.hpp @@ -30,8 +30,6 @@ #include "Context.hpp" #include "types.hpp" -using namespace std; - namespace Ingen { namespace Server { diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp index 73b6558d..fcbf1189 100644 --- a/src/server/BufferFactory.cpp +++ b/src/server/BufferFactory.cpp @@ -113,7 +113,7 @@ BufferFactory::get(LV2_URID type, uint32_t capacity, bool force_create) return create(type, capacity); } else { assert(false); - error << "Failed to obtain buffer" << endl; + Raul::error << "Failed to obtain buffer" << std::endl; return BufferRef(); } } diff --git a/src/server/ClientBroadcaster.hpp b/src/server/ClientBroadcaster.hpp index 31e59162..3e9b7d0f 100644 --- a/src/server/ClientBroadcaster.hpp +++ b/src/server/ClientBroadcaster.hpp @@ -29,8 +29,6 @@ #include "NodeFactory.hpp" -using namespace std; - namespace Ingen { namespace Server { diff --git a/src/server/ConnectionImpl.cpp b/src/server/ConnectionImpl.cpp index 2b6a0255..b53f00fe 100644 --- a/src/server/ConnectionImpl.cpp +++ b/src/server/ConnectionImpl.cpp @@ -61,10 +61,11 @@ ConnectionImpl::ConnectionImpl(PortImpl* src_port, PortImpl* dst_port) void ConnectionImpl::dump() const { - debug << _src_port->path() << " -> " << _dst_port->path() - << (must_mix() ? " (MIX) " : " (DIRECT) ") - << (must_queue() ? " (QUEUE)" : " (NOQUEUE) ") - << "POLY: " << _src_port->poly() << " => " << _dst_port->poly() << endl; + Raul::debug << _src_port->path() << " -> " << _dst_port->path() + << (must_mix() ? " (MIX) " : " (DIRECT) ") + << (must_queue() ? " (QUEUE)" : " (NOQUEUE) ") + << "POLY: " << _src_port->poly() << " => " << _dst_port->poly() + << std::endl; } const Raul::Path& @@ -115,7 +116,7 @@ ConnectionImpl::queue(Context& context) boost::intrusive_ptr src_buf = _src_port->buffer(0); if (src_buf->atom()->type != uris.atom_Sequence) { - error << "Queued connection but source is not a Sequence" << endl; + Raul::error << "Queued connection but source is not a Sequence" << std::endl; return; } diff --git a/src/server/ConnectionImpl.hpp b/src/server/ConnectionImpl.hpp index 4d915606..3dc794db 100644 --- a/src/server/ConnectionImpl.hpp +++ b/src/server/ConnectionImpl.hpp @@ -31,8 +31,6 @@ #include "BufferFactory.hpp" #include "Context.hpp" -using namespace std; - namespace Ingen { namespace Server { diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp index 3fadd312..30745161 100644 --- a/src/server/InputPort.cpp +++ b/src/server/InputPort.cpp @@ -63,7 +63,7 @@ InputPort::InputPort(BufferFactory& bufs, } bool -InputPort::apply_poly(Maid& maid, uint32_t poly) +InputPort::apply_poly(Raul::Maid& maid, uint32_t poly) { bool ret = PortImpl::apply_poly(maid, poly); if (!ret) @@ -150,7 +150,8 @@ InputPort::remove_connection(ProcessContext& context, const OutputPort* src_port } if (!connection) { - error << "[InputPort::remove_connection] Connection not found!" << endl; + Raul::error << "[InputPort::remove_connection] Connection not found!" + << std::endl; return NULL; } diff --git a/src/server/LV2Info.cpp b/src/server/LV2Info.cpp index eebc1813..9180b421 100644 --- a/src/server/LV2Info.cpp +++ b/src/server/LV2Info.cpp @@ -28,8 +28,6 @@ #include "LV2RequestRunFeature.hpp" #include "LV2ResizeFeature.hpp" -using namespace std; - namespace Ingen { namespace Server { diff --git a/src/server/LV2RequestRunFeature.hpp b/src/server/LV2RequestRunFeature.hpp index 180dfa9d..b15100d2 100644 --- a/src/server/LV2RequestRunFeature.hpp +++ b/src/server/LV2RequestRunFeature.hpp @@ -29,9 +29,6 @@ #include "NodeImpl.hpp" #include "PortImpl.hpp" -using namespace std; -using namespace Raul; - namespace Ingen { namespace Server { diff --git a/src/server/LV2ResizeFeature.hpp b/src/server/LV2ResizeFeature.hpp index e560bf13..915c7442 100644 --- a/src/server/LV2ResizeFeature.hpp +++ b/src/server/LV2ResizeFeature.hpp @@ -23,9 +23,6 @@ #include "NodeImpl.hpp" #include "PortImpl.hpp" -using namespace std; -using namespace Raul; - namespace Ingen { namespace Server { diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index 4b25c24c..dace8087 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -355,7 +355,7 @@ find_patches(const Glib::ustring& manifest_uri) new LV2Patch(patch_uri, (const char*)file_path))); free(file_path); } else { - Raul::error << "[Ingen] Patch has no rdfs:seeAlso" << endl; + Raul::error << "[Ingen] Patch has no rdfs:seeAlso" << std::endl; } } @@ -543,7 +543,7 @@ ingen_save(LV2_Handle instance, get_state_features(features, &map_path, &make_path); if (!map_path || !make_path || !plugin->map) { Raul::error << "Missing state:mapPath, state:makePath, or urid:Map." - << endl; + << std::endl; return LV2_STATE_ERR_NO_FEATURE; } @@ -581,7 +581,7 @@ ingen_restore(LV2_Handle instance, LV2_State_Map_Path* map_path = NULL; get_state_features(features, &map_path, NULL); if (!map_path) { - Raul::error << "Missing state:mapPath" << endl; + Raul::error << "Missing state:mapPath" << std::endl; return LV2_STATE_ERR_NO_FEATURE; } @@ -595,7 +595,7 @@ ingen_restore(LV2_Handle instance, &size, &type, &valflags); if (!path) { - Raul::error << "Failed to restore ingen:file" << endl; + Raul::error << "Failed to restore ingen:file" << std::endl; return LV2_STATE_ERR_NO_PROPERTY; } diff --git a/src/server/mix.hpp b/src/server/mix.hpp index 8bd1e5ba..75214093 100644 --- a/src/server/mix.hpp +++ b/src/server/mix.hpp @@ -25,8 +25,6 @@ #include "Buffer.hpp" #include "Context.hpp" -using namespace Raul; - namespace Ingen { namespace Server { -- cgit v1.2.1