if we are not connected, do not show the browse agent window
This commit is contained in:
parent
d6fb096e2e
commit
5b7d93769d
|
@ -1221,6 +1221,9 @@ class browseAgent_Window:
|
||||||
self.join_button.set_sensitive(True)
|
self.join_button.set_sensitive(True)
|
||||||
|
|
||||||
def __init__(self, plugin, account):
|
def __init__(self, plugin, account):
|
||||||
|
if self.plugin.connected[account]:
|
||||||
|
warning_Window(_("You must be connected to view Agents"))
|
||||||
|
return
|
||||||
xml = gtk.glade.XML(GTKGUI_GLADE, 'browser', APP)
|
xml = gtk.glade.XML(GTKGUI_GLADE, 'browser', APP)
|
||||||
self.window = xml.get_widget('browser')
|
self.window = xml.get_widget('browser')
|
||||||
self.treeview = xml.get_widget('treeview')
|
self.treeview = xml.get_widget('treeview')
|
||||||
|
@ -1250,10 +1253,7 @@ class browseAgent_Window:
|
||||||
xml.signal_connect('on_register_button_clicked', self.on_register_button_clicked)
|
xml.signal_connect('on_register_button_clicked', self.on_register_button_clicked)
|
||||||
xml.signal_connect('on_cursor_changed', self.on_cursor_changed)
|
xml.signal_connect('on_cursor_changed', self.on_cursor_changed)
|
||||||
xml.signal_connect('on_close_clicked', self.on_close)
|
xml.signal_connect('on_close_clicked', self.on_close)
|
||||||
if self.plugin.connected[account]:
|
self.browse()
|
||||||
self.browse()
|
|
||||||
else:
|
|
||||||
warning_Window(_("You must be connected to view Agents"))
|
|
||||||
|
|
||||||
class join_gc:
|
class join_gc:
|
||||||
def delete_event(self, widget):
|
def delete_event(self, widget):
|
||||||
|
|
Loading…
Reference in New Issue