From b791479159446f815457c4de95f7fbec3781fb60 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Mon, 7 Mar 2005 17:01:56 +0000 Subject: [PATCH] code and glade fixes all over --- Core/core.py | 78 ++++---- plugins/gtkgui/config.py | 64 +++---- plugins/gtkgui/dialogs.py | 12 +- plugins/gtkgui/gtkgui.glade | 355 +++++++++++++++++++----------------- plugins/gtkgui/gtkgui.py | 36 ++-- 5 files changed, 280 insertions(+), 265 deletions(-) diff --git a/Core/core.py b/Core/core.py index f06e3ec58..7f5b6e9fd 100644 --- a/Core/core.py +++ b/Core/core.py @@ -230,8 +230,8 @@ class GajimCore: log.setLevel(None) if mode == 'server': self.connected = {} - #connexions {con: name, ...} - self.connexions = {} + #connections {con: name, ...} + self.connections = {} self.gpg = {} self.passwords = {} if USE_GPG: @@ -343,9 +343,9 @@ class GajimCore: vcard[info.getName()][c.getName()] = c.getData() if vc.getID() in self.myVCardID: self.myVCardID.remove(vc.getID()) - self.hub.sendPlugin('MYVCARD', self.connexions[con], vcard) + self.hub.sendPlugin('MYVCARD', self.connections[con], vcard) else: - self.hub.sendPlugin('VCARD', self.connexions[con], vcard) + self.hub.sendPlugin('VCARD', self.connections[con], vcard) def messageCB(self, con, msg): """Called when we recieve a message""" @@ -364,25 +364,25 @@ class GajimCore: #decrypt encmsg = encTag.getData() keyID = '' - if self.cfgParser.tab[self.connexions[con]].has_key("keyid"): - keyID = self.cfgParser.tab[self.connexions[con]]["keyid"] + if self.cfgParser.tab[self.connections[con]].has_key("keyid"): + keyID = self.cfgParser.tab[self.connections[con]]["keyid"] if keyID: - decmsg = self.gpg[self.connexions[con]].decrypt(encmsg, keyID) + decmsg = self.gpg[self.connections[con]].decrypt(encmsg, keyID) if decmsg: msgtxt = decmsg if typ == 'error': - self.hub.sendPlugin('MSGERROR', self.connexions[con], \ + self.hub.sendPlugin('MSGERROR', self.connections[con], \ (str(msg.getFrom()), msg.getErrorCode(), msg.getError(), msgtxt, tim)) elif typ == 'groupchat': subject = msg.getSubject() if subject: - self.hub.sendPlugin('GC_SUBJECT', self.connexions[con], \ + self.hub.sendPlugin('GC_SUBJECT', self.connections[con], \ (str(msg.getFrom()), subject)) else: - self.hub.sendPlugin('GC_MSG', self.connexions[con], \ + self.hub.sendPlugin('GC_MSG', self.connections[con], \ (str(msg.getFrom()), msgtxt, tim)) else: - self.hub.sendPlugin('MSG', self.connexions[con], \ + self.hub.sendPlugin('MSG', self.connections[con], \ (str(msg.getFrom()), msgtxt, tim)) # END messageCB @@ -407,18 +407,18 @@ class GajimCore: if sigTag and USE_GPG: #verify sigmsg = sigTag.getData() - keyID = self.gpg[self.connexions[con]].verify(status, sigmsg) + keyID = self.gpg[self.connections[con]].verify(status, sigmsg) if typ == 'available': show = prs.getShow() if not show: show = 'online' - self.hub.sendPlugin('NOTIFY', self.connexions[con], \ + self.hub.sendPlugin('NOTIFY', self.connections[con], \ (prs.getFrom().getStripped(), show, status, \ prs.getFrom().getResource(), prio, keyID, prs.getRole(), \ prs.getAffiliation(), prs.getJid(), prs.getReason(), \ prs.getActor(), prs.getStatusCode())) elif typ == 'unavailable': - self.hub.sendPlugin('NOTIFY', self.connexions[con], \ + self.hub.sendPlugin('NOTIFY', self.connections[con], \ (prs.getFrom().getStripped(), 'offline', status, \ prs.getFrom().getResource(), prio, keyID, prs.getRole(), \ prs.getAffiliation(), prs.getJid(), prs.getReason(), \ @@ -430,20 +430,20 @@ class GajimCore: if con: con.send(common.jabber.Presence(who, 'subscribed')) if who.find("@") <= 0: - self.hub.sendPlugin('NOTIFY', self.connexions[con], \ + self.hub.sendPlugin('NOTIFY', self.connections[con], \ (prs.getFrom().getStripped(), 'offline', 'offline', \ prs.getFrom().getResource(), prio, keyID, None, None, None, \ None, None, None)) else: if not status: status = _("I would like to add you to my roster.") - self.hub.sendPlugin('SUBSCRIBE', self.connexions[con], (who, \ + self.hub.sendPlugin('SUBSCRIBE', self.connections[con], (who, \ status)) elif typ == 'subscribed': jid = prs.getFrom() - self.hub.sendPlugin('SUBSCRIBED', self.connexions[con],\ + self.hub.sendPlugin('SUBSCRIBED', self.connections[con],\ (jid.getStripped(), jid.getResource())) - self.hub.queueIn.put(('UPDUSER', self.connexions[con], \ + self.hub.queueIn.put(('UPDUSER', self.connections[con], \ (jid.getStripped(), jid.getNode(), ['general']))) #BE CAREFUL : no con.updateRosterItem() in a callback log.debug("we are now subscribed to %s" % who) @@ -451,7 +451,7 @@ class GajimCore: log.debug("unsubscribe request from %s" % who) elif typ == 'unsubscribed': log.debug("we are now unsubscribed to %s" % who) - self.hub.sendPlugin('UNSUBSCRIBED', self.connexions[con], \ + self.hub.sendPlugin('UNSUBSCRIBED', self.connections[con], \ prs.getFrom().getStripped()) elif typ == 'error': errmsg = prs.getError() @@ -481,7 +481,7 @@ class GajimCore: elif errcode == '409': #conflict : Nick Conflict self.hub.sendPlugin('WARNING', None, errmsg) else: - self.hub.sendPlugin('NOTIFY', self.connexions[con], \ + self.hub.sendPlugin('NOTIFY', self.connections[con], \ (prs.getFrom().getStripped(), 'error', errmsg, \ prs.getFrom().getResource(), prio, keyID, None, None, None, \ None, None, None)) @@ -490,9 +490,9 @@ class GajimCore: def disconnectedCB(self, con): """Called when we are disconnected""" log.debug("disconnectedCB") - if self.connexions.has_key(con): - self.connected[self.connexions[con]] = 0 - self.hub.sendPlugin('STATUS', self.connexions[con], 'offline') + if self.connections.has_key(con): + self.connected[self.connections[con]] = 0 + self.hub.sendPlugin('STATUS', self.connections[con], 'offline') # END disconenctedCB def rosterSetCB(self, con, iq_obj): @@ -504,7 +504,7 @@ class GajimCore: groups = [] for group in item.getTags("group"): groups.append(group.getData()) - self.hub.sendPlugin('ROSTER_INFO', self.connexions[con], (jid, name, sub, ask, groups)) + self.hub.sendPlugin('ROSTER_INFO', self.connections[con], (jid, name, sub, ask, groups)) def connect(self, account): """Connect and authentificate to the Jabber server""" @@ -515,8 +515,8 @@ class GajimCore: #create connexion if it doesn't already existe con = None - for conn in self.connexions: - if self.connexions[conn] == account: + for conn in self.connections: + if self.connections[conn] == account: con = conn if not con: if self.cfgParser.tab[account]["use_proxy"]: @@ -566,7 +566,7 @@ class GajimCore: #BUG in jabberpy library : if hostname is wrong : "boucle" if con.auth(name, password, ressource): - self.connexions[con] = account + self.connections[con] = account con.requestRoster() roster = con.getRoster().getRaw() if not roster : @@ -621,9 +621,9 @@ class GajimCore: # [], [self.socket], []) self.send_to_socket(ev, self.socket) return 0 - if ev[1] and (ev[1] in self.connexions.values()): - for con in self.connexions.keys(): - if ev[1] == self.connexions[con]: + if ev[1] and (ev[1] in self.connections.values()): + for con in self.connections.keys(): + if ev[1] == self.connections[con]: break else: con = None @@ -631,9 +631,9 @@ class GajimCore: if ev[0] == 'QUIT': self.hub.unregister(ev[2][0]) if ev[2][1]: - for con in self.connexions.keys(): - if self.connected[self.connexions[con]]: - self.connected[self.connexions[con]] = 0 + for con in self.connections.keys(): + if self.connected[self.connections[con]]: + self.connected[self.connections[con]] = 0 con.disconnect('Disconnected') self.hub.sendPlugin('QUIT', None, ()) return 1 @@ -859,7 +859,7 @@ class GajimCore: self.gpg[ev[2]] = self.gpg[ev[1]] del self.gpg[ev[1]] if con: - self.connexions[con] = ev[2] + self.connections[con] = ev[2] #('ASK_VCARD', account, jid) elif ev[0] == 'ASK_VCARD': if con: @@ -995,16 +995,16 @@ class GajimCore: else: log.debug(_("Unknown Command %s") % ev[0]) if self.mode == 'server': - for con in self.connexions: - if self.connected[self.connexions[con]]: + for con in self.connections: + if self.connected[self.connections[con]]: con.process(1) #remove connexion that have been broken for acc in self.connected: if self.connected[acc]: break - for con in self.connexions: - if self.connexions[con] == acc: - del self.connexions[con] + for con in self.connections: + if self.connections[con] == acc: + del self.connections[con] break time.sleep(0.1) diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 0cb325560..db377210c 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -862,11 +862,11 @@ class preferences_window: self.xml.signal_autoconnect(self) -class account_window: +class Account_modification_window: """Class for account informations""" - def on_account_window_destroy(self, widget): + def on_account_modification_window_destroy(self, widget): """close window""" - del self.plugin.windows['accountPreference'] + del self.plugin.windows['account_modification_window'] def on_close_button_clicked(self, widget): """When Close button is clicked""" @@ -886,10 +886,10 @@ class account_window: password_entry.set_sensitive(True) if infos.has_key('password'): password_entry.set_text(infos['password']) - if infos.has_key('ressource'): - self.xml.get_widget('ressource_entry').set_text(infos['ressource']) + if infos.has_key('resource'): + self.xml.get_widget('resource_entry').set_text(infos['resource']) if infos.has_key('priority'): - self.xml.get_widget('priority_entry').set_text(str(infos['priority'])) + self.xml.get_widget('priority_spinbutton').set_value(infos['priority']) if infos.has_key('use_proxy'): self.xml.get_widget('use_proxy_checkbutton').\ set_active(infos['use_proxy']) @@ -931,8 +931,8 @@ class account_window: if self.xml.get_widget('save_password_checkbutton').get_active(): save_password = 1 password = self.xml.get_widget('password_entry').get_text() - ressource = self.xml.get_widget('ressource_entry').get_text() - priority = self.xml.get_widget('priority_entry').get_text() + resource = self.xml.get_widget('resource_entry').get_text() + priority = self.xml.get_widget('priority_spinbutton').get_value_as_int() new_account_checkbutton = self.xml.get_widget('new_account_checkbutton') name = self.xml.get_widget('name_entry').get_text() jid = self.xml.get_widget('jid_entry').get_text() @@ -977,12 +977,14 @@ class account_window: return 0 if proxyhost == '': Warning_dialog(_('You must enter a proxy host to use proxy')) + '''FIXME: REMOVE THIS IF we're ok if priority != '': try: priority = int(priority) except ValueError: Warning_dialog(_('Priority must be a number')) return 0 + ''' (login, hostname) = jid.split('@') key_name = self.xml.get_widget('gpg_name_label').get_text() if key_name == '': #no key selected @@ -1021,7 +1023,7 @@ class account_window: active = self.plugin.accounts[self.account]['active'] self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\ 'savepass': save_password, 'password': password, \ - 'ressource': ressource, 'priority' : priority, \ + 'resource': resource, 'priority' : priority, \ 'autoconnect': autoconnect, 'use_proxy': use_proxy, 'proxyhost': \ proxyhost, 'proxyport': proxyport, 'keyid': keyID, \ 'keyname': key_name, 'savegpgpass': save_gpg_password, \ @@ -1032,8 +1034,8 @@ class account_window: if save_password: self.plugin.send('PASSPHRASE', name, password) #refresh accounts window - if self.plugin.windows.has_key('accounts'): - self.plugin.windows['accounts'].init_accounts() + if self.plugin.windows.has_key('accounts_window'): + self.plugin.windows['accounts_window'].init_accounts() #refresh roster self.plugin.roster.draw_roster() widget.get_toplevel().destroy() @@ -1045,11 +1047,11 @@ class account_window: #if we neeed to register a new account if new_account_checkbutton.get_active(): self.plugin.send('NEW_ACC', None, (hostname, login, password, name, \ - ressource, priority, use_proxy, proxyhost, proxyport)) + resource, priority, use_proxy, proxyhost, proxyport)) return self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\ - 'savepass': save_password, 'password': password, 'ressource': \ - ressource, 'priority' : priority, 'autoconnect': autoconnect, \ + 'savepass': save_password, 'password': password, 'resource': \ + resource, 'priority' : priority, 'autoconnect': autoconnect, \ 'use_proxy': use_proxy, 'proxyhost': proxyhost, \ 'proxyport': proxyport, 'keyid': keyID, 'keyname': key_name, \ 'savegpgpass': save_gpg_password, 'gpgpassword': gpg_password,\ @@ -1067,8 +1069,8 @@ class account_window: self.plugin.nicks[name] = login self.plugin.sleeper_state[name] = 0 #refresh accounts window - if self.plugin.windows.has_key('accounts'): - self.plugin.windows['accounts'].init_accounts() + if self.plugin.windows.has_key('accounts_window'): + self.plugin.windows['accounts_window'].init_accounts() #refresh roster self.plugin.roster.draw_roster() widget.get_toplevel().destroy() @@ -1089,7 +1091,7 @@ class account_window: self.account = acct #TODO: # self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\ -# 'savepass': savepass, 'password': entryPass.get_text(), 'ressource': \ +# 'savepass': savepass, 'password': entryPass.get_text(), 'resource': \ # entryRessource.get_text(), 'priority' : prio, 'autoconnect': \ # autoconnect, 'use_proxy': useProxy, 'proxyhost': \ # entryProxyhost.get_text(), 'proxyport': proxyPort, 'keyid': keyID, \ @@ -1160,10 +1162,10 @@ class account_window: password_entry.set_sensitive(False) password_entry.set_text('') - #info must be a dictionnary + #infos must be a dictionnary def __init__(self, plugin, infos = {}): - self.xml = gtk.glade.XML(GTKGUI_GLADE, 'account_window', APP) - self.window = self.xml.get_widget('account_window') + self.xml = gtk.glade.XML(GTKGUI_GLADE, 'account_modification_window', APP) + self.window = self.xml.get_widget('account_modification_window') self.plugin = plugin self.account = '' self.modify = False @@ -1181,11 +1183,11 @@ class account_window: self.init_account(infos) self.xml.get_widget('new_account_checkbutton').set_sensitive(False) -class configure_accounts_window: +class Accounts_window: """Class for accounts window : lists of accounts""" - def on_configure_accounts_window_destroy(self, widget): + def on_accounts_window_destroy(self, widget): """close window""" - del self.plugin.windows['accounts'] + del self.plugin.windows['accounts_window'] def on_close_button_clicked(self, widget): """When Close button is clicked""" @@ -1212,9 +1214,9 @@ class configure_accounts_window: def on_new_button_clicked(self, widget): """When new button is clicked : open an account information window""" - if not self.plugin.windows.has_key('accountPreference'): - self.plugin.windows['accountPreference'] = \ - account_window(self.plugin) + if not self.plugin.windows.has_key('account_modification_window'): + self.plugin.windows['account_modification_window'] = \ + Account_modification_window(self.plugin) def on_delete_button_clicked(self, widget): """When delete button is clicked : @@ -1240,7 +1242,7 @@ class configure_accounts_window: def on_modify_button_clicked(self, widget): """When modify button is clicked : open the account information window for this account""" - if not self.plugin.windows.has_key('accountPreference'): + if not self.plugin.windows.has_key('account_modification_window'): # infos = {} sel = self.accounts_treeview.get_selection() (model, iter) = sel.get_selected() @@ -1249,8 +1251,8 @@ class configure_accounts_window: infos['accname'] = account infos['jid'] = self.plugin.accounts[account]['name'] + \ '@' + self.plugin.accounts[account]['hostname'] - self.plugin.windows['accountPreference'] = \ - account_window(self.plugin, infos) + self.plugin.windows['account_modification_window'] = \ + Account_modification_window(self.plugin, infos) def on_toggled(self, cell, path, model=None): iter = model.get_iter(path) @@ -1263,8 +1265,8 @@ class configure_accounts_window: def __init__(self, plugin): self.plugin = plugin - self.xml = gtk.glade.XML(GTKGUI_GLADE, 'configure_accounts_window', APP) - self.window = self.xml.get_widget('configure_accounts_window') + 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') model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, \ gobject.TYPE_BOOLEAN) diff --git a/plugins/gtkgui/dialogs.py b/plugins/gtkgui/dialogs.py index 644eaa5b9..db3f9d293 100644 --- a/plugins/gtkgui/dialogs.py +++ b/plugins/gtkgui/dialogs.py @@ -208,8 +208,8 @@ class vcard_information_window: self.xml.signal_autoconnect(self) -class passphrase_dialog: - """Class for passphrase_dialog""" +class Passphrase_dialog: + """Class for Passphrase dialog""" def run(self): """Wait for OK button to be pressed and return passphrase/password""" rep = self.window.run() @@ -294,8 +294,8 @@ class choose_gpg_key_dialog: self.keys_treeview.insert_column_with_attributes(-1, _('User name'), \ renderer, text=1) -class away_message_dialog: - """Class for away_message_dialogWindow""" +class Away_message_dialog: + """Class for Away message dialog""" def run(self): """Wait for OK button to be pressed and return away messsage""" rep = self.window.run() @@ -447,7 +447,7 @@ class add_contact_window: if jid: self.xml.get_widget('jid_entry').set_text(jid) jid_splited = jid.split('@') - self.xml.get_widget('login_entry').set_text(jid_splited[0]) + self.xml.get_widget('uid_entry').set_text(jid_splited[0]) if jid_splited[1] in jid_agents: agent_combobox.set_active(jid_agents.index(jid_splited[1])+1) self.xml.signal_autoconnect(self) @@ -574,7 +574,7 @@ class join_groupchat_window: def __init__(self, plugin, account, server='', room = ''): if not plugin.connected[account]: - Warning_dialog(_('You must be connected to join a group chat on this server')) + Warning_dialog(_('You must be connected to join a group chat')) return self.plugin = plugin self.account = account diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index 08d86f9ad..dc8a60dfb 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -315,7 +315,7 @@ - + 4 200 True @@ -330,7 +330,7 @@ False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST - + @@ -353,7 +353,7 @@ True True True - False + True False True @@ -395,13 +395,11 @@ 5 True GTK_BUTTONBOX_END - 7 + 3 True - True - True gtk-new True GTK_RELIEF_NORMAL @@ -413,8 +411,6 @@ True - True - True GTK_RELIEF_NORMAL True @@ -484,8 +480,6 @@ True - True - True gtk-delete True GTK_RELIEF_NORMAL @@ -500,6 +494,7 @@ True True True + True gtk-close True GTK_RELIEF_NORMAL @@ -648,8 +643,10 @@ Alex Podaras (bigpod@jabber.org) - + 4 + 539 + 332 True Account Modification GTK_WINDOW_TOPLEVEL @@ -662,7 +659,7 @@ Alex Podaras (bigpod@jabber.org) False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST - + @@ -794,7 +791,7 @@ Alex Podaras (bigpod@jabber.org) - + True True True @@ -883,32 +880,11 @@ Alex Podaras (bigpod@jabber.org) - - - True - True - True - True - 0 - 5 - True - * - False - - - 1 - 2 - 4 - 5 - - - - True False - 0 + 5 @@ -932,6 +908,7 @@ Alex Podaras (bigpod@jabber.org) True + If enabled, Gajim will remember the password for this account True Save password True @@ -952,8 +929,9 @@ Alex Podaras (bigpod@jabber.org) True + Click to change account's password True - Change password + Change True GTK_RELIEF_NORMAL True @@ -999,6 +977,27 @@ Alex Podaras (bigpod@jabber.org) + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 1 0 100 1 10 5 + + + 1 + 2 + 4 + 5 + + + False @@ -1011,13 +1010,13 @@ Alex Podaras (bigpod@jabber.org) 5 True False - 5 + 0 True gtk-home - 4 + 2 0.5 0.5 0 @@ -1067,7 +1066,7 @@ Alex Podaras (bigpod@jabber.org) True 0 0.5 - GTK_SHADOW_ETCHED_IN + GTK_SHADOW_NONE @@ -1166,13 +1165,13 @@ Alex Podaras (bigpod@jabber.org) 5 True False - 5 + 0 True gtk-preferences - 4 + 2 0.5 0.5 0 @@ -1222,7 +1221,7 @@ Alex Podaras (bigpod@jabber.org) True 0 0.5 - GTK_SHADOW_ETCHED_IN + GTK_SHADOW_NONE @@ -1240,7 +1239,7 @@ Alex Podaras (bigpod@jabber.org) True False - 0 + 7 @@ -1309,7 +1308,7 @@ Alex Podaras (bigpod@jabber.org) 0 - True + False True @@ -1361,7 +1360,7 @@ Alex Podaras (bigpod@jabber.org) 0 - True + False True @@ -1401,7 +1400,7 @@ Alex Podaras (bigpod@jabber.org) True 0 0.5 - GTK_SHADOW_ETCHED_IN + GTK_SHADOW_NONE @@ -1458,13 +1457,13 @@ Alex Podaras (bigpod@jabber.org) 5 True False - 5 + 0 True gtk-dialog-error - 4 + 2 0.5 0.5 0 @@ -1510,138 +1509,152 @@ Alex Podaras (bigpod@jabber.org) 0 - + True 0 0.5 - GTK_SHADOW_ETCHED_IN + GTK_SHADOW_NONE - - 5 + True - 3 - 2 - False - 5 - 5 + 0.5 + 0.5 + 1 + 1 + 0 + 0 + 12 + 0 - + + 5 True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 2 - 3 - - - + 3 + 2 + False + 5 + 5 - - - True - Port: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 2 - 3 - fill - - - + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 2 + 3 + + + - - - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 1 - 2 - - - + + + True + Port: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 2 + 3 + fill + + + - - - True - Host: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 1 - 2 - fill - - - + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 1 + 2 + + + - - - True - True - Use proxy - True - GTK_RELIEF_NORMAL - True - False - False - True + + + True + Host: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + Use proxy + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 1 + 2 + 0 + 1 + fill + + + - - 1 - 2 - 0 - 1 - fill - - - + True <b>Proxy</b> False @@ -1677,13 +1690,13 @@ Alex Podaras (bigpod@jabber.org) 5 True False - 5 + 0 True gtk-refresh - 4 + 2 0.5 0.5 0 @@ -1792,13 +1805,13 @@ on the server as a vCard 5 True False - 5 + 0 True gtk-justify-center - 4 + 2 0.5 0.5 0 @@ -3839,7 +3852,7 @@ on the server as a vCard True gtk-select-color - 4 + 2 0.5 0.5 0 @@ -4347,7 +4360,7 @@ on the server as a vCard True gtk-dialog-info - 4 + 2 0.5 0.5 0 @@ -4866,7 +4879,7 @@ on the server as a vCard True gtk-dialog-question - 4 + 2 0.5 0.5 0 @@ -5280,7 +5293,7 @@ Custom True gtk-preferences - 4 + 2 0.5 0.5 0 @@ -7148,7 +7161,7 @@ Custom True gtk-close - 4 + 1 0.5 0.5 0 @@ -8800,7 +8813,7 @@ Custom True - Enter it again: + Enter it again for confirmation: False False GTK_JUSTIFY_LEFT diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 6e3e6fc10..b4699c9fa 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -287,8 +287,8 @@ class tabbed_chat_window: def on_tabbed_chat_window_delete_event(self, widget, event): """close window""" for jid in self.users: - if time.time() - self.last_message_time[jid] < 2: - dialog = Confirmation_dialog(_('You received a message from %s in the last two secondes.\nDo you still want to close this window ?') % jid) + if time.time() - self.last_message_time[jid] < 2: # 2 seconds + dialog = Confirmation_dialog(_('You received a message from %s in the last two seconds.\nDo you still want to close this window ?') % jid) if dialog.get_response() != gtk.RESPONSE_YES: return True #stop the propagation of the event @@ -1839,13 +1839,13 @@ class roster_window: menu.reposition() def on_edit_account(self, widget, account): - if not self.plugin.windows.has_key('accountPreference'): + if not self.plugin.windows.has_key('account_modification_window'): infos = self.plugin.accounts[account] infos['accname'] = account infos['jid'] = self.plugin.accounts[account]["name"] + \ '@' + self.plugin.accounts[account]["hostname"] - self.plugin.windows['accountPreference'] = \ - account_window(self.plugin, infos) + self.plugin.windows['account_modification_window'] = \ + Account_modification_window(self.plugin, infos) def mk_menu_account(self, event, iter): """Make account's popup menu""" @@ -2010,8 +2010,8 @@ class roster_window: save_pass = self.plugin.accounts[account]['savepass'] if not save_pass and not self.plugin.connected[account]: passphrase = '' - w = passphrase_dialog('Enter your password for account %s' \ - % account, 'Save password', autoconnect) + w = Passphrase_dialog(_('Enter your password for account %s' \ + % account, 'Save password', autoconnect)) if autoconnect: gtk.main() passphrase, save = w.get_pass() @@ -2039,8 +2039,8 @@ class roster_window: passphrase = self.plugin.accounts[account]['gpgpassword'] else: passphrase = '' - w = passphrase_dialog('Enter GPG key passphrase for account %s'\ - % account, 'Save passphrase', autoconnect) + w = Passphrase_dialog(_('Enter GPG key passphrase for account %s'\ + % account, 'Save passphrase', autoconnect)) if autoconnect: gtk.main() passphrase, save = w.get_pass() @@ -2069,7 +2069,7 @@ class roster_window: or (status == 'offline' and not \ self.plugin.config['ask_offline_status']): return status - w = away_message_dialog(self.plugin) + w = Away_message_dialog(self.plugin) message = w.run() return message @@ -2238,8 +2238,8 @@ class roster_window: def on_accounts_menuitem_activate(self, widget): """When accounts is seleted : call the accounts class to modify accounts""" - if not self.plugin.windows.has_key('accounts'): - self.plugin.windows['accounts'] = configure_accounts_window(self.plugin) + if not self.plugin.windows.has_key('accounts_window'): + self.plugin.windows['accounts_window'] = Accounts_window(self.plugin) def close_all(self, dic): """close all the windows in the given dictionary""" @@ -3077,16 +3077,16 @@ class plugin: agent_registration_window(array[0], array[1], self, account) def handle_event_acc_ok(self, account, array): - #('ACC_OK', account, (hostname, login, pasword, name, ressource, prio, + #('ACC_OK', account, (hostname, login, pasword, name, resource, prio, #use_proxy, proxyhost, proxyport)) - if self.windows['accountPreference']: - self.windows['accountPreference'].account_is_ok(array[1]) + if self.windows['account_modification_window']: + self.windows['account_modification_window'].account_is_ok(array[1]) name = array[3] #TODO: to be removed and done in account_is_ok function or to be put in else self.accounts[array[3]] = {'name': array[1], \ 'hostname': array[0],\ 'password': array[2],\ - 'ressource': array[4],\ + 'resource': array[4],\ 'priority': array[5],\ 'use_proxy': array[6],\ 'proxyhost': array[7], \ @@ -3099,8 +3099,8 @@ class plugin: self.roster.groups[name] = {} self.roster.contacts[name] = {} self.sleeper_state[name] = 0 - if self.windows.has_key('accounts'): - self.windows['accounts'].init_accounts() + if self.windows.has_key('accounts_window'): + self.windows['accounts_window'].init_accounts() self.roster.draw_roster() def handle_event_quit(self, p1, p2):