stick to using self.account and do not mix self.account with self._account usage
This commit is contained in:
parent
923e65db30
commit
5e8ebac923
31
src/disco.py
31
src/disco.py
|
@ -1,19 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
## config.py
|
||||
##
|
||||
## Contributors for this file:
|
||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
||||
## - Nikos Kouremenos <kourem@gmail.com>
|
||||
## - Stéphan Kochen <stephan@kochen.nl>
|
||||
##
|
||||
## Copyright (C) 2003-2004 Yann Le Boulanger <asterix@lagaule.org>
|
||||
## Vincent Hanquez <tab@snarc.org>
|
||||
## Copyright (C) 2005 Yann Le Boulanger <asterix@lagaule.org>
|
||||
## Vincent Hanquez <tab@snarc.org>
|
||||
## Nikos Kouremenos <kourem@gmail.com>
|
||||
## Dimitur Kirov <dkirov@gmail.com>
|
||||
## Travis Shirk <travis@pobox.com>
|
||||
## Norman Rasmussen <norman@rasmussen.co.za>
|
||||
## Copyright (C) 2005-2006 Yann Le Boulanger <asterix@lagaule.org>
|
||||
## Copyright (C) 2005-2006 Nikos Kouremenos <kourem@gmail.com>
|
||||
## Copyright (C) 2005-2006 Stéphan Kochen <stephan@kochen.nl>
|
||||
##
|
||||
## 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:
|
||||
|
|
Loading…
Reference in New Issue