summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-16 13:19:39 +0000
committerDavid Robillard <d@drobilla.net>2012-08-16 13:19:39 +0000
commita42744e1068a8630d8034df73bb344ca21a53b32 (patch)
tree9ac34a22eba94f99536eb3e153813487a6ecb79b /src/gui
parent3649db06a9fa53f3dc7cf5a5115cdc0b6cfd695a (diff)
downloadingen-a42744e1068a8630d8034df73bb344ca21a53b32.tar.gz
ingen-a42744e1068a8630d8034df73bb344ca21a53b32.tar.bz2
ingen-a42744e1068a8630d8034df73bb344ca21a53b32.zip
Remove all 'using namespace Raul'.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4715 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp10
-rw-r--r--src/gui/BreadCrumbs.cpp13
-rw-r--r--src/gui/Configuration.cpp3
-rw-r--r--src/gui/ConnectWindow.cpp3
-rw-r--r--src/gui/LoadPatchWindow.cpp11
-rw-r--r--src/gui/LoadPluginWindow.cpp25
-rw-r--r--src/gui/NewSubpatchWindow.cpp10
-rw-r--r--src/gui/NodeModule.cpp28
-rw-r--r--src/gui/ObjectMenu.cpp4
-rw-r--r--src/gui/PatchBox.cpp4
-rw-r--r--src/gui/PatchCanvas.cpp27
-rw-r--r--src/gui/PatchPortModule.cpp18
-rw-r--r--src/gui/PatchTreeWindow.cpp12
-rw-r--r--src/gui/PatchView.cpp5
-rw-r--r--src/gui/Port.cpp5
-rw-r--r--src/gui/PortPropertiesWindow.cpp4
-rw-r--r--src/gui/PropertiesWindow.cpp15
-rw-r--r--src/gui/RenameWindow.cpp21
-rw-r--r--src/gui/SubpatchModule.cpp12
-rw-r--r--src/gui/ThreadedLoader.cpp7
-rw-r--r--src/gui/WidgetFactory.cpp7
21 files changed, 110 insertions, 134 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 2c561dfc..e9c9c663 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -52,8 +52,6 @@
#define LOG(s) (s("[GUI] "))
using namespace std;
-using namespace Raul;
-using namespace Ingen::Client;
namespace Raul { class Deletable; }
@@ -150,7 +148,7 @@ App::run()
break;
_main->run();
- LOG(info)("Exiting\n");
+ LOG(Raul::info)("Exiting\n");
}
void
@@ -231,10 +229,10 @@ App::property_change(const Raul::URI& subject,
{
if (subject == uris().ingen_engine && key == uris().ingen_sampleRate) {
if (value.type() == forge().Int) {
- LOG(info)(Raul::fmt("Sample rate: %1%\n") % uris().forge.str(value));
+ LOG(Raul::info)(Raul::fmt("Sample rate: %1%\n") % uris().forge.str(value));
_sample_rate = value.get_int32();
} else {
- error << "Engine sample rate property is not an integer" << std::endl;
+ Raul::error << "Engine sample rate property is not an integer" << std::endl;
}
}
}
@@ -380,7 +378,7 @@ App::icon_from_path(const string& path, int size)
new IconDestroyNotification(*this, make_pair(path, size)),
&App::icon_destroyed);
} catch (const Glib::Error& e) {
- warn << "Error loading icon: " << e.what() << endl;
+ Raul::warn << "Error loading icon: " << e.what() << endl;
}
return buf;
}
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index e496e32b..29b149a5 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -26,7 +26,6 @@ namespace Ingen {
namespace GUI {
using namespace std;
-using namespace Raul;
BreadCrumbs::BreadCrumbs(App& app)
: Gtk::HBox()
@@ -41,7 +40,7 @@ BreadCrumbs::BreadCrumbs(App& app)
}
SharedPtr<PatchView>
-BreadCrumbs::view(const Path& path)
+BreadCrumbs::view(const Raul::Path& path)
{
for (std::list<BreadCrumb*>::const_iterator i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i)
if ((*i)->path() == path)
@@ -56,7 +55,7 @@ BreadCrumbs::view(const Path& path)
* children preserved.
*/
void
-BreadCrumbs::build(Path path, SharedPtr<PatchView> view)
+BreadCrumbs::build(Raul::Path path, SharedPtr<PatchView> view)
{
bool old_enable_signal = _enable_signal;
_enable_signal = false;
@@ -121,7 +120,7 @@ BreadCrumbs::build(Path path, SharedPtr<PatchView> view)
_breadcrumbs.push_front(root_but);
root_but->set_active(root_but->path() == _active_path);
- Path working_path("/");
+ Raul::Path working_path("/");
string suffix = path.substr(1);
while (suffix.length() > 0) {
if (suffix[0] == '/')
@@ -147,7 +146,7 @@ BreadCrumbs::build(Path path, SharedPtr<PatchView> view)
* match, otherwise ignoring @a view.
*/
BreadCrumbs::BreadCrumb*
-BreadCrumbs::create_crumb(const Path& path,
+BreadCrumbs::create_crumb(const Raul::Path& path,
SharedPtr<PatchView> view)
{
BreadCrumb* but = manage(new BreadCrumb(path,
@@ -178,7 +177,7 @@ BreadCrumbs::breadcrumb_clicked(BreadCrumb* crumb)
}
void
-BreadCrumbs::object_destroyed(const URI& uri)
+BreadCrumbs::object_destroyed(const Raul::URI& uri)
{
for (std::list<BreadCrumb*>::iterator i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i) {
if ((*i)->path() == uri.c_str()) {
@@ -194,7 +193,7 @@ BreadCrumbs::object_destroyed(const URI& uri)
}
void
-BreadCrumbs::object_moved(const Path& old_path, const Path& new_path)
+BreadCrumbs::object_moved(const Raul::Path& old_path, const Raul::Path& new_path)
{
for (std::list<BreadCrumb*>::iterator i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i) {
if ((*i)->path() == old_path)
diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp
index c6737fe7..f7f8977c 100644
--- a/src/gui/Configuration.cpp
+++ b/src/gui/Configuration.cpp
@@ -31,7 +31,6 @@
#include "Port.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
namespace GUI {
@@ -96,7 +95,7 @@ Configuration::get_port_color(const Client::PortModel* p)
return _event_port_color;
}
- warn << "[Configuration] No known port type for " << p->path() << endl;
+ Raul::warn << "[Configuration] No known port type for " << p->path() << endl;
return 0x666666FF;
}
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index 4257b8c5..0aef8dbd 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -38,7 +38,6 @@
using namespace Ingen::Client;
using namespace std;
-using namespace Raul;
namespace Ingen {
namespace GUI {
@@ -210,7 +209,7 @@ ConnectWindow::connect(bool existing)
Glib::signal_timeout().connect(
sigc::mem_fun(this, &ConnectWindow::gtk_callback), 40);
} else {
- error << "Failed to launch ingen process." << endl;
+ Raul::error << "Failed to launch ingen process." << endl;
}
return;
}
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp
index 9170ed9b..57c932af 100644
--- a/src/gui/LoadPatchWindow.cpp
+++ b/src/gui/LoadPatchWindow.cpp
@@ -34,7 +34,6 @@
#include "ThreadedLoader.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -163,8 +162,8 @@ LoadPatchWindow::ok_clicked()
if (_import) {
// If unset load_patch will load value
- boost::optional<Path> parent;
- boost::optional<Symbol> symbol;
+ boost::optional<Raul::Path> parent;
+ boost::optional<Raul::Symbol> symbol;
if (!_patch->path().is_root()) {
parent = _patch->path().parent();
symbol = _patch->symbol();
@@ -177,14 +176,14 @@ LoadPatchWindow::ok_clicked()
std::list<Glib::ustring> uri_list = get_filenames();
for (std::list<Glib::ustring>::iterator i = uri_list.begin(); i != uri_list.end(); ++i) {
// Cascade
- Atom& x = _initial_data.find(uris.ingen_canvasX)->second;
+ Raul::Atom& x = _initial_data.find(uris.ingen_canvasX)->second;
x = _app->forge().make(x.get_float() + 20.0f);
- Atom& y = _initial_data.find(uris.ingen_canvasY)->second;
+ Raul::Atom& y = _initial_data.find(uris.ingen_canvasY)->second;
y = _app->forge().make(y.get_float() + 20.0f);
Raul::Symbol symbol(symbol_from_filename(*i));
if (uri_list.size() == 1 && _symbol_entry->get_text() != "")
- symbol = Symbol::symbolify(_symbol_entry->get_text());
+ symbol = Raul::Symbol::symbolify(_symbol_entry->get_text());
symbol = avoid_symbol_clash(symbol);
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index f87eba25..69a4f53c 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -34,7 +34,6 @@
#include "ingen_config.h"
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -133,9 +132,9 @@ LoadPluginWindow::name_changed()
// Toggle add button sensitivity according name legality
if (_selection->get_selected_rows().size() == 1) {
const string sym = _node_name_entry->get_text();
- if (!Symbol::is_valid(sym)) {
+ if (!Raul::Symbol::is_valid(sym)) {
_add_button->property_sensitive() = false;
- } else if (_app->store()->find(_patch->path().child(Symbol(sym)))
+ } else if (_app->store()->find(_patch->path().child(Raul::Symbol(sym)))
!= _app->store()->end()) {
_add_button->property_sensitive() = false;
} else {
@@ -226,8 +225,8 @@ void
LoadPluginWindow::set_row(Gtk::TreeModel::Row& row,
SharedPtr<const PluginModel> plugin)
{
- const URIs& uris = _app->uris();
- const Atom& name = plugin->get_property(uris.doap_name);
+ const URIs& uris = _app->uris();
+ const Raul::Atom& name = plugin->get_property(uris.doap_name);
if (name.is_valid() && name.type() == uris.forge.String)
row[_plugins_columns._col_name] = name.get_string();
@@ -336,14 +335,14 @@ LoadPluginWindow::load_plugin(const Gtk::TreeModel::iterator& iter)
if (name.empty())
name = generate_module_name(plugin, _name_offset);
- if (name.empty() || !Symbol::is_valid(name)) {
+ if (name.empty() || !Raul::Symbol::is_valid(name)) {
Gtk::MessageDialog dialog(*this,
"Unable to chose a default name for this node. Please enter a name.",
false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
dialog.run();
} else {
- Path path = _patch->path().child(Symbol::symbolify(name));
+ Raul::Path path = _patch->path().child(Raul::Symbol::symbolify(name));
Resource::Properties props = _initial_data;
props.insert(make_pair(uris.rdf_type,
uris.ingen_Node));
@@ -359,9 +358,9 @@ LoadPluginWindow::load_plugin(const Gtk::TreeModel::iterator& iter)
}
// Cascade next node
- Atom& x = _initial_data.find(uris.ingen_canvasX)->second;
+ Raul::Atom& x = _initial_data.find(uris.ingen_canvasX)->second;
x = _app->forge().make(x.get_float() + 20.0f);
- Atom& y = _initial_data.find(uris.ingen_canvasY)->second;
+ Raul::Atom& y = _initial_data.find(uris.ingen_canvasY)->second;
y = _app->forge().make(y.get_float() + 20.0f);
}
}
@@ -396,7 +395,7 @@ LoadPluginWindow::filter_changed()
i != _app->store()->plugins()->end(); ++i) {
const SharedPtr<PluginModel> plugin = (*i).second;
- const Atom& name = plugin->get_property(uris.doap_name);
+ const Raul::Atom& name = plugin->get_property(uris.doap_name);
switch (criteria) {
case CriteriaColumns::NAME:
@@ -441,9 +440,9 @@ LoadPluginWindow::on_key_press_event(GdkEventKey* event)
}
void
-LoadPluginWindow::plugin_property_changed(const URI& plugin,
- const URI& predicate,
- const Atom& value)
+LoadPluginWindow::plugin_property_changed(const Raul::URI& plugin,
+ const Raul::URI& predicate,
+ const Raul::Atom& value)
{
const URIs& uris = _app->uris();
if (predicate == uris.doap_name) {
diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp
index 0026f8ef..fbdc5f0d 100644
--- a/src/gui/NewSubpatchWindow.cpp
+++ b/src/gui/NewSubpatchWindow.cpp
@@ -25,7 +25,6 @@
#include "PatchView.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
namespace GUI {
@@ -75,10 +74,10 @@ void
NewSubpatchWindow::name_changed()
{
string name = _name_entry->get_text();
- if (!Symbol::is_valid(name)) {
+ if (!Raul::Symbol::is_valid(name)) {
_message_label->set_text("Name contains invalid characters.");
_ok_button->property_sensitive() = false;
- } else if (_app->store()->find(_patch->path().child(Symbol(name)))
+ } else if (_app->store()->find(_patch->path().child(Raul::Symbol(name)))
!= _app->store()->end()) {
_message_label->set_text("An object already exists with that name.");
_ok_button->property_sensitive() = false;
@@ -91,8 +90,9 @@ NewSubpatchWindow::name_changed()
void
NewSubpatchWindow::ok_clicked()
{
- const Path path = _patch->path().child(Symbol::symbolify(_name_entry->get_text()));
- const uint32_t poly = _poly_spinbutton->get_value_as_int();
+ const uint32_t poly = _poly_spinbutton->get_value_as_int();
+ const Raul::Path path = _patch->path().child(
+ Raul::Symbol::symbolify(_name_entry->get_text()));
// Create patch
Resource::Properties props;
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index f6df0673..c2305e03 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -42,7 +42,6 @@
#include "WindowFactory.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -165,7 +164,7 @@ NodeModule::show_human_names(bool b)
}
void
-NodeModule::value_changed(uint32_t index, const Atom& value)
+NodeModule::value_changed(uint32_t index, const Raul::Atom& value)
{
if (!_plugin_ui)
return;
@@ -183,7 +182,7 @@ NodeModule::value_changed(uint32_t index, const Atom& value)
}
void
-NodeModule::port_activity(uint32_t index, const Atom& value)
+NodeModule::port_activity(uint32_t index, const Raul::Atom& value)
{
if (!_plugin_ui)
return;
@@ -221,7 +220,7 @@ NodeModule::embed_gui(bool embed)
{
if (embed) {
if (_gui_window) {
- warn << "LV2 GUI already popped up, cannot embed" << endl;
+ Raul::warn << "LV2 GUI already popped up, cannot embed" << endl;
return;
}
@@ -240,7 +239,7 @@ NodeModule::embed_gui(bool embed)
container->add(*_gui_widget);
Ganv::Module::embed(container);
} else {
- error << "Failed to create LV2 UI" << endl;
+ Raul::error << "Failed to create LV2 UI" << endl;
}
if (_gui_widget) {
@@ -295,7 +294,7 @@ NodeModule::delete_port_view(SharedPtr<const PortModel> model)
if (p) {
delete p;
} else {
- warn << "Failed to find port on module " << model->path() << endl;
+ Raul::warn << "Failed to find port on module " << model->path() << endl;
}
}
@@ -304,7 +303,7 @@ NodeModule::popup_gui()
{
if (_node->plugin() && _node->plugin()->type() == PluginModel::LV2) {
if (_plugin_ui) {
- warn << "LV2 GUI already embedded, cannot pop up" << endl;
+ Raul::warn << "LV2 GUI already embedded, cannot pop up" << endl;
return false;
}
@@ -333,7 +332,7 @@ NodeModule::popup_gui()
return true;
} else {
- warn << "No LV2 GUI for " << _node->path() << endl;
+ Raul::warn << "No LV2 GUI for " << _node->path() << endl;
}
}
@@ -382,15 +381,14 @@ NodeModule::on_event(GdkEvent* ev)
void
NodeModule::store_location(double ax, double ay)
{
- const Atom x(app().forge().make(static_cast<float>(ax)));
- const Atom y(app().forge().make(static_cast<float>(ay)));
-
const URIs& uris = app().uris();
- const Atom& existing_x = _node->get_property(uris.ingen_canvasX);
- const Atom& existing_y = _node->get_property(uris.ingen_canvasY);
+ const Raul::Atom x(app().forge().make(static_cast<float>(ax)));
+ const Raul::Atom y(app().forge().make(static_cast<float>(ay)));
- if (x != existing_x && y != existing_y) {
+ if (x != _node->get_property(uris.ingen_canvasX) ||
+ y != _node->get_property(uris.ingen_canvasY))
+ {
Resource::Properties remove;
remove.insert(make_pair(uris.ingen_canvasX, uris.wildcard));
remove.insert(make_pair(uris.ingen_canvasY, uris.wildcard));
@@ -402,7 +400,7 @@ NodeModule::store_location(double ax, double ay)
}
void
-NodeModule::property_changed(const URI& key, const Atom& value)
+NodeModule::property_changed(const Raul::URI& key, const Raul::Atom& value)
{
const URIs& uris = app().uris();
if (value.type() == uris.forge.Float) {
diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp
index 0cfb2482..5c784d33 100644
--- a/src/gui/ObjectMenu.cpp
+++ b/src/gui/ObjectMenu.cpp
@@ -24,8 +24,6 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-using namespace Raul;
-
namespace Ingen {
using namespace Client;
@@ -119,7 +117,7 @@ ObjectMenu::on_menu_polyphonic()
}
void
-ObjectMenu::property_changed(const URI& predicate, const Atom& value)
+ObjectMenu::property_changed(const Raul::URI& predicate, const Raul::Atom& value)
{
const URIs& uris = _app->uris();
_enable_signal = false;
diff --git a/src/gui/PatchBox.cpp b/src/gui/PatchBox.cpp
index c5a5a6c2..9150585a 100644
--- a/src/gui/PatchBox.cpp
+++ b/src/gui/PatchBox.cpp
@@ -48,8 +48,6 @@
#include <webkit/webkit.h>
#endif
-using namespace Raul;
-
namespace Ingen {
using namespace Client;
@@ -494,7 +492,7 @@ PatchBox::event_save_as()
const std::string symbol(basename.substr(0, basename.find('.')));
- if (!Symbol::is_valid(symbol)) {
+ if (!Raul::Symbol::is_valid(symbol)) {
message_dialog(
"<b>Ingen bundle names must be valid symbols.</b>",
"All characters must be _, a-z, A-Z, or 0-9, but the first may not be 0-9.",
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 6061eeb2..25552202 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -57,7 +57,6 @@
(iter) != coll.end(); ++(iter))
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -229,8 +228,8 @@ PatchCanvas::build_plugin_class_menu(
const char* sub_label_str = lilv_node_as_string(lilv_plugin_class_get_label(c));
const char* sub_uri_str = lilv_node_as_string(lilv_plugin_class_get_uri(c));
if (ancestors.find(sub_uri_str) != ancestors.end()) {
- LOG(warn) << "Infinite LV2 class recursion: " << class_uri_str
- << " <: " << sub_uri_str << endl;
+ LOG(Raul::warn) << "Infinite LV2 class recursion: " << class_uri_str
+ << " <: " << sub_uri_str << endl;
return 0;
}
@@ -491,8 +490,8 @@ PatchCanvas::connection(SharedPtr<const EdgeModel> cm)
if (tail && head) {
new GUI::Edge(*this, cm, tail, head, tail->get_fill_color());
} else {
- LOG(error) << "Unable to find ports to connect "
- << cm->tail_path() << " -> " << cm->head_path() << endl;
+ LOG(Raul::error) << "Unable to find ports to connect "
+ << cm->tail_path() << " -> " << cm->head_path() << endl;
}
}
@@ -505,8 +504,8 @@ PatchCanvas::disconnection(SharedPtr<const EdgeModel> cm)
if (src && dst)
remove_edge(src, dst);
else
- LOG(error) << "Unable to find ports to disconnect "
- << cm->tail_path() << " -> " << cm->head_path() << endl;
+ LOG(Raul::error) << "Unable to find ports to disconnect "
+ << cm->tail_path() << " -> " << cm->head_path() << endl;
}
void
@@ -704,7 +703,7 @@ PatchCanvas::paste()
Glib::ustring str = Gtk::Clipboard::get()->wait_for_text();
SharedPtr<Serialisation::Parser> parser = _app.loader()->parser();
if (!parser) {
- LOG(error) << "Unable to load parser, paste unavailable" << endl;
+ LOG(Raul::error) << "Unable to load parser, paste unavailable" << endl;
return;
}
@@ -731,8 +730,8 @@ PatchCanvas::paste()
while (to_create != "/" && !to_create.empty()
&& (first_slash = to_create.find("/")) != string::npos) {
created += to_create.substr(0, first_slash);
- assert(Path::is_valid(created));
- clipboard.put(GraphObject::path_to_uri(Path(created)), props);
+ assert(Raul::Path::is_valid(created));
+ clipboard.put(GraphObject::path_to_uri(Raul::Path(created)), props);
to_create = to_create.substr(first_slash + 1);
}
@@ -792,7 +791,7 @@ PatchCanvas::generate_port_name(
break;
}
- assert(Path::is_valid(string("/") + symbol));
+ assert(Raul::Path::is_valid(string("/") + symbol));
name.append(" ").append(num_buf);
}
@@ -803,7 +802,7 @@ PatchCanvas::menu_add_port(const string& sym_base, const string& name_base,
{
string sym, name;
generate_port_name(sym_base, sym, name_base, name);
- const Path& path = _patch->path().child(Raul::Symbol(sym));
+ const Raul::Path& path = _patch->path().child(Raul::Symbol(sym));
const URIs& uris = _app.uris();
@@ -838,8 +837,8 @@ PatchCanvas::load_plugin(WeakPtr<PluginModel> weak_plugin)
symbol = Raul::Symbol(ss.str());
}
- const URIs& uris = _app.uris();
- const Path path = _patch->path().child(symbol);
+ const URIs& uris = _app.uris();
+ const Raul::Path path = _patch->path().child(symbol);
// FIXME: polyphony?
GraphObject::Properties props = get_initial_data();
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index 3ccf8d07..a260c35e 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -34,7 +34,6 @@
#include "WindowFactory.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -92,15 +91,14 @@ PatchPortModule::show_menu(GdkEventButton* ev)
void
PatchPortModule::store_location(double ax, double ay)
{
- const Atom x(app().forge().make(static_cast<float>(ax)));
- const Atom y(app().forge().make(static_cast<float>(ay)));
-
const URIs& uris = app().uris();
- const Atom& existing_x = _model->get_property(uris.ingen_canvasX);
- const Atom& existing_y = _model->get_property(uris.ingen_canvasY);
+ const Raul::Atom x(app().forge().make(static_cast<float>(ax)));
+ const Raul::Atom y(app().forge().make(static_cast<float>(ay)));
- if (x != existing_x && y != existing_y) {
+ if (x != _model->get_property(uris.ingen_canvasX) ||
+ y != _model->get_property(uris.ingen_canvasY))
+ {
Resource::Properties remove;
remove.insert(make_pair(uris.ingen_canvasX, uris.wildcard));
remove.insert(make_pair(uris.ingen_canvasY, uris.wildcard));
@@ -116,8 +114,8 @@ PatchPortModule::store_location(double ax, double ay)
void
PatchPortModule::show_human_names(bool b)
{
- const URIs& uris = app().uris();
- const Atom& name = _model->get_property(uris.lv2_name);
+ const URIs& uris = app().uris();
+ const Raul::Atom& name = _model->get_property(uris.lv2_name);
if (b && name.type() == uris.forge.String) {
set_name(name.get_string());
} else {
@@ -132,7 +130,7 @@ PatchPortModule::set_name(const std::string& n)
}
void
-PatchPortModule::property_changed(const URI& key, const Atom& value)
+PatchPortModule::property_changed(const Raul::URI& key, const Raul::Atom& value)
{
const URIs& uris = app().uris();
if (value.type() == uris.forge.Float) {
diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp
index 24c56f1e..06eed694 100644
--- a/src/gui/PatchTreeWindow.cpp
+++ b/src/gui/PatchTreeWindow.cpp
@@ -27,7 +27,6 @@
#define LOG(s) s << "[PatchTreeWindow] "
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -162,7 +161,7 @@ PatchTreeWindow::show_patch_menu(GdkEventButton* ev)
Gtk::TreeModel::Row row = *active;
SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
if (pm)
- warn << "TODO: patch menu from tree window" << endl;
+ Raul::warn << "TODO: patch menu from tree window" << endl;
}
}
@@ -194,8 +193,9 @@ PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
}
void
-PatchTreeWindow::patch_property_changed(const URI& key, const Atom& value,
- SharedPtr<PatchModel> patch)
+PatchTreeWindow::patch_property_changed(const Raul::URI& key,
+ const Raul::Atom& value,
+ SharedPtr<PatchModel> patch)
{
const URIs& uris = _app->uris();
_enable_signal = false;
@@ -205,7 +205,7 @@ PatchTreeWindow::patch_property_changed(const URI& key, const Atom& value,
Gtk::TreeModel::Row row = *i;
row[_patch_tree_columns.enabled_col] = value.get_bool();
} else {
- LOG(error) << "Unable to find patch " << patch->path() << endl;
+ LOG(Raul::error) << "Unable to find patch " << patch->path() << endl;
}
}
_enable_signal = true;
@@ -223,7 +223,7 @@ PatchTreeWindow::patch_moved(SharedPtr<PatchModel> patch)
Gtk::TreeModel::Row row = *i;
row[_patch_tree_columns.name_col] = patch->symbol().c_str();
} else {
- LOG(error) << "Unable to find patch " << patch->path() << endl;
+ LOG(Raul::error) << "Unable to find patch " << patch->path() << endl;
}
_enable_signal = true;
diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp
index 0d2bf21b..f1f4c96d 100644
--- a/src/gui/PatchView.cpp
+++ b/src/gui/PatchView.cpp
@@ -28,7 +28,6 @@
#include "WidgetFactory.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -194,13 +193,13 @@ PatchView::property_changed(const Raul::URI& predicate, const Raul::Atom& value)
if (value.type() == _app->uris().forge.Bool) {
_process_but->set_active(value.get_bool());
} else {
- warn << "Bad type for ingen:enabled: " << value.type() << endl;
+ Raul::warn << "Bad type for ingen:enabled: " << value.type() << endl;
}
} else if (predicate == _app->uris().ingen_polyphony) {
if (value.type() == _app->uris().forge.Int) {
_poly_spin->set_value(value.get_int32());
} else {
- warn << "Bad type for ingen:polyphony: " << value.type() << endl;
+ Raul::warn << "Bad type for ingen:polyphony: " << value.type() << endl;
}
}
_enable_signal = true;
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index 5744a84d..a238d60f 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -33,7 +33,6 @@
using namespace Ingen::Client;
using namespace std;
-using namespace Raul;
namespace Ingen {
namespace GUI {
@@ -165,7 +164,7 @@ Port::on_value_changed(GVariant* value)
}
void
-Port::value_changed(const Atom& value)
+Port::value_changed(const Raul::Atom& value)
{
if (!_pressed && value.type() == _app.forge().Float) {
Ganv::Port::set_control_value(value.get_float());
@@ -319,7 +318,7 @@ Port::get_patch_box() const
}
void
-Port::property_changed(const URI& key, const Atom& value)
+Port::property_changed(const Raul::URI& key, const Raul::Atom& value)
{
const URIs& uris = _app.uris();
if (value.type() == uris.forge.Float) {
diff --git a/src/gui/PortPropertiesWindow.cpp b/src/gui/PortPropertiesWindow.cpp
index 4ef6d89b..f6af2563 100644
--- a/src/gui/PortPropertiesWindow.cpp
+++ b/src/gui/PortPropertiesWindow.cpp
@@ -25,7 +25,6 @@
#include "PortPropertiesWindow.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
using namespace Client;
@@ -93,7 +92,8 @@ PortPropertiesWindow::present(SharedPtr<const PortModel> pm)
}
void
-PortPropertiesWindow::property_changed(const URI& key, const Atom& value)
+PortPropertiesWindow::property_changed(const Raul::URI& key,
+ const Raul::Atom& value)
{
const URIs& uris = _app->uris();
if (value.type() == uris.forge.Float) {
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp
index c12aefd5..b146d412 100644
--- a/src/gui/PropertiesWindow.cpp
+++ b/src/gui/PropertiesWindow.cpp
@@ -32,7 +32,6 @@
#define LOG(s) s << "[PropertiesWindow] "
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -352,7 +351,7 @@ PropertiesWindow::create_value_widget(const Raul::URI& uri, const Raul::Atom& va
return widget;
}
- LOG(error) << "Unable to create widget for value " << forge.str(value) << endl;
+ LOG(Raul::error) << "Unable to create widget for value " << forge.str(value) << endl;
return NULL;
}
@@ -409,7 +408,7 @@ PropertiesWindow::value_edited(const Raul::URI& predicate)
{
Records::iterator r = _records.find(predicate);
if (r == _records.end()) {
- LOG(error) << "Unknown property `" << predicate << "' edited" << endl;
+ LOG(Raul::error) << "Unknown property `" << predicate << "' edited" << endl;
return;
}
@@ -441,7 +440,7 @@ PropertiesWindow::value_edited(const Raul::URI& predicate)
return;
bad_type:
- LOG(error) << "Property `" << predicate << "' value widget has wrong type" << endl;
+ LOG(Raul::error) << "Property `" << predicate << "' value widget has wrong type" << endl;
return;
}
@@ -518,21 +517,21 @@ PropertiesWindow::cancel_clicked()
void
PropertiesWindow::apply_clicked()
{
- LOG(debug) << "apply {" << endl;
+ LOG(Raul::debug) << "apply {" << endl;
Resource::Properties properties;
for (Records::const_iterator r = _records.begin(); r != _records.end(); ++r) {
const Raul::URI& uri = r->first;
const Record& record = r->second;
if (!_model->has_property(uri, record.value)) {
- LOG(debug) << "\t" << uri
- << " = " << _app->forge().str(record.value) << endl;
+ LOG(Raul::debug) << "\t" << uri
+ << " = " << _app->forge().str(record.value) << endl;
properties.insert(make_pair(uri, record.value));
}
}
_app->interface()->put(_model->uri(), properties);
- LOG(debug) << "}" << endl;
+ LOG(Raul::debug) << "}" << endl;
}
void
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp
index ea1ae6f1..df22a3c0 100644
--- a/src/gui/RenameWindow.cpp
+++ b/src/gui/RenameWindow.cpp
@@ -26,7 +26,6 @@
#include "RenameWindow.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -64,7 +63,7 @@ RenameWindow::set_object(SharedPtr<const ObjectModel> object)
{
_object = object;
_symbol_entry->set_text(object->path().symbol());
- const Atom& name_atom = object->get_property(_app->uris().lv2_name);
+ const Raul::Atom& name_atom = object->get_property(_app->uris().lv2_name);
_label_entry->set_text(
(name_atom.type() == _app->forge().String) ? name_atom.get_string() : "");
}
@@ -82,7 +81,7 @@ RenameWindow::values_changed()
{
const string& symbol = _symbol_entry->get_text();
const string& label = _label_entry->get_text();
- if (!Symbol::is_valid(symbol)) {
+ if (!Raul::Symbol::is_valid(symbol)) {
_message_label->set_text("Invalid symbol");
_ok_button->property_sensitive() = false;
} else if (_object->symbol() != symbol &&
@@ -112,14 +111,14 @@ RenameWindow::cancel_clicked()
void
RenameWindow::ok_clicked()
{
- const URIs& uris = _app->uris();
- const string& symbol_str = _symbol_entry->get_text();
- const string& label = _label_entry->get_text();
- Path path = _object->path();
- const Atom& name_atom = _object->get_property(uris.lv2_name);
-
- if (Symbol::is_valid(symbol_str)) {
- const Symbol symbol(symbol_str);
+ const URIs& uris = _app->uris();
+ const string& symbol_str = _symbol_entry->get_text();
+ const string& label = _label_entry->get_text();
+ Raul::Path path = _object->path();
+ const Raul::Atom& name_atom = _object->get_property(uris.lv2_name);
+
+ if (Raul::Symbol::is_valid(symbol_str)) {
+ const Raul::Symbol symbol(symbol_str);
if (symbol != _object->symbol()) {
path = _object->path().parent().child(symbol);
_app->interface()->move(_object->path(), path);
diff --git a/src/gui/SubpatchModule.cpp b/src/gui/SubpatchModule.cpp
index dd09e992..5425677c 100644
--- a/src/gui/SubpatchModule.cpp
+++ b/src/gui/SubpatchModule.cpp
@@ -29,7 +29,6 @@
#include "WindowFactory.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
@@ -63,15 +62,14 @@ SubpatchModule::on_double_click(GdkEventButton* event)
void
SubpatchModule::store_location(double ax, double ay)
{
- const Atom x(app().forge().make(static_cast<float>(ax)));
- const Atom y(app().forge().make(static_cast<float>(ay)));
-
const URIs& uris = app().uris();
- const Atom& existing_x = _node->get_property(uris.ingen_canvasX);
- const Atom& existing_y = _node->get_property(uris.ingen_canvasY);
+ const Raul::Atom x(app().forge().make(static_cast<float>(ax)));
+ const Raul::Atom y(app().forge().make(static_cast<float>(ay)));
- if (x != existing_x && y != existing_y) {
+ if (x != _node->get_property(uris.ingen_canvasX) ||
+ y != _node->get_property(uris.ingen_canvasY))
+ {
Resource::Properties remove;
remove.insert(make_pair(uris.ingen_canvasX, uris.wildcard));
remove.insert(make_pair(uris.ingen_canvasY, uris.wildcard));
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index c8f65e2b..3154dfbb 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -24,7 +24,6 @@
#include "App.hpp"
#include "ThreadedLoader.hpp"
-using namespace Raul;
using namespace boost;
using namespace std;
@@ -40,7 +39,7 @@ ThreadedLoader::ThreadedLoader(App& app, SharedPtr<Interface> engine)
if (parser())
start();
else
- warn << "Failed to load ingen_serialisation module, load disabled." << endl;
+ Raul::warn << "Failed to load ingen_serialisation module, load disabled." << endl;
}
ThreadedLoader::~ThreadedLoader()
@@ -76,8 +75,8 @@ ThreadedLoader::_run()
void
ThreadedLoader::load_patch(bool merge,
const Glib::ustring& document_uri,
- optional<Path> engine_parent,
- optional<Symbol> engine_symbol,
+ optional<Raul::Path> engine_parent,
+ optional<Raul::Symbol> engine_symbol,
optional<GraphObject::Properties> engine_data)
{
_mutex.lock();
diff --git a/src/gui/WidgetFactory.cpp b/src/gui/WidgetFactory.cpp
index 5e5b987a..31749ffe 100644
--- a/src/gui/WidgetFactory.cpp
+++ b/src/gui/WidgetFactory.cpp
@@ -24,7 +24,6 @@
#include "WidgetFactory.hpp"
using namespace std;
-using namespace Raul;
namespace Ingen {
namespace GUI {
@@ -60,8 +59,8 @@ WidgetFactory::find_ui_file()
if (is_readable(ui_filename))
return;
- error << "[WidgetFactory] Unable to find ingen_gui.ui in "
- << INGEN_DATA_DIR << endl;
+ Raul::error << "[WidgetFactory] Unable to find ingen_gui.ui in "
+ << INGEN_DATA_DIR << endl;
throw std::runtime_error("Unable to find UI file");
}
@@ -77,7 +76,7 @@ WidgetFactory::create(const string& toplevel_widget)
else
return Gtk::Builder::create_from_file(ui_filename, toplevel_widget.c_str());
} catch (const Gtk::BuilderError& ex) {
- error << "[WidgetFactory] " << ex.what() << endl;
+ Raul::error << "[WidgetFactory] " << ex.what() << endl;
throw ex;
}
}