summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-01-06 23:49:17 +0000
committerDavid Robillard <d@drobilla.net>2010-01-06 23:49:17 +0000
commitcb5e934666e128e27faa95587fbdecf01f0e324d (patch)
tree1e694e2812381efbb3eb4b5ace2cdecc118b29f6 /src/gui
parent092eb35edb999a9dd809e197d7dd9a4ebb0d6bd5 (diff)
downloadingen-cb5e934666e128e27faa95587fbdecf01f0e324d.tar.gz
ingen-cb5e934666e128e27faa95587fbdecf01f0e324d.tar.bz2
ingen-cb5e934666e128e27faa95587fbdecf01f0e324d.zip
Do all logging output via Raul streams.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2349 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp83
-rw-r--r--src/gui/App.hpp1
-rw-r--r--src/gui/Configuration.cpp5
-rw-r--r--src/gui/ConnectWindow.cpp8
-rw-r--r--src/gui/Connection.cpp1
-rw-r--r--src/gui/ControlPanel.cpp56
-rw-r--r--src/gui/ControlPanel.hpp1
-rw-r--r--src/gui/Controls.cpp7
-rw-r--r--src/gui/GladeFactory.cpp9
-rw-r--r--src/gui/LoadPluginWindow.cpp1
-rw-r--r--src/gui/LoadSubpatchWindow.cpp1
-rw-r--r--src/gui/NodeControlWindow.cpp8
-rw-r--r--src/gui/NodeMenu.cpp1
-rw-r--r--src/gui/NodeModule.cpp11
-rw-r--r--src/gui/PatchCanvas.cpp29
-rw-r--r--src/gui/PatchPortModule.cpp1
-rw-r--r--src/gui/PatchPropertiesWindow.cpp1
-rw-r--r--src/gui/PatchTreeWindow.cpp10
-rw-r--r--src/gui/PatchView.cpp16
-rw-r--r--src/gui/PatchView.hpp1
-rw-r--r--src/gui/PatchWindow.cpp1
-rw-r--r--src/gui/Port.cpp4
-rw-r--r--src/gui/PortMenu.cpp1
-rw-r--r--src/gui/SubpatchModule.cpp11
-rw-r--r--src/gui/SubpatchModule.hpp1
-rw-r--r--src/gui/ThreadedLoader.cpp4
26 files changed, 52 insertions, 221 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 0f34de2f..3efd9dc0 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -24,6 +24,7 @@
#include <gtk/gtkwindow.h>
#include <time.h>
#include <sys/time.h>
+#include "raul/log.hpp"
#include "raul/Path.hpp"
#include "flowcanvas/Connection.hpp"
#include "module/World.hpp"
@@ -51,6 +52,7 @@
#endif
using namespace std;
+using namespace Raul;
using namespace Ingen::Client;
namespace Raul { class Deletable; }
@@ -150,7 +152,7 @@ App::run()
{
assert(_main);
_main->run();
- cout << "Gtk exiting." << endl;
+ info << "GUI exiting" << endl;
}
@@ -272,84 +274,9 @@ App::animate()
}
-
/******** Event Handlers ************/
-#if 0
-App::event_load_session()
-{
- Gtk::FileChooserDialog* dialog
- = new Gtk::FileChooserDialog(*_main_window, "Load Session", Gtk::FILE_CHOOSER_ACTION_OPEN);
-
- dialog->add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- dialog->add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
- int result = dialog->run();
- string filename = dialog->get_filename();
- delete dialog;
-
- cout << result << endl;
-
- assert(result == Gtk::RESPONSE_OK || result == Gtk::RESPONSE_CANCEL || result == Gtk::RESPONSE_NONE);
-
- if (result == Gtk::RESPONSE_OK)
- //configuration->load_session(filename);
- _controller->load_session(filename);
-}
-
-
-void
-App::event_save_session_as()
-{
- Gtk::FileChooserDialog dialog(*_main_window, "Save Session", Gtk::FILE_CHOOSER_ACTION_SAVE);
-
- /*
- Gtk::VBox* box = dialog.get_vbox();
- Gtk::Label warning("Warning: Recursively saving will overwrite any subpatch files \
- without confirmation.");
- box->pack_start(warning, false, false, 2);
- Gtk::CheckButton recursive_checkbutton("Recursively save all subpatches");
- box->pack_start(recursive_checkbutton, false, false, 0);
- recursive_checkbutton.show();
- */
- dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
- dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
-
- int result = dialog.run();
- //bool recursive = recursive_checkbutton.get_active();
-
- assert(result == Gtk::RESPONSE_OK || result == Gtk::RESPONSE_CANCEL || result == Gtk::RESPONSE_NONE);
-
- if (result == Gtk::RESPONSE_OK) {
- string filename = dialog.get_filename();
- if (filename.length() < 11 || filename.substr(filename.length()-10) != ".omsession")
- filename += ".omsession";
-
- bool confirm = false;
- std::fstream fin;
- fin.open(filename.c_str(), std::ios::in);
- if (fin.is_open()) { // File exists
- string msg = "File already exists! Are you sure you want to overwrite ";
- msg += filename + "?";
- Gtk::MessageDialog confir_dialog(*_main_window,
- msg, false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_YES_NO, true);
- if (confir_dialog.run() == Gtk::RESPONSE_YES)
- confirm = true;
- else
- confirm = false;
- } else { // File doesn't exist
- confirm = true;
- }
- fin.close();
-
- if (confirm) {
- _controller->save_session(filename);
- }
- }
-}
-#endif
-
-
void
App::register_callbacks()
{
@@ -418,9 +345,8 @@ App::icon_from_path(const string& path, int size)
_icons.insert(make_pair(make_pair(path, size), buf.operator->()));
buf->add_destroy_notify_callback(new pair<string, int>(path, size),
&App::icon_destroyed);
- //cerr << "Loaded icon " << path << " with size " << size << endl;
} catch (Glib::Error e) {
- cerr << "Error loading icon: " << e.what() << endl;
+ warn << "Error loading icon: " << e.what() << endl;
}
return buf;
}
@@ -430,7 +356,6 @@ void*
App::icon_destroyed(void* data)
{
pair<string, int>* p = static_cast<pair<string, int>*>(data);
- //cerr << "Destroyed icon " << p->first << " with size " << p->second << endl;
Icons::iterator iter = instance()._icons.find(*p);
if (iter != instance()._icons.end())
instance()._icons.erase(iter);
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index bf55d51b..0ced5584 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -22,7 +22,6 @@
#include <string>
#include <map>
#include <utility>
-#include <iostream>
#include <libgnomecanvasmm.h>
#include <gtkmm.h>
#include <libglademm.h>
diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp
index 83de3321..03f84a5a 100644
--- a/src/gui/Configuration.cpp
+++ b/src/gui/Configuration.cpp
@@ -18,9 +18,9 @@
#include "Configuration.hpp"
#include <cstdlib>
#include <cassert>
-#include <iostream>
#include <fstream>
#include <map>
+#include "raul/log.hpp"
#include "client/PortModel.hpp"
#include "client/PluginModel.hpp"
#include "serialisation/Parser.hpp"
@@ -29,6 +29,7 @@
#include "Port.hpp"
using namespace std;
+using namespace Raul;
namespace Ingen {
namespace GUI {
@@ -102,7 +103,7 @@ Configuration::get_port_color(const PortModel* p)
return _event_port_color;
}
- cerr << "[Configuration] Unknown port type " << p->type().uri()
+ error << "[Configuration] Unknown port type " << p->type().uri()
<< ", port will appear black." << endl;
return 0x000000FF;
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index 9643f693..d2783c30 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.h>
+#include "raul/log.hpp"
#include "raul/Process.hpp"
#include "ingen-config.h"
#include "interface/EngineInterface.hpp"
@@ -48,6 +49,7 @@
using Ingen::QueuedEngineInterface;
using namespace Ingen::Client;
using namespace std;
+using namespace Raul;
namespace Raul { class Deletable; }
@@ -177,8 +179,6 @@ ConnectWindow::connect(bool existing)
if (existing)
uri = world->engine->uri().str();
- cout << "CONNECT EXISTING " << existing << " URI " << uri << endl;
-
// Create client-side listener
SharedPtr<ThreadedSigClientInterface> tsci(new ThreadedSigClientInterface(1024));
SharedPtr<Raul::Deletable> client;
@@ -236,10 +236,10 @@ ConnectWindow::connect(bool existing)
sigc::mem_fun(this, &ConnectWindow::gtk_callback), 40);
} else {
- cerr << "Failed to launch ingen process." << endl;
+ error << "Failed to launch ingen process." << endl;
}
#else
- cerr << "No OSC support" << endl;
+ error << "No OSC support" << endl;
#endif
} else
diff --git a/src/gui/Connection.cpp b/src/gui/Connection.cpp
index 48cf7372..8f4e3d7b 100644
--- a/src/gui/Connection.cpp
+++ b/src/gui/Connection.cpp
@@ -15,7 +15,6 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <iostream>
#include "client/ConnectionModel.hpp"
#include "Connection.hpp"
#include "Port.hpp"
diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp
index 96559dbf..21728d59 100644
--- a/src/gui/ControlPanel.cpp
+++ b/src/gui/ControlPanel.cpp
@@ -78,12 +78,9 @@ ControlPanel::init(SharedPtr<NodeModel> node, uint32_t poly)
node->signal_property.connect(
sigc::mem_fun(this, &ControlPanel::variable_changed));
- if (node->parent()) {
+ if (node->parent())
node->signal_property.connect(
sigc::mem_fun(this, &ControlPanel::parent_property_changed));
- } else {
- cerr << "[ControlPanel] No parent, polyphonic controls disabled" << endl;
- }
_callback_enabled = true;
}
@@ -160,9 +157,6 @@ ControlPanel::add_port(SharedPtr<PortModel> pm)
_voice_control_box->size_request(voice_size);
_ideal_size.first += voice_size.width;
_ideal_size.second += voice_size.height;
-
- //cerr << "Setting ideal size to " << _ideal_size.first
- // << " x " << _ideal_size.second << endl;
}
@@ -184,54 +178,6 @@ ControlPanel::remove_port(const Path& path)
}
-/** Rename the control for the given port.
- */
-/*
-void
-ControlPanel::rename_port(const Path& old_path, const Path& new_path)
-{
- for (vector<Control*>::iterator cg = _controls.begin(); cg != _controls.end(); ++cg) {
- if ((*cg)->port_model()->path() == old_path) {
- (*cg)->set_name(new_path.name());
- return;
- }
- }
-}
-*/
-
-#if 0
-/** Enable the control for the given port.
- *
- * Used when all connections to port are un-made.
- */
-void
-ControlPanel::enable_port(const Path& path)
-{
- for (vector<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
- if ((*i)->port_model()->path() == path) {
- (*i)->enable();
- return;
- }
- }
-}
-
-
-/** Disable the control for the given port.
- *
- * Used when port is connected.
- */
-void
-ControlPanel::disable_port(const Path& path)
-{
- for (vector<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
- if ((*i)->port_model()->path() == path) {
- (*i)->disable();
- return;
- }
- }
-}
-#endif
-
/** Callback for Controls to notify this of a change.
*/
void
diff --git a/src/gui/ControlPanel.hpp b/src/gui/ControlPanel.hpp
index 375c0a72..024bd720 100644
--- a/src/gui/ControlPanel.hpp
+++ b/src/gui/ControlPanel.hpp
@@ -20,7 +20,6 @@
#include <vector>
#include <string>
-#include <iostream>
#include <utility> // for pair<>
#include <sigc++/sigc++.h>
#include <gtkmm.h>
diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp
index 9c66b1ae..5b7d40e8 100644
--- a/src/gui/Controls.cpp
+++ b/src/gui/Controls.cpp
@@ -16,8 +16,8 @@
*/
#include <cmath>
-#include <iostream>
#include <algorithm>
+#include "raul/log.hpp"
#include "interface/EngineInterface.hpp"
#include "client/PluginModel.hpp"
#include "client/NodeModel.hpp"
@@ -347,8 +347,9 @@ ToggleControl::set_value(const Atom& val)
break;
case Atom::BOOL:
enable = (val.get_bool());
+ break;
default:
- cerr << "Unsupported value type for toggle control" << endl;
+ error << "Unsupported value type for toggle control" << endl;
}
_enable_signal = false;
@@ -422,7 +423,7 @@ StringControl::set_value(const Atom& val)
if (val.type() == Atom::STRING)
_entry->set_text(val.get_string());
else
- cerr << "ERROR: Non-string value for string port" << endl;
+ error << "Non-string value for string port" << endl;
_enable_signal = true;
}
diff --git a/src/gui/GladeFactory.cpp b/src/gui/GladeFactory.cpp
index 170a5cd4..41fcffc4 100644
--- a/src/gui/GladeFactory.cpp
+++ b/src/gui/GladeFactory.cpp
@@ -16,12 +16,13 @@
*/
#include "GladeFactory.hpp"
-#include <iostream>
#include <fstream>
+#include "raul/log.hpp"
#include "ingen-config.h"
#include "shared/runtime_paths.hpp"
using namespace std;
+using namespace Raul;
namespace Ingen {
namespace GUI {
@@ -41,12 +42,12 @@ GladeFactory::find_glade_file()
ifstream fs(glade_filename.c_str());
if (fs.fail()) {
- cerr << "Unable to find ingen_gui.glade in " << INGEN_DATA_DIR << endl;
+ error << "[GladeFactory] Unable to find ingen_gui.glade in " << INGEN_DATA_DIR << endl;
throw;
}
fs.close();
- cerr << "[GladeFactory] Loading widgets from " << glade_filename.c_str() << endl;
+ info << "[GladeFactory] Loading widgets from " << glade_filename.c_str() << endl;
}
@@ -62,7 +63,7 @@ GladeFactory::new_glade_reference(const string& toplevel_widget)
else
return Gnome::Glade::Xml::create(glade_filename, toplevel_widget.c_str());
} catch (const Gnome::Glade::XmlError& ex) {
- cerr << ex.what() << endl;
+ error << "[GladeFactory] " << ex.what() << endl;
throw ex;
}
}
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index be3a6e1a..daa8e88a 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -15,7 +15,6 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <iostream>
#include <cassert>
#include <algorithm>
#include <ctype.h>
diff --git a/src/gui/LoadSubpatchWindow.cpp b/src/gui/LoadSubpatchWindow.cpp
index 848e7643..82edc3a2 100644
--- a/src/gui/LoadSubpatchWindow.cpp
+++ b/src/gui/LoadSubpatchWindow.cpp
@@ -157,7 +157,6 @@ LoadSubpatchWindow::ok_clicked()
}
if (_poly_from_user_radio->get_active()) {
- cerr << "Overriding poly: " << _poly_spinbutton->get_value_as_int() << endl;
_initial_data.insert(make_pair("ingen:polyphony", (int)_poly_spinbutton->get_value_as_int()));
} else if (_poly_from_parent_radio->get_active()) {
_initial_data.insert(make_pair("ingen:polyphony", (int)_patch->poly()));
diff --git a/src/gui/NodeControlWindow.cpp b/src/gui/NodeControlWindow.cpp
index 65ab5f21..07066d7d 100644
--- a/src/gui/NodeControlWindow.cpp
+++ b/src/gui/NodeControlWindow.cpp
@@ -15,7 +15,6 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <iostream>
#include <cmath>
#include "interface/EngineInterface.hpp"
#include "client/NodeModel.hpp"
@@ -94,10 +93,7 @@ void
NodeControlWindow::resize()
{
pair<int,int> controls_size = _control_panel->ideal_size();
- /*int width = 400;
- int height = controls_size.second
- + ((_node->polyphonic()) ? 4 : 40);*/
- int width = controls_size.first;
+ int width = controls_size.first;
int height = controls_size.second;
if (height > property_screen().get_value()->get_height() - 64)
@@ -105,8 +101,6 @@ NodeControlWindow::resize()
if (width > property_screen().get_value()->get_width() - 64)
width = property_screen().get_value()->get_width() - 64;
- //cerr << "Resizing to: " << width << " x " << height << endl;
-
Gtk::Window::resize(width, height);
}
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 3819f45a..d667181a 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -15,7 +15,6 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <iostream>
#include <gtkmm.h>
#include "interface/EngineInterface.hpp"
#include "client/NodeModel.hpp"
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 9010221a..de479c54 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -17,6 +17,7 @@
#include <cassert>
#include "ingen-config.h"
+#include "raul/log.hpp"
#include "raul/Atom.hpp"
#include "interface/EngineInterface.hpp"
#include "client/PatchModel.hpp"
@@ -186,7 +187,7 @@ NodeModule::embed_gui(bool embed)
if (embed) {
if (_gui_window) {
- cerr << "LV2 GUI already popped up, cannot embed" << endl;
+ warn << "LV2 GUI already popped up, cannot embed" << endl;
return;
}
@@ -206,7 +207,7 @@ NodeModule::embed_gui(bool embed)
container->add(*_gui_widget);
FlowCanvas::Module::embed(container);
} else {
- cerr << "ERROR: Failed to create LV2 UI" << endl;
+ error << "Failed to create LV2 UI" << endl;
}
if (_gui_widget) {
@@ -290,7 +291,7 @@ NodeModule::remove_port(SharedPtr<PortModel> model)
Module::remove_port(p);
p.reset();
} else {
- cerr << "WARNING: Failed to find port on module: " << model->path() << endl;
+ warn << "Failed to find port on module " << model->path() << endl;
}
}
@@ -301,7 +302,7 @@ NodeModule::popup_gui()
#ifdef HAVE_SLV2
if (_node->plugin() && _node->plugin()->type() == PluginModel::LV2) {
if (_plugin_ui) {
- cerr << "LV2 GUI already embedded, cannot pop up" << endl;
+ warn << "LV2 GUI already embedded, cannot pop up" << endl;
return false;
}
@@ -327,7 +328,7 @@ NodeModule::popup_gui()
return true;
} else {
- cerr << "No LV2 GUI" << endl;
+ warn << "No LV2 GUI for " << _node->path() << endl;
}
}
#endif
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index c83bc04c..2d389e4e 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -15,12 +15,10 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "ingen-config.h"
-#include "module/World.hpp"
-
#include <cassert>
#include <map>
#include <string>
+#include "raul/log.hpp"
#include "flowcanvas/Canvas.hpp"
#include "flowcanvas/Ellipse.hpp"
#include "interface/EngineInterface.hpp"
@@ -31,6 +29,7 @@
#include "client/PatchModel.hpp"
#include "client/NodeModel.hpp"
#include "client/ClientStore.hpp"
+#include "module/World.hpp"
#include "App.hpp"
#include "PatchCanvas.hpp"
#include "PatchWindow.hpp"
@@ -45,6 +44,9 @@
#include "GladeFactory.hpp"
#include "WindowFactory.hpp"
#include "ThreadedLoader.hpp"
+#include "ingen-config.h"
+
+#define LOG(s) s << "[PatchCanvas] "
using Ingen::Client::ClientStore;
using Ingen::Serialisation::Serialiser;
@@ -413,7 +415,7 @@ PatchCanvas::remove_port(SharedPtr<PortModel> pm)
if (i != _views.end()) {
bool ret = remove_item(i->second);
if (!ret)
- cerr << "WARNING: Failed to remove port item: " << pm->path() << endl;
+ warn << "Failed to remove port item " << pm->path() << endl;
i->second.reset();
_views.erase(i);
@@ -464,7 +466,7 @@ PatchCanvas::connection(SharedPtr<ConnectionModel> cm)
add_connection(boost::shared_ptr<GUI::Connection>(new GUI::Connection(shared_from_this(),
cm, src, dst, src->color() + 0x22222200)));
} else {
- cerr << "[PatchCanvas] ERROR: Unable to find ports to connect "
+ LOG(error) << "Unable to find ports to connect "
<< cm->src_port_path() << " -> " << cm->dst_port_path() << endl;
}
}
@@ -479,7 +481,7 @@ PatchCanvas::disconnection(SharedPtr<ConnectionModel> cm)
if (src && dst)
remove_connection(src, dst);
else
- cerr << "[PatchCanvas] ERROR: Unable to find ports to disconnect "
+ LOG(error) << "Unable to find ports to disconnect "
<< cm->src_port_path() << " -> " << cm->dst_port_path() << endl;
}
@@ -499,7 +501,7 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
// Midi binding/learn shortcut
if (src->model()->type().is_events() && dst->model()->type().is_control()) {
- cerr << "[PatchCanvas] TODO: MIDI binding shortcut" << endl;
+ LOG(error) << "TODO: MIDI binding shortcut" << endl;
} else {
App::instance().engine()->connect(src->model()->path(), dst->model()->path());
}
@@ -638,7 +640,7 @@ PatchCanvas::paste()
Glib::ustring str = Gtk::Clipboard::get()->wait_for_text();
SharedPtr<Parser> parser = App::instance().loader()->parser();
if (!parser) {
- cerr << "Unable to load parser, paste unavailable" << endl;
+ LOG(error) << "Unable to load parser, paste unavailable" << endl;
return;
}
@@ -681,10 +683,8 @@ PatchCanvas::paste()
parent, symbol);
for (Store::iterator i = clipboard.begin(); i != clipboard.end(); ++i) {
- if (_patch->path().is_root() && i->first.is_root()) {
- //cout << "Skipping root" << endl;
+ if (_patch->path().is_root() && i->first.is_root())
continue;
- }
GraphObject::Properties::iterator x = i->second->properties().find("ingenuity:canvas-x");
if (x != i->second->properties().end())
x->second = x->second.get_float() + (20.0f * _paste_count);
@@ -708,13 +708,6 @@ PatchCanvas::paste()
i != root->connections().end(); ++i) {
App::instance().engine()->connect((*i)->src_port_path(), (*i)->dst_port_path());
}
-
- // Orphan connections (just in case...)
- /*for (ClientStore::ConnectionRecords::const_iterator i = clipboard.connection_records().begin();
- i != clipboard.connection_records().end(); ++i) {
- cout << "WARNING: Orphan connection paste: " << i->first << " -> " << i->second << endl;
- App::instance().engine()->connect(i->first, i->second);
- }*/
}
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index 19a2210f..1147e4c9 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -16,7 +16,6 @@
*/
#include <cassert>
-#include <iostream>
#include <utility>
#include "PatchPortModule.hpp"
#include "interface/EngineInterface.hpp"
diff --git a/src/gui/PatchPropertiesWindow.cpp b/src/gui/PatchPropertiesWindow.cpp
index 0ece28f4..cf5a9917 100644
--- a/src/gui/PatchPropertiesWindow.cpp
+++ b/src/gui/PatchPropertiesWindow.cpp
@@ -16,7 +16,6 @@
*/
#include <string>
-#include <iostream>
#include "client/PatchModel.hpp"
#include "PatchPropertiesWindow.hpp"
#include "App.hpp"
diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp
index 262c4d60..feb0606c 100644
--- a/src/gui/PatchTreeWindow.cpp
+++ b/src/gui/PatchTreeWindow.cpp
@@ -15,6 +15,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "raul/log.hpp"
#include "raul/Path.hpp"
#include "interface/EngineInterface.hpp"
#include "client/ClientStore.hpp"
@@ -24,6 +25,8 @@
#include "SubpatchModule.hpp"
#include "WindowFactory.hpp"
+#define LOG(s) s << "[PatchTreeWindow] "
+
using namespace std;
using namespace Raul;
@@ -161,8 +164,7 @@ PatchTreeWindow::show_patch_menu(GdkEventButton* ev)
Gtk::TreeModel::Row row = *active;
SharedPtr<PatchModel> pm = row[_patch_tree_columns.patch_model_col];
if (pm)
- cerr << "FIXME: patch menu\n";
- //pm->show_menu(ev);
+ warn << "TODO: patch menu from tree window" << endl;
}
}
@@ -204,7 +206,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 {
- cerr << "[PatchTreeWindow] Unable to find patch " << patch->path() << endl;
+ LOG(error) << "Unable to find patch " << patch->path() << endl;
}
}
_enable_signal = true;
@@ -223,7 +225,7 @@ PatchTreeWindow::patch_moved(SharedPtr<PatchModel> patch)
Gtk::TreeModel::Row row = *i;
row[_patch_tree_columns.name_col] = patch->path().name();
} else {
- cerr << "[PatchTreeWindow] Unable to find patch " << patch->path() << endl;
+ LOG(error) << "Unable to find patch " << patch->path() << endl;
}
_enable_signal = true;
diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp
index c59f787c..6e3282bc 100644
--- a/src/gui/PatchView.cpp
+++ b/src/gui/PatchView.cpp
@@ -15,9 +15,9 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <iostream>
#include <cassert>
#include <fstream>
+#include "raul/log.hpp"
#include "interface/EngineInterface.hpp"
#include "client/PatchModel.hpp"
#include "App.hpp"
@@ -68,8 +68,6 @@ PatchView::set_patch(SharedPtr<PatchModel> patch)
{
assert(!_canvas); // FIXME: remove
- //cerr << "Creating view for " << patch->path() << endl;
-
assert(_breadcrumb_container); // ensure created
_patch = patch;
@@ -120,18 +118,10 @@ PatchView::set_patch(SharedPtr<PatchModel> patch)
}
-PatchView::~PatchView()
-{
- //cerr << "Destroying view for " << _patch->path() << endl;
-}
-
-
SharedPtr<PatchView>
PatchView::create(SharedPtr<PatchModel> patch)
-
{
-
-const Glib::RefPtr<Gnome::Glade::Xml>& xml = GladeFactory::new_glade_reference("patch_view_box");
+ const Glib::RefPtr<Gnome::Glade::Xml>& xml = GladeFactory::new_glade_reference("patch_view_box");
PatchView* result = NULL;
xml->get_widget_derived("patch_view_box", result);
assert(result);
@@ -226,7 +216,7 @@ PatchView::property_changed(const Raul::URI& predicate, const Raul::Atom& value)
if (value.type() == Atom::BOOL)
_process_but->set_active(value.get_bool());
else
- cerr << "WARNING: Bad type for ingen:enabled variable: " << value.type() << endl;
+ warn << "Bad type for ingen:enabled variable: " << value.type() << endl;
}
_enable_signal = true;
}
diff --git a/src/gui/PatchView.hpp b/src/gui/PatchView.hpp
index 82a2a1b0..ed713803 100644
--- a/src/gui/PatchView.hpp
+++ b/src/gui/PatchView.hpp
@@ -58,7 +58,6 @@ class PatchView : public Gtk::Box
{
public:
PatchView(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
- ~PatchView();
SharedPtr<PatchCanvas> canvas() const { return _canvas; }
SharedPtr<PatchModel> patch() const { return _patch; }
diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp
index 8c9d8c42..c9ca705a 100644
--- a/src/gui/PatchWindow.cpp
+++ b/src/gui/PatchWindow.cpp
@@ -16,7 +16,6 @@
*/
#include "PatchWindow.hpp"
-#include <iostream>
#include <cassert>
#include <sstream>
#include <fstream>
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index 91e64f3a..5e1050f8 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -16,7 +16,7 @@
*/
#include <cassert>
-#include <iostream>
+#include "raul/log.hpp"
#include "interface/EngineInterface.hpp"
#include "flowcanvas/Module.hpp"
#include "client/PatchModel.hpp"
@@ -131,7 +131,7 @@ Port::value_changed(const Atom& value)
else if (value.type() == Atom::FLOAT)
FlowCanvas::Port::set_control(value.get_float());
else
- cerr << "WARNING: Unknown port value type " << (unsigned)value.type() << endl;
+ warn << "Unknown port value type " << (unsigned)value.type() << endl;
}
diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp
index 48a0e2c3..a32eb662 100644
--- a/src/gui/PortMenu.cpp
+++ b/src/gui/PortMenu.cpp
@@ -15,7 +15,6 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <iostream>
#include <gtkmm.h>
#include "raul/SharedPtr.hpp"
#include "interface/EngineInterface.hpp"
diff --git a/src/gui/SubpatchModule.cpp b/src/gui/SubpatchModule.cpp
index e25e7068..63377e5c 100644
--- a/src/gui/SubpatchModule.cpp
+++ b/src/gui/SubpatchModule.cpp
@@ -17,7 +17,6 @@
#include "SubpatchModule.hpp"
#include <cassert>
-#include <iostream>
#include "interface/EngineInterface.hpp"
#include "client/PatchModel.hpp"
#include "App.hpp"
@@ -56,7 +55,6 @@ SubpatchModule::on_double_click(GdkEventButton* event)
}
-
/** Browse to this patch in current (parent's) window
* (unless an existing window is displaying it)
*/
@@ -75,15 +73,6 @@ SubpatchModule::browse_to_patch()
}
-
-void
-SubpatchModule::show_dialog()
-{
- std::cerr << "FIXME: dialog" << std::endl;
- //m_patch->show_control_window();
-}
-
-
void
SubpatchModule::menu_remove()
{
diff --git a/src/gui/SubpatchModule.hpp b/src/gui/SubpatchModule.hpp
index 7d41f95f..cef2dfb6 100644
--- a/src/gui/SubpatchModule.hpp
+++ b/src/gui/SubpatchModule.hpp
@@ -53,7 +53,6 @@ public:
void on_double_click(GdkEventButton* ev);
- void show_dialog();
void browse_to_patch();
void menu_remove();
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index ae5c995f..007bb816 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -15,8 +15,8 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <iostream>
#include <string>
+#include "raul/log.hpp"
#include "module/World.hpp"
#include "module/Module.hpp"
#include "module/ingen_module.hpp"
@@ -40,7 +40,7 @@ ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine)
if (parser())
start();
else
- cerr << "WARNING: Failed to load ingen_serialisation module, load disabled." << endl;
+ warn << "Failed to load ingen_serialisation module, load disabled." << endl;
}