diff --git a/src/common/connection.py b/src/common/connection.py index 2254be8da..0cbb05e50 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -453,7 +453,6 @@ class connection: if self.connected > 1: self.connected = 0 self.connection.disconnect('Disconnected') - self.dispatch('QUIT', ()) return def ask_roster(self): diff --git a/src/common/optparser.py b/src/common/optparser.py index 89cae3e2c..ff7b56fe4 100644 --- a/src/common/optparser.py +++ b/src/common/optparser.py @@ -127,6 +127,9 @@ class OptionsParser: for key in self.tab[account]: gajim.config.set_per('accounts', account, key, \ self.tab[account][key]) + if gajim.config.get_per('accounts', account, 'savepass'): + gajim.connections[account].password = gajim.config.get_per( \ + 'accounts', account, 'password') def __getattr__(self, attr): if attr.startswith('__') and attr in self.__dict__.keys(): diff --git a/src/dialogs.py b/src/dialogs.py index db0486ae7..8997b654b 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -388,11 +388,8 @@ class Change_status_message_dialog: self.message_buffer = message_textview.get_buffer() self.message_buffer.set_text(gajim.config.get('last_msg')) self.values = {'':''} - i = 0 - while gajim.config.exist('msg%s_name' % i): - self.values[gajim.config.get('msg%s_name' % i)] = \ - gajim.config.get('msg%s' % i) - i += 1 + for msg in gajim.config.get_per('statusmsg'): + self.values[msg] = gajim.config.get_per('statusmsg', msg, 'message') liststore = gtk.ListStore(str, str) message_comboboxentry = self.xml.get_widget('message_comboboxentry') message_comboboxentry.set_model(liststore) diff --git a/src/gtkgui.py b/src/gtkgui.py index 205199359..45503bcb6 100644 --- a/src/gtkgui.py +++ b/src/gtkgui.py @@ -206,7 +206,7 @@ class interface: def play_sound(self, event): if not gajim.config.get('sounds_on'): return - path_to_soundfile = gajim.config.get(event + '_file') + path_to_soundfile = gajim.config.get_per('soundevents', event, 'path') if not os.path.exists(path_to_soundfile): return if os.name == 'nt': @@ -455,7 +455,7 @@ class interface: self.roster.draw_roster() def handle_event_quit(self, p1, p2): - self.roster.on_quit() # SUCH FUNCTION DOES NOT EXIST!! + self.roster.quit_gtkgui_plugin() def handle_event_myvcard(self, account, array): nick = '' diff --git a/src/roster_window.py b/src/roster_window.py index 790fcec86..7f6ecbde5 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -968,14 +968,13 @@ class Roster_window: def quit_gtkgui_plugin(self): """When we quit the gtk plugin : tell that to the core and exit gtk""" - if gajim.config.exist('saveposition'): - if gajim.config.get('saveposition'): - x, y = self.window.get_position() - gajim.config.set('x-position', x) - gajim.config.set('y-position', y) - width, height = self.window.get_size() - gajim.config.set('width', width) - gajim.config.set('height', height) + if gajim.config.get('saveposition'): + x, y = self.window.get_position() + gajim.config.set('x-position', x) + gajim.config.set('y-position', y) + width, height = self.window.get_size() + gajim.config.set('width', width) + gajim.config.set('height', height) self.plugin.save_config() for account in gajim.connections: