This commit is contained in:
Nikos Kouremenos 2005-04-21 21:06:33 +00:00
parent dc4221660b
commit d5261a69d6
2 changed files with 4 additions and 6 deletions

View File

@ -1623,7 +1623,6 @@ class Service_discovery_window:
self.agent_infos = {} self.agent_infos = {}
if gajim.connections[account].connected < 2: if gajim.connections[account].connected < 2:
dialogs.Error_dialog(_('You must be connected to browse services')) dialogs.Error_dialog(_('You must be connected to browse services'))
del self.plugin.windows[self.account]['disco']
return return
xml = gtk.glade.XML(GTKGUI_GLADE, 'service_discovery_window', APP) xml = gtk.glade.XML(GTKGUI_GLADE, 'service_discovery_window', APP)
self.window = xml.get_widget('service_discovery_window') self.window = xml.get_widget('service_discovery_window')
@ -1838,10 +1837,11 @@ class Service_discovery_window:
return return
service = model.get_value(iter, 1) service = model.get_value(iter, 1)
infos = gajim.connections[self.account].ask_register_agent_info(service) infos = gajim.connections[self.account].ask_register_agent_info(service)
if not infos.has_key('instructions'): if infos.has_key('instructions'):
dialogs.Error_dialog(_('error contacting %s') % service)
else:
Service_registration_window(service, infos, self.plugin, self.account) Service_registration_window(service, infos, self.plugin, self.account)
else:
dialogs.Error_dialog(_('error contacting %s') % service)
self.window.destroy() self.window.destroy()
def on_services_treeview_cursor_changed(self, widget): def on_services_treeview_cursor_changed(self, widget):

View File

@ -462,8 +462,6 @@ class Join_groupchat_window:
self.account = account self.account = account
if gajim.connections[account].connected < 2: if gajim.connections[account].connected < 2:
Error_dialog(_('You must be connected to join a groupchat')) Error_dialog(_('You must be connected to join a groupchat'))
# remove us from open windows
del self.plugin.windows[self.account]['join_gc']
return return
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'join_groupchat_window', APP) self.xml = gtk.glade.XML(GTKGUI_GLADE, 'join_groupchat_window', APP)
self.window = self.xml.get_widget('join_groupchat_window') self.window = self.xml.get_widget('join_groupchat_window')