summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-25 16:05:05 -0500
committerDavid Robillard <d@drobilla.net>2017-12-25 16:26:13 -0500
commit71808f61f7db48a7ab4e16537b94ee5686749909 (patch)
tree5529b7c60b2488ac9575ddcb597c905bde577399 /src/gui
parent15b3b0e9f8823752f80c7e597a70749813e61c79 (diff)
downloadingen-71808f61f7db48a7ab4e16537b94ee5686749909.tar.gz
ingen-71808f61f7db48a7ab4e16537b94ee5686749909.tar.bz2
ingen-71808f61f7db48a7ab4e16537b94ee5686749909.zip
Remove superfluous using namespace declarations
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp12
-rw-r--r--src/gui/BreadCrumbs.cpp2
-rw-r--r--src/gui/ConnectWindow.cpp5
-rw-r--r--src/gui/GraphCanvas.cpp2
-rw-r--r--src/gui/GraphPortModule.cpp2
-rw-r--r--src/gui/GraphTreeWindow.cpp2
-rw-r--r--src/gui/GraphView.cpp2
-rw-r--r--src/gui/LoadGraphWindow.cpp4
-rw-r--r--src/gui/LoadPluginWindow.cpp2
-rw-r--r--src/gui/NewSubgraphWindow.cpp4
-rw-r--r--src/gui/NodeMenu.cpp2
-rw-r--r--src/gui/NodeModule.cpp2
-rw-r--r--src/gui/Port.cpp3
-rw-r--r--src/gui/PropertiesWindow.cpp2
-rw-r--r--src/gui/RenameWindow.cpp14
-rw-r--r--src/gui/Style.cpp6
-rw-r--r--src/gui/SubgraphModule.cpp2
-rw-r--r--src/gui/ThreadedLoader.cpp9
-rw-r--r--src/gui/WidgetFactory.cpp4
-rw-r--r--src/gui/WindowFactory.cpp4
20 files changed, 27 insertions, 58 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index d9e8680c..565f3b19 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -55,8 +55,6 @@
#include "WindowFactory.hpp"
#include "rgba.hpp"
-using namespace std;
-
namespace Raul { class Deletable; }
namespace Ingen {
@@ -247,7 +245,7 @@ App::response(int32_t id, Status status, const std::string& subject)
}
void
-App::error_message(const string& str)
+App::error_message(const std::string& str)
{
_messages_window->post_error(str);
}
@@ -352,7 +350,7 @@ App::status_text() const
void
App::port_activity(Port* port)
{
- std::pair<ActivityPorts::iterator, bool> inserted = _activity_ports.insert(make_pair(port, false));
+ std::pair<ActivityPorts::iterator, bool> inserted = _activity_ports.emplace(port, false);
if (inserted.second) {
inserted.first->second = false;
}
@@ -464,10 +462,10 @@ App::quit(Gtk::Window* dialog_parent)
try {
const std::string path = _world->conf().save(
_world->uri_map(), "ingen", "gui.ttl", Configuration::GUI);
- cout << (fmt("Saved GUI settings to %1%\n") % path);
+ std::cout << (fmt("Saved GUI settings to %1%\n") % path);
} catch (const std::exception& e) {
- cerr << (fmt("Error saving GUI settings (%1%)\n")
- % e.what());
+ std::cerr << (fmt("Error saving GUI settings (%1%)\n")
+ % e.what());
}
return true;
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index 96fc2bdb..693b81e1 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -27,7 +27,7 @@
namespace Ingen {
namespace GUI {
-using namespace std;
+using std::string;
BreadCrumbs::BreadCrumbs(App& app)
: Gtk::HBox()
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index a2d674b8..74cba256 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -41,7 +41,6 @@
#include "WindowFactory.hpp"
using namespace Ingen::Client;
-using namespace std;
namespace Ingen {
namespace GUI {
@@ -169,7 +168,7 @@ ConnectWindow::set_connected_to(SPtr<Ingen::Interface> engine)
_port_spinbutton->set_sensitive(true);
}
- _progress_label->set_text(string("Disconnected"));
+ _progress_label->set_text(std::string("Disconnected"));
}
}
@@ -553,7 +552,7 @@ ConnectWindow::gtk_callback()
_connect_button->set_sensitive(true);
_disconnect_button->set_sensitive(false);
_disconnect_button->set_label("gtk-disconnect");
- _progress_label->set_text(string("Disconnected"));
+ _progress_label->set_text(std::string("Disconnected"));
}
return false;
} else {
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index ebb357cf..2d168468 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -53,7 +53,7 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-using namespace std;
+using std::string;
namespace Ingen {
diff --git a/src/gui/GraphPortModule.cpp b/src/gui/GraphPortModule.cpp
index f0c2ce11..7dc24a20 100644
--- a/src/gui/GraphPortModule.cpp
+++ b/src/gui/GraphPortModule.cpp
@@ -34,8 +34,6 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/GraphTreeWindow.cpp b/src/gui/GraphTreeWindow.cpp
index df47fabf..e5522a74 100644
--- a/src/gui/GraphTreeWindow.cpp
+++ b/src/gui/GraphTreeWindow.cpp
@@ -24,8 +24,6 @@
#include "ingen/client/GraphModel.hpp"
#include "raul/Path.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp
index bbe28a0f..cb722066 100644
--- a/src/gui/GraphView.cpp
+++ b/src/gui/GraphView.cpp
@@ -28,8 +28,6 @@
#include "GraphView.hpp"
#include "WidgetFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/LoadGraphWindow.cpp b/src/gui/LoadGraphWindow.cpp
index b858023d..28eb633a 100644
--- a/src/gui/LoadGraphWindow.cpp
+++ b/src/gui/LoadGraphWindow.cpp
@@ -34,8 +34,6 @@
#include "Style.hpp"
#include "ThreadedLoader.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
@@ -90,7 +88,7 @@ LoadGraphWindow::LoadGraphWindow(BaseObjectType* cobject,
property_select_multiple() = true;
// Add global examples directory to "shortcut folders" (bookmarks)
- const string examples_dir = Ingen::data_file_path("graphs");
+ const std::string examples_dir = Ingen::data_file_path("graphs");
if (Glib::file_test(examples_dir, Glib::FILE_TEST_IS_DIR)) {
add_shortcut_folder(examples_dir);
}
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index c386b970..65f09226 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -33,7 +33,7 @@
#include "ingen_config.h"
-using namespace std;
+using std::string;
namespace Ingen {
diff --git a/src/gui/NewSubgraphWindow.cpp b/src/gui/NewSubgraphWindow.cpp
index b8459bc6..03455adc 100644
--- a/src/gui/NewSubgraphWindow.cpp
+++ b/src/gui/NewSubgraphWindow.cpp
@@ -24,8 +24,6 @@
#include "NewSubgraphWindow.hpp"
#include "GraphView.hpp"
-using namespace std;
-
namespace Ingen {
namespace GUI {
@@ -73,7 +71,7 @@ NewSubgraphWindow::set_graph(SPtr<const Client::GraphModel> graph)
void
NewSubgraphWindow::name_changed()
{
- string name = _name_entry->get_text();
+ std::string name = _name_entry->get_text();
if (!Raul::Symbol::is_valid(name)) {
_message_label->set_text("Name contains invalid characters.");
_ok_button->property_sensitive() = false;
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 4c716fde..73564f9d 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -33,8 +33,6 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 6bc9cfcb..2e81128a 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -43,8 +43,6 @@
#include "WindowFactory.hpp"
#include "ingen_config.h"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index ebeb5e83..4f8e085e 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -37,7 +37,6 @@
#include "rgba.hpp"
using namespace Ingen::Client;
-using namespace std;
namespace Ingen {
namespace GUI {
@@ -56,7 +55,7 @@ Port::create(App& app,
Port::Port(App& app,
Ganv::Module& module,
SPtr<const PortModel> pm,
- const string& name,
+ const std::string& name,
bool flip)
: Ganv::Port(module, name,
flip ? (!pm->is_input()) : pm->is_input(),
diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp
index 970b708b..c259a92f 100644
--- a/src/gui/PropertiesWindow.cpp
+++ b/src/gui/PropertiesWindow.cpp
@@ -33,8 +33,6 @@
#include "RDFS.hpp"
#include "URIEntry.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp
index 8251b03d..c83143d9 100644
--- a/src/gui/RenameWindow.cpp
+++ b/src/gui/RenameWindow.cpp
@@ -26,8 +26,6 @@
#include "App.hpp"
#include "RenameWindow.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
@@ -80,7 +78,7 @@ RenameWindow::present(SPtr<const ObjectModel> object)
void
RenameWindow::values_changed()
{
- const string& symbol = _symbol_entry->get_text();
+ const std::string& symbol = _symbol_entry->get_text();
if (!Raul::Symbol::is_valid(symbol)) {
_message_label->set_text("Invalid symbol");
_ok_button->property_sensitive() = false;
@@ -111,11 +109,11 @@ 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();
- Raul::Path path = _object->path();
- const Atom& name_atom = _object->get_property(uris.lv2_name);
+ const URIs& uris = _app->uris();
+ const std::string& symbol_str = _symbol_entry->get_text();
+ const std::string& label = _label_entry->get_text();
+ Raul::Path path = _object->path();
+ const Atom& name_atom = _object->get_property(uris.lv2_name);
if (!label.empty() && (name_atom.type() != uris.forge.String ||
label != name_atom.ptr<char>())) {
diff --git a/src/gui/Style.cpp b/src/gui/Style.cpp
index 52afd404..81e6fb6c 100644
--- a/src/gui/Style.cpp
+++ b/src/gui/Style.cpp
@@ -30,8 +30,6 @@
#include "Style.hpp"
#include "Port.hpp"
-using namespace std;
-
namespace Ingen {
namespace GUI {
@@ -60,7 +58,7 @@ Style::Style(App& app)
* the default location.
*/
void
-Style::load_settings(string filename)
+Style::load_settings(std::string filename)
{
/* ... */
}
@@ -69,7 +67,7 @@ Style::load_settings(string filename)
* default location.
*/
void
-Style::save_settings(string filename)
+Style::save_settings(std::string filename)
{
/* ... */
}
diff --git a/src/gui/SubgraphModule.cpp b/src/gui/SubgraphModule.cpp
index a932300b..6bbcf534 100644
--- a/src/gui/SubgraphModule.cpp
+++ b/src/gui/SubgraphModule.cpp
@@ -28,8 +28,6 @@
#include "SubgraphModule.hpp"
#include "WindowFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 367f7978..37636c42 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -24,8 +24,7 @@
#include "App.hpp"
#include "ThreadedLoader.hpp"
-using namespace boost;
-using namespace std;
+using boost::optional;
namespace Ingen {
namespace GUI {
@@ -116,7 +115,7 @@ ThreadedLoader::load_graph_event(const Glib::ustring& document_uri,
void
ThreadedLoader::save_graph(SPtr<const Client::GraphModel> model,
- const string& filename)
+ const std::string& filename)
{
_mutex.lock();
@@ -131,12 +130,12 @@ ThreadedLoader::save_graph(SPtr<const Client::GraphModel> model,
void
ThreadedLoader::save_graph_event(SPtr<const Client::GraphModel> model,
- const string& filename)
+ const std::string& filename)
{
if (_app.serialiser()) {
std::lock_guard<std::mutex> lock(_app.world()->rdf_mutex());
- if (filename.find(".ingen") != string::npos) {
+ if (filename.find(".ingen") != std::string::npos) {
_app.serialiser()->write_bundle(model, filename);
} else {
_app.serialiser()->start_to_file(model->path(), filename);
diff --git a/src/gui/WidgetFactory.cpp b/src/gui/WidgetFactory.cpp
index 71db9ff4..afb6a07f 100644
--- a/src/gui/WidgetFactory.cpp
+++ b/src/gui/WidgetFactory.cpp
@@ -22,8 +22,6 @@
#include "WidgetFactory.hpp"
-using namespace std;
-
namespace Ingen {
namespace GUI {
@@ -65,7 +63,7 @@ WidgetFactory::find_ui_file()
}
Glib::RefPtr<Gtk::Builder>
-WidgetFactory::create(const string& toplevel_widget)
+WidgetFactory::create(const std::string& toplevel_widget)
{
if (ui_filename.empty()) {
find_ui_file();
diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp
index 0fe7a544..7e6afb77 100644
--- a/src/gui/WindowFactory.cpp
+++ b/src/gui/WindowFactory.cpp
@@ -31,8 +31,6 @@
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
-using namespace std;
-
namespace Ingen {
using namespace Client;
@@ -224,7 +222,7 @@ WindowFactory::present_load_plugin(SPtr<const GraphModel> graph,
_load_plugin_win->set_default_size(width - width / 8, height / 2);
}
_load_plugin_win->set_title(
- string("Load Plugin - ") + graph->path() + " - Ingen");
+ std::string("Load Plugin - ") + graph->path() + " - Ingen");
_load_plugin_win->present(graph, data);
}