diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 487449a76..5c40244af 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -1037,9 +1037,9 @@ class accountpreferences_window: self.init_account(infos) self.xml.get_widget('new_account_checkbutton').set_sensitive(False) -class accounts_window: +class configure_accounts_window: """Class for accounts window : lists of accounts""" - def on_accounts_window_destroy(self, widget): + def on_configure_accounts_window_destroy(self, widget): """close window""" del self.plugin.windows['accounts'] @@ -1063,8 +1063,8 @@ class accounts_window: def on_accounts_treeview_cursor_changed(self, widget): """Activate delete and modify buttons when a row is selected""" - self.xml.get_widget("modify_button").set_sensitive(True) - self.xml.get_widget("delete_button").set_sensitive(True) + self.xml.get_widget('modify_button').set_sensitive(True) + self.xml.get_widget('delete_button').set_sensitive(True) def on_new_button_clicked(self, widget): """When new button is clicked : open an account information window""" @@ -1078,7 +1078,7 @@ class accounts_window: sel = self.accounts_treeview.get_selection() (model, iter) = sel.get_selected() account = model.get_value(iter, 0) - dialog = confirm_dialog(_("Are you sure you want to remove this account (%s) ?") % account) + dialog = confirm_dialog(_('Are you sure you want to remove this account (%s) ?') % account) if dialog.get_response() == gtk.RESPONSE_YES: if self.plugin.connected[account]: self.plugin.send('STATUS', account, ('offline', 'offline')) @@ -1103,8 +1103,8 @@ class accounts_window: account = model.get_value(iter, 0) infos = self.plugin.accounts[account] infos['accname'] = account - infos['jid'] = self.plugin.accounts[account]["name"] + \ - '@' + self.plugin.accounts[account]["hostname"] + infos['jid'] = self.plugin.accounts[account]['name'] + \ + '@' + self.plugin.accounts[account]['hostname'] self.plugin.windows['accountPreference'] = \ accountpreferences_window(self.plugin, infos) @@ -1113,15 +1113,15 @@ class accounts_window: model.set_value(iter, 2, not cell.get_active()) account = model.get_value(iter, 0) if cell.get_active(): - self.plugin.accounts[account]["active"] = 0 + self.plugin.accounts[account]['active'] = 0 else: - self.plugin.accounts[account]["active"] = 1 + self.plugin.accounts[account]['active'] = 1 def __init__(self, plugin): self.plugin = plugin - self.xml = gtk.glade.XML(GTKGUI_GLADE, 'accounts_window', APP) - self.window = self.xml.get_widget("accounts_window") - self.accounts_treeview = self.xml.get_widget("accounts_treeview") + self.xml = gtk.glade.XML(GTKGUI_GLADE, 'configure_accounts_window', APP) + self.window = self.xml.get_widget('configure_accounts_window') + self.accounts_treeview = self.xml.get_widget('accounts_treeview') model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, \ gobject.TYPE_BOOLEAN) self.accounts_treeview.set_model(model) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index b394236b2..e1f9f5612 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -2046,7 +2046,7 @@ class roster_window: """When accounts is seleted : call the accounts class to modify accounts""" if not self.plugin.windows.has_key('accounts'): - self.plugin.windows['accounts'] = accounts_window(self.plugin) + self.plugin.windows['accounts'] = configure_accounts_window(self.plugin) def close_all(self, dic): """close all the windows in the given dictionary"""