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.
parent f2060f5e
...@@ -106,6 +106,8 @@ class DFeetApp: ...@@ -106,6 +106,8 @@ class DFeetApp:
def close_tab_cb(self, button, child): def close_tab_cb(self, button, child):
n = self.notebook.page_num(child) n = self.notebook.page_num(child)
if child.get_bus_watch().get_bus_name() not in [u'Session Bus', u'System Bus']:
self.notebook.remove_page(n) self.notebook.remove_page(n)
def select_or_add_bus(self, address): def select_or_add_bus(self, address):
...@@ -120,7 +120,10 @@ class BusNameInfoBox(gtk.VBox): ...@@ -120,7 +120,10 @@ class BusNameInfoBox(gtk.VBox):
def set_busname(self, busname): def set_busname(self, busname):
if self.busname: if self.busname:
self.busname.disconnect(self.busname._introspect_changed_signal_id) try:
self.busname = busname self.busname = busname
self.introspect_tree_view.set_model(busname.common_data._introspection_data) self.introspect_tree_view.set_model(busname.common_data._introspection_data)
...@@ -265,6 +265,9 @@ class BusWatch(gtk.GenericTreeModel): ...@@ -265,6 +265,9 @@ class BusWatch(gtk.GenericTreeModel):
else: else:
return self.address return self.address
def close_bus(self):
def get_completion_model(self): def get_completion_model(self):
return self.completion_model() 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