remove port_sources management from MidiControlUI

This was necessary due to a bug/design issue between Glibmm and Glib (see https://bugzilla.gnome.org/show_bug.cgi?id=561885)
but the problem needs to be managed by the *creator* of the IOSource and that has now moved inside CrossThreadChannel.
This commit is contained in:
Paul Davis 2014-11-24 19:29:10 +02:00
parent 07d3af8d88
commit 5b108f6f7d
2 changed files with 0 additions and 17 deletions

View file

@ -59,8 +59,6 @@ class LIBARDOUR_API MidiControlUI : public AbstractUI<MidiUIRequest>
void do_request (MidiUIRequest*);
private:
typedef std::list<GSource*> PortSources;
PortSources port_sources;
ARDOUR::Session& _session;
bool midi_input_handler (Glib::IOCondition, AsyncMIDIPort*);

View file

@ -97,21 +97,11 @@ MidiControlUI::midi_input_handler (IOCondition ioc, AsyncMIDIPort* port)
void
MidiControlUI::clear_ports ()
{
for (PortSources::iterator i = port_sources.begin(); i != port_sources.end(); ++i) {
g_source_destroy (*i);
g_source_unref (*i);
}
port_sources.clear ();
}
void
MidiControlUI::reset_ports ()
{
if (!port_sources.empty()) {
return;
}
vector<AsyncMIDIPort*> ports;
AsyncMIDIPort* p;
@ -139,11 +129,6 @@ MidiControlUI::reset_ports ()
if (psrc) {
psrc->connect (sigc::bind (sigc::mem_fun (this, &MidiControlUI::midi_input_handler), *pi));
psrc->attach (_main_loop->get_context());
// glibmm hack: for now, store only the GSource*
port_sources.push_back (psrc->gobj());
g_source_ref (psrc->gobj());
}
}
}