stick to using self.account and do not mix self.account with self._account usage
This commit is contained in:
parent
923e65db30
commit
5e8ebac923
1 changed files with 11 additions and 20 deletions
31
src/disco.py
31
src/disco.py
|
@ -1,19 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
## config.py
|
## config.py
|
||||||
##
|
##
|
||||||
## Contributors for this file:
|
## Copyright (C) 2005-2006 Yann Le Boulanger <asterix@lagaule.org>
|
||||||
## - Yann Le Boulanger <asterix@lagaule.org>
|
## Copyright (C) 2005-2006 Nikos Kouremenos <kourem@gmail.com>
|
||||||
## - Nikos Kouremenos <kourem@gmail.com>
|
## Copyright (C) 2005-2006 Stéphan Kochen <stephan@kochen.nl>
|
||||||
## - 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>
|
|
||||||
##
|
##
|
||||||
## This program is free software; you can redistribute it and/or modify
|
## This program is free software; you can redistribute it and/or modify
|
||||||
## it under the terms of the GNU General Public License as published
|
## 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.'''
|
'''Class that represents the Services Discovery window.'''
|
||||||
def __init__(self, account, jid = '', node = '',
|
def __init__(self, account, jid = '', node = '',
|
||||||
address_entry = False, parent = None):
|
address_entry = False, parent = None):
|
||||||
self._account = account
|
self.account = account
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
if not jid:
|
if not jid:
|
||||||
jid = gajim.config.get_per('accounts', account, 'hostname')
|
jid = gajim.config.get_per('accounts', account, 'hostname')
|
||||||
|
@ -475,11 +465,11 @@ _('Without a connection, you can not browse available services'))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _get_account(self):
|
def _get_account(self):
|
||||||
return self._account
|
return self.account
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _set_account(self, value):
|
def _set_account(self, value):
|
||||||
self._account = value
|
self.account = value
|
||||||
self.cache.account = value
|
self.cache.account = value
|
||||||
if self.browser:
|
if self.browser:
|
||||||
self.browser.account = value
|
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
|
'''Set some initial state on the window. Separated in a method because
|
||||||
it's handy to use within browser's cleanup method.'''
|
it's handy to use within browser's cleanup method.'''
|
||||||
self.progressbar.hide()
|
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.window.set_title(title_text)
|
||||||
self._set_window_banner_text(_('Service Discovery'))
|
self._set_window_banner_text(_('Service Discovery'))
|
||||||
if gtk.gtk_version >= (2, 8, 0) and gtk.pygtk_version >= (2, 8, 0):
|
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
|
# We can register this agent
|
||||||
registered_transports = []
|
registered_transports = []
|
||||||
jid_list = gajim.contacts.get_jid_list(self.account)
|
jid_list = gajim.contacts.get_jid_list(self.account)
|
||||||
for j in jid_list:
|
for jid in jid_list:
|
||||||
contact = gajim.contacts.get_first_contact_from_jid(self.account, j)
|
contact = gajim.contacts.get_first_contact_from_jid(
|
||||||
|
self.account, jid)
|
||||||
if _('Transports') in contact.groups:
|
if _('Transports') in contact.groups:
|
||||||
registered_transports.append(j)
|
registered_transports.append(j)
|
||||||
if jid in registered_transports:
|
if jid in registered_transports:
|
||||||
|
@ -1533,7 +1524,7 @@ class MucBrowser(AgentBrowser):
|
||||||
service = services[1]
|
service = services[1]
|
||||||
else:
|
else:
|
||||||
room = model[iter][1].decode('utf-8')
|
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:
|
try:
|
||||||
dialogs.JoinGroupchatWindow(self.account, service, room)
|
dialogs.JoinGroupchatWindow(self.account, service, room)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
|
|
Loading…
Add table
Reference in a new issue