diff options
author | David Robillard <d@drobilla.net> | 2006-09-10 03:42:59 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-10 03:42:59 +0000 |
commit | ee376a70121cda807de0ab1c4124996700a1f513 (patch) | |
tree | 81154b1d7539932414eab91bb85084699dda76b8 | |
parent | f514f3a017029bcc68fab25c8b84be4e6122709d (diff) | |
download | patchage-ee376a70121cda807de0ab1c4124996700a1f513.tar.gz patchage-ee376a70121cda807de0ab1c4124996700a1f513.tar.bz2 patchage-ee376a70121cda807de0ab1c4124996700a1f513.zip |
GUI redesigning.
git-svn-id: http://svn.drobilla.net/lad/patchage@125 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/AlsaDriver.cpp | 6 | ||||
-rw-r--r-- | src/JackDriver.cpp | 8 | ||||
-rw-r--r-- | src/PatchageModule.h | 7 |
3 files changed, 11 insertions, 10 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp index 2f4d52e..909a710 100644 --- a/src/AlsaDriver.cpp +++ b/src/AlsaDriver.cpp @@ -173,7 +173,7 @@ AlsaDriver::refresh_ports() m = new PatchageModule(m_app, client_name, InputOutput); m->load_location(); m->store_location(); - m_canvas->add_module(m); + m->show(); } if (!is_duplex) { @@ -202,7 +202,6 @@ AlsaDriver::refresh_ports() m = new PatchageModule(m_app, client_name, type); m->load_location(); m->store_location(); - m_canvas->add_module(m); } m->add_patchage_port(port_name, is_input, ALSA_MIDI, addr); } else { // two ports to add @@ -217,7 +216,6 @@ AlsaDriver::refresh_ports() m = new PatchageModule(m_app, client_name, type); m->load_location(); m->store_location(); - m_canvas->add_module(m); } m->add_patchage_port(port_name, true, ALSA_MIDI, addr); @@ -232,10 +230,10 @@ AlsaDriver::refresh_ports() m = new PatchageModule(m_app, client_name, type); m->load_location(); m->store_location(); - m_canvas->add_module(m); } m->add_patchage_port(port_name, false, ALSA_MIDI, addr); } + m->show(); } } } diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index bbbd8fb..c40e589 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -134,7 +134,7 @@ JackDriver::refresh() m = new PatchageModule(m_app, client1_name, type); m->load_location(); m->store_location(); - m_canvas->add_module(m); + m->show(); } // FIXME: leak? jack docs don't say @@ -166,7 +166,11 @@ JackDriver::refresh() port2_name = client2_name.substr(client2_name.find(':')+1); client2_name = client2_name.substr(0, client2_name.find(':')); - m_canvas->add_connection(client1_name, port1_name, client2_name, port2_name); + Port* const port1 = m_canvas->get_port(client1_name, port1_name); + Port* const port2 = m_canvas->get_port(client2_name, port2_name); + + if (port1 && port2) + m_canvas->add_connection(port1, port2); } free(connected_ports); } diff --git a/src/PatchageModule.h b/src/PatchageModule.h index b511eec..4400a68 100644 --- a/src/PatchageModule.h +++ b/src/PatchageModule.h @@ -55,10 +55,9 @@ public: virtual void add_patchage_port(const string& port_name, bool is_input, PortType type) { - PatchagePort* port = new PatchagePort(this, type, port_name, is_input, - m_app->state_manager()->get_port_color(type)); + new PatchagePort(this, type, port_name, is_input, m_app->state_manager()->get_port_color(type)); - Module::add_port(port, true); + resize(); } virtual void add_patchage_port(const string& port_name, bool is_input, PortType type, const snd_seq_addr_t addr) @@ -68,7 +67,7 @@ public: port->alsa_addr(addr); - Module::add_port(port, true); + resize(); } |