Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2005-04-17 19:23:52 +0400
committerYann Leboulanger <asterix@lagaule.org>2005-04-17 19:23:52 +0400
commita722dd4ce45d779f6e7c346b7f87bd4a7f8559a0 (patch)
tree279b80a799de9abd4aeb16ab3b47936bf54f6ede
parentf2edb6d584e8a18445821e7e4cb2fe4861e23c3b (diff)
update systray.py for the new plugin system
-rw-r--r--src/systray.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/systray.py b/src/systray.py
index f3a412a61..18bc25ed2 100644
--- a/src/systray.py
+++ b/src/systray.py
@@ -51,7 +51,7 @@ class Systray:
#we look for the number of unread messages
#in roster
nb = self.plugin.roster.nb_unread
- for acct in self.plugin.accounts:
+ for acct in gajim.connections:
#in chat / groupchat windows
for kind in ['chats', 'gc']:
for jid in self.plugin.windows[acct][kind]:
@@ -71,7 +71,7 @@ class Systray:
#we look for the number of unread messages
#in roster
nb = self.plugin.roster.nb_unread
- for acct in self.plugin.accounts:
+ for acct in gajim.connections:
#in chat / groupchat windows
for kind in ['chats', 'gc']:
for jid in self.plugin.windows[acct][kind]:
@@ -109,23 +109,23 @@ class Systray:
new_message_menuitem = self.xml.get_widget('new_message_menuitem')
#menu.append(new_message_menuitem)
- if len(self.plugin.accounts.keys()) > 0:
+ if len(gajim.connections.keys()) > 0:
chat_with_menuitem.set_sensitive(True)
new_message_menuitem.set_sensitive(True)
else:
chat_with_menuitem.set_sensitive(False)
new_message_menuitem.set_sensitive(False)
- if len(self.plugin.accounts.keys()) >= 2: # 2 or more accounts? make submenus
+ if len(gajim.connections.keys()) >= 2: # 2 or more accounts? make submenus
account_menu_for_chat_with = gtk.Menu()
chat_with_menuitem.set_submenu(account_menu_for_chat_with)
account_menu_for_new_message = gtk.Menu()
new_message_menuitem.set_submenu(account_menu_for_new_message)
- for account in self.plugin.accounts.keys():
- our_jid = self.plugin.accounts[account]['name'] + '@' +\
- self.plugin.accounts[account]['hostname']
+ for account in gajim.connections:
+ our_jid = gajim.config.get_per('accounts', account, 'name') + '@' +\
+ gajim.config.get_per('accounts', account, 'hostname')
#for chat_with
item = gtk.MenuItem(_('as ') + our_jid)
account_menu_for_chat_with.append(item)
@@ -137,10 +137,10 @@ class Systray:
self.on_new_message_menuitem_activate, account)
account_menu_for_new_message.append(item)
- elif len(self.plugin.accounts.keys()) == 1: # one account
+ elif len(gajim.connections) == 1: # one account
#one account, no need to show 'as jid
#for chat_with
- account = self.plugin.accounts.keys()[0]
+ account = gajim.connections.keys()[0]
group_menu = self.make_groups_submenus_for_chat_with(account)
chat_with_menuitem.set_submenu(group_menu)