diff options
author | David Robillard <d@drobilla.net> | 2011-11-25 06:12:28 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-11-25 06:12:28 +0000 |
commit | a0d6e0d2ff7abdcfcd78d4002f2dc42f4cde82ed (patch) | |
tree | 0c581c8ed03ca280e03b6ec2827ff41fb6c617b8 /src/PatchageEvent.cpp | |
parent | 572adb6873294bf2f26062cf297660aa449eb675 (diff) | |
download | patchage-a0d6e0d2ff7abdcfcd78d4002f2dc42f4cde82ed.tar.gz patchage-a0d6e0d2ff7abdcfcd78d4002f2dc42f4cde82ed.tar.bz2 patchage-a0d6e0d2ff7abdcfcd78d4002f2dc42f4cde82ed.zip |
Log (almost) everything to the messages window instead of the console.
Remove latency and load stuff in favour of plain old messages.
Remove status bar.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3627 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageEvent.cpp')
-rw-r--r-- | src/PatchageEvent.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/PatchageEvent.cpp b/src/PatchageEvent.cpp index 65cef28..818859c 100644 --- a/src/PatchageEvent.cpp +++ b/src/PatchageEvent.cpp @@ -14,7 +14,8 @@ * along with Patchage. If not, see <http://www.gnu.org/licenses/>. */ -#include "raul/log.hpp" +#include <boost/format.hpp> + #include "raul/SharedPtr.hpp" #include "patchage-config.h" @@ -33,6 +34,7 @@ #endif using std::endl; +using boost::format; void PatchageEvent::execute(Patchage* patchage) @@ -65,10 +67,14 @@ PatchageEvent::execute(Patchage* patchage) if (driver) { PatchagePort* port = driver->create_port_view(patchage, _port_1); - if (!port) - Raul::error << "Unable to create port view: " << _port_1 << endl; + if (!port) { + patchage->error_msg( + (format("Unable to create view for port `%1%'") + % _port_1).str()); + } } else { - Raul::error << "Attempt to create port with unknown type: " << _port_1 << endl; + patchage->error_msg( + (format("Unknown type for port `%1%'") % _port_1).str()); } } else if (_type == PORT_DESTRUCTION) { @@ -81,11 +87,14 @@ PatchageEvent::execute(Patchage* patchage) PatchagePort* port_2 = patchage->canvas()->find_port(_port_2); if (!port_1) - Raul::error << "Unable to find port `" << _port_1 << "' to connect" << endl; + patchage->error_msg((format("Unable to find port `%1%' to connect") + % _port_1).str()); else if (!port_2) - Raul::error << "Unable to find port `" << _port_2 << "' to connect" << endl; + patchage->error_msg((format("Unable to find port `%1' to connect") + % _port_2).str()); else - patchage->canvas()->add_connection(port_1, port_2, port_1->color() + 0x22222200); + patchage->canvas()->add_connection( + port_1, port_2, port_1->color() + 0x22222200); } else if (_type == DISCONNECTION) { @@ -93,9 +102,11 @@ PatchageEvent::execute(Patchage* patchage) PatchagePort* port_2 = patchage->canvas()->find_port(_port_2); if (!port_1) - Raul::error << "Unable to find port `" << _port_1 << "' to disconnect" << endl; + patchage->error_msg((format("Unable to find port `%1' to disconnect") + % _port_1).str()); else if (!port_2) - Raul::error << "Unable to find port `" << _port_2 << "' to disconnect" << endl; + patchage->error_msg((format("Unable to find port `%1' to disconnect") + % _port_2).str()); else patchage->canvas()->remove_connection(port_1, port_2); } |