GUI redesigning.

git-svn-id: http://svn.drobilla.net/lad/patchage@125 a436a847-0d15-0410-975c-d299462d15a1
This commit is contained in:
dave 2006-09-10 03:42:59 +00:00
parent a99e3f04fb
commit d62f32fe26
3 changed files with 11 additions and 10 deletions

View File

@ -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();
}
}
}

View File

@ -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);
}

View File

@ -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();
}