diff --git a/core/core.py b/core/core.py index 634c8996f..4a9c02568 100644 --- a/core/core.py +++ b/core/core.py @@ -101,6 +101,7 @@ class GajimCore: # END disconenctedCB def connect(self, account): + self.cfgParser.parseCfgFile() hostname = self.cfgParser.__getattr__("%s" % account+"_hostname") name = self.cfgParser.__getattr__("%s" % account+"_name") password = self.cfgParser.__getattr__("%s" % account+"_password") diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 81c43070f..3b6a24d38 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -425,10 +425,9 @@ class message: return 0 def __init__(self, user, roster): - self.cfgParser = common.optparser.OptionsParser(CONFPATH) - self.cfgParser.parseCfgFile() self.user = user self.r = roster + self.cfgParser = self.r.cfgParser self.xml = gtk.glade.XML('plugins/gtkgui/gtkgui.glade', 'Chat') self.window = self.xml.get_widget('Chat') self.window.set_title('Chat with ' + user.name) @@ -625,8 +624,11 @@ class roster: accountsStr = self.cfgParser.Profile_accounts accounts = string.split(accountsStr, ' ') self.queueOUT.put(('STATUS',(widget.name, accounts[0]))) - if (not self.showOffline) and widget.name == 'offline': - self.treestore.clear() +# if (not self.showOffline) and widget.name == 'offline': +# self.treestore.clear() + if widget.name == 'offline': + for j in self.l_contact.keys(): + self.chg_status(j, 'offline', 'Disconnected') def on_add(self, widget): window_add = add(self)