Commit 81cff9ce authored by Florent Viard's avatar Florent Viard Committed by John (J5) Palmieri

Close the bus connection when we close a connection tab for the buses...

Close the bus connection when we close a connection tab for the buses different than Session Bus and System Bus. + Fix a potentiel bug.

https://bugzilla.gnome.org/show_bug.cgi?id=631010
parent f2060f5e
......@@ -106,6 +106,8 @@ class DFeetApp:
def close_tab_cb(self, button, child):
n = self.notebook.page_num(child)
if child.get_bus_watch().get_bus_name() not in [u'Session Bus', u'System Bus']:
child.get_bus_watch().close_bus()
self.notebook.remove_page(n)
def select_or_add_bus(self, address):
......
......@@ -120,7 +120,10 @@ class BusNameInfoBox(gtk.VBox):
def set_busname(self, busname):
if self.busname:
self.busname.disconnect(self.busname._introspect_changed_signal_id)
try:
self.busname.disconnect(self.busname._introspect_changed_signal_id)
except:
pass
self.busname = busname
self.introspect_tree_view.set_model(busname.common_data._introspection_data)
......
......@@ -265,6 +265,9 @@ class BusWatch(gtk.GenericTreeModel):
else:
return self.address
def close_bus(self):
self.bus.close()
def get_completion_model(self):
return self.completion_model()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment