From 068d75dbc1b025513748071a9698a9cf7a95d478 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 21 Mar 2005 22:41:30 +0000 Subject: [PATCH] upgrade the systray variable when we change an account name --- plugins/gtkgui/config.py | 11 +++++++++-- plugins/gtkgui/systray.py | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 2448688ae..b0df90827 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -1119,9 +1119,16 @@ class Account_modification_window: self.plugin.roster.contacts[self.account] self.plugin.sleeper_state[name] = \ self.plugin.sleeper_state[self.account] + #upgrade account variable in opened windows for kind in ['infos', 'chats', 'gc']: - for jid in self.plugin.windows[name][kind]: - self.plugin.windows[name][kind][jid].account = name + for j in self.plugin.windows[name][kind]: + self.plugin.windows[name][kind][j].account = name + #upgrade account in systray + print self.plugin.systray.jids + for list in self.plugin.systray.jids: + if list[0] == self.account: + list[0] = name + print self.plugin.systray.jids del self.plugin.windows[self.account] del self.plugin.queues[self.account] del self.plugin.connected[self.account] diff --git a/plugins/gtkgui/systray.py b/plugins/gtkgui/systray.py index 553de4e30..fef86c99f 100644 --- a/plugins/gtkgui/systray.py +++ b/plugins/gtkgui/systray.py @@ -45,6 +45,7 @@ class systrayDummy: pass def __init__(self): self.t = gtk.Button() + self.jids = [] class systray: """Class for icon in the systray"""