diff --git a/src/disco.py b/src/disco.py index dd6961c20..79593713a 100644 --- a/src/disco.py +++ b/src/disco.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- ## config.py ## -## Contributors for this file: -## - Yann Le Boulanger -## - Nikos Kouremenos -## - Stéphan Kochen -## -## Copyright (C) 2003-2004 Yann Le Boulanger -## Vincent Hanquez -## Copyright (C) 2005 Yann Le Boulanger -## Vincent Hanquez -## Nikos Kouremenos -## Dimitur Kirov -## Travis Shirk -## Norman Rasmussen +## Copyright (C) 2005-2006 Yann Le Boulanger +## Copyright (C) 2005-2006 Nikos Kouremenos +## Copyright (C) 2005-2006 Stéphan Kochen ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published @@ -395,7 +385,7 @@ class ServiceDiscoveryWindow(object): '''Class that represents the Services Discovery window.''' def __init__(self, account, jid = '', node = '', address_entry = False, parent = None): - self._account = account + self.account = account self.parent = parent if not jid: jid = gajim.config.get_per('accounts', account, 'hostname') @@ -475,11 +465,11 @@ _('Without a connection, you can not browse available services')) @property def _get_account(self): - return self._account + return self.account @property def _set_account(self, value): - self._account = value + self.account = value self.cache.account = value if self.browser: self.browser.account = value @@ -488,7 +478,7 @@ _('Without a connection, you can not browse available services')) '''Set some initial state on the window. Separated in a method because it's handy to use within browser's cleanup method.''' self.progressbar.hide() - title_text = _('Service Discovery using account %s') % self._account + title_text = _('Service Discovery using account %s') % self.account self.window.set_title(title_text) self._set_window_banner_text(_('Service Discovery')) if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0): @@ -1244,8 +1234,9 @@ class ToplevelAgentBrowser(AgentBrowser): # We can register this agent registered_transports = [] jid_list = gajim.contacts.get_jid_list(self.account) - for j in jid_list: - contact = gajim.contacts.get_first_contact_from_jid(self.account, j) + for jid in jid_list: + contact = gajim.contacts.get_first_contact_from_jid( + self.account, jid) if _('Transports') in contact.groups: registered_transports.append(j) if jid in registered_transports: @@ -1533,7 +1524,7 @@ class MucBrowser(AgentBrowser): service = services[1] else: room = model[iter][1].decode('utf-8') - if not gajim.interface.instances[self.account].has_key('join_gc'): + if 'join_gc' not in gajim.interface.instances[self.account]: try: dialogs.JoinGroupchatWindow(self.account, service, room) except RuntimeError: