code and glade fixes all over
This commit is contained in:
parent
6ad614ccd6
commit
b791479159
5 changed files with 280 additions and 265 deletions
78
Core/core.py
78
Core/core.py
|
@ -230,8 +230,8 @@ class GajimCore:
|
||||||
log.setLevel(None)
|
log.setLevel(None)
|
||||||
if mode == 'server':
|
if mode == 'server':
|
||||||
self.connected = {}
|
self.connected = {}
|
||||||
#connexions {con: name, ...}
|
#connections {con: name, ...}
|
||||||
self.connexions = {}
|
self.connections = {}
|
||||||
self.gpg = {}
|
self.gpg = {}
|
||||||
self.passwords = {}
|
self.passwords = {}
|
||||||
if USE_GPG:
|
if USE_GPG:
|
||||||
|
@ -343,9 +343,9 @@ class GajimCore:
|
||||||
vcard[info.getName()][c.getName()] = c.getData()
|
vcard[info.getName()][c.getName()] = c.getData()
|
||||||
if vc.getID() in self.myVCardID:
|
if vc.getID() in self.myVCardID:
|
||||||
self.myVCardID.remove(vc.getID())
|
self.myVCardID.remove(vc.getID())
|
||||||
self.hub.sendPlugin('MYVCARD', self.connexions[con], vcard)
|
self.hub.sendPlugin('MYVCARD', self.connections[con], vcard)
|
||||||
else:
|
else:
|
||||||
self.hub.sendPlugin('VCARD', self.connexions[con], vcard)
|
self.hub.sendPlugin('VCARD', self.connections[con], vcard)
|
||||||
|
|
||||||
def messageCB(self, con, msg):
|
def messageCB(self, con, msg):
|
||||||
"""Called when we recieve a message"""
|
"""Called when we recieve a message"""
|
||||||
|
@ -364,25 +364,25 @@ class GajimCore:
|
||||||
#decrypt
|
#decrypt
|
||||||
encmsg = encTag.getData()
|
encmsg = encTag.getData()
|
||||||
keyID = ''
|
keyID = ''
|
||||||
if self.cfgParser.tab[self.connexions[con]].has_key("keyid"):
|
if self.cfgParser.tab[self.connections[con]].has_key("keyid"):
|
||||||
keyID = self.cfgParser.tab[self.connexions[con]]["keyid"]
|
keyID = self.cfgParser.tab[self.connections[con]]["keyid"]
|
||||||
if keyID:
|
if keyID:
|
||||||
decmsg = self.gpg[self.connexions[con]].decrypt(encmsg, keyID)
|
decmsg = self.gpg[self.connections[con]].decrypt(encmsg, keyID)
|
||||||
if decmsg:
|
if decmsg:
|
||||||
msgtxt = decmsg
|
msgtxt = decmsg
|
||||||
if typ == 'error':
|
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))
|
(str(msg.getFrom()), msg.getErrorCode(), msg.getError(), msgtxt, tim))
|
||||||
elif typ == 'groupchat':
|
elif typ == 'groupchat':
|
||||||
subject = msg.getSubject()
|
subject = msg.getSubject()
|
||||||
if subject:
|
if subject:
|
||||||
self.hub.sendPlugin('GC_SUBJECT', self.connexions[con], \
|
self.hub.sendPlugin('GC_SUBJECT', self.connections[con], \
|
||||||
(str(msg.getFrom()), subject))
|
(str(msg.getFrom()), subject))
|
||||||
else:
|
else:
|
||||||
self.hub.sendPlugin('GC_MSG', self.connexions[con], \
|
self.hub.sendPlugin('GC_MSG', self.connections[con], \
|
||||||
(str(msg.getFrom()), msgtxt, tim))
|
(str(msg.getFrom()), msgtxt, tim))
|
||||||
else:
|
else:
|
||||||
self.hub.sendPlugin('MSG', self.connexions[con], \
|
self.hub.sendPlugin('MSG', self.connections[con], \
|
||||||
(str(msg.getFrom()), msgtxt, tim))
|
(str(msg.getFrom()), msgtxt, tim))
|
||||||
# END messageCB
|
# END messageCB
|
||||||
|
|
||||||
|
@ -407,18 +407,18 @@ class GajimCore:
|
||||||
if sigTag and USE_GPG:
|
if sigTag and USE_GPG:
|
||||||
#verify
|
#verify
|
||||||
sigmsg = sigTag.getData()
|
sigmsg = sigTag.getData()
|
||||||
keyID = self.gpg[self.connexions[con]].verify(status, sigmsg)
|
keyID = self.gpg[self.connections[con]].verify(status, sigmsg)
|
||||||
if typ == 'available':
|
if typ == 'available':
|
||||||
show = prs.getShow()
|
show = prs.getShow()
|
||||||
if not show:
|
if not show:
|
||||||
show = 'online'
|
show = 'online'
|
||||||
self.hub.sendPlugin('NOTIFY', self.connexions[con], \
|
self.hub.sendPlugin('NOTIFY', self.connections[con], \
|
||||||
(prs.getFrom().getStripped(), show, status, \
|
(prs.getFrom().getStripped(), show, status, \
|
||||||
prs.getFrom().getResource(), prio, keyID, prs.getRole(), \
|
prs.getFrom().getResource(), prio, keyID, prs.getRole(), \
|
||||||
prs.getAffiliation(), prs.getJid(), prs.getReason(), \
|
prs.getAffiliation(), prs.getJid(), prs.getReason(), \
|
||||||
prs.getActor(), prs.getStatusCode()))
|
prs.getActor(), prs.getStatusCode()))
|
||||||
elif typ == 'unavailable':
|
elif typ == 'unavailable':
|
||||||
self.hub.sendPlugin('NOTIFY', self.connexions[con], \
|
self.hub.sendPlugin('NOTIFY', self.connections[con], \
|
||||||
(prs.getFrom().getStripped(), 'offline', status, \
|
(prs.getFrom().getStripped(), 'offline', status, \
|
||||||
prs.getFrom().getResource(), prio, keyID, prs.getRole(), \
|
prs.getFrom().getResource(), prio, keyID, prs.getRole(), \
|
||||||
prs.getAffiliation(), prs.getJid(), prs.getReason(), \
|
prs.getAffiliation(), prs.getJid(), prs.getReason(), \
|
||||||
|
@ -430,20 +430,20 @@ class GajimCore:
|
||||||
if con:
|
if con:
|
||||||
con.send(common.jabber.Presence(who, 'subscribed'))
|
con.send(common.jabber.Presence(who, 'subscribed'))
|
||||||
if who.find("@") <= 0:
|
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().getStripped(), 'offline', 'offline', \
|
||||||
prs.getFrom().getResource(), prio, keyID, None, None, None, \
|
prs.getFrom().getResource(), prio, keyID, None, None, None, \
|
||||||
None, None, None))
|
None, None, None))
|
||||||
else:
|
else:
|
||||||
if not status:
|
if not status:
|
||||||
status = _("I would like to add you to my roster.")
|
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))
|
status))
|
||||||
elif typ == 'subscribed':
|
elif typ == 'subscribed':
|
||||||
jid = prs.getFrom()
|
jid = prs.getFrom()
|
||||||
self.hub.sendPlugin('SUBSCRIBED', self.connexions[con],\
|
self.hub.sendPlugin('SUBSCRIBED', self.connections[con],\
|
||||||
(jid.getStripped(), jid.getResource()))
|
(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'])))
|
(jid.getStripped(), jid.getNode(), ['general'])))
|
||||||
#BE CAREFUL : no con.updateRosterItem() in a callback
|
#BE CAREFUL : no con.updateRosterItem() in a callback
|
||||||
log.debug("we are now subscribed to %s" % who)
|
log.debug("we are now subscribed to %s" % who)
|
||||||
|
@ -451,7 +451,7 @@ class GajimCore:
|
||||||
log.debug("unsubscribe request from %s" % who)
|
log.debug("unsubscribe request from %s" % who)
|
||||||
elif typ == 'unsubscribed':
|
elif typ == 'unsubscribed':
|
||||||
log.debug("we are now unsubscribed to %s" % who)
|
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())
|
prs.getFrom().getStripped())
|
||||||
elif typ == 'error':
|
elif typ == 'error':
|
||||||
errmsg = prs.getError()
|
errmsg = prs.getError()
|
||||||
|
@ -481,7 +481,7 @@ class GajimCore:
|
||||||
elif errcode == '409': #conflict : Nick Conflict
|
elif errcode == '409': #conflict : Nick Conflict
|
||||||
self.hub.sendPlugin('WARNING', None, errmsg)
|
self.hub.sendPlugin('WARNING', None, errmsg)
|
||||||
else:
|
else:
|
||||||
self.hub.sendPlugin('NOTIFY', self.connexions[con], \
|
self.hub.sendPlugin('NOTIFY', self.connections[con], \
|
||||||
(prs.getFrom().getStripped(), 'error', errmsg, \
|
(prs.getFrom().getStripped(), 'error', errmsg, \
|
||||||
prs.getFrom().getResource(), prio, keyID, None, None, None, \
|
prs.getFrom().getResource(), prio, keyID, None, None, None, \
|
||||||
None, None, None))
|
None, None, None))
|
||||||
|
@ -490,9 +490,9 @@ class GajimCore:
|
||||||
def disconnectedCB(self, con):
|
def disconnectedCB(self, con):
|
||||||
"""Called when we are disconnected"""
|
"""Called when we are disconnected"""
|
||||||
log.debug("disconnectedCB")
|
log.debug("disconnectedCB")
|
||||||
if self.connexions.has_key(con):
|
if self.connections.has_key(con):
|
||||||
self.connected[self.connexions[con]] = 0
|
self.connected[self.connections[con]] = 0
|
||||||
self.hub.sendPlugin('STATUS', self.connexions[con], 'offline')
|
self.hub.sendPlugin('STATUS', self.connections[con], 'offline')
|
||||||
# END disconenctedCB
|
# END disconenctedCB
|
||||||
|
|
||||||
def rosterSetCB(self, con, iq_obj):
|
def rosterSetCB(self, con, iq_obj):
|
||||||
|
@ -504,7 +504,7 @@ class GajimCore:
|
||||||
groups = []
|
groups = []
|
||||||
for group in item.getTags("group"):
|
for group in item.getTags("group"):
|
||||||
groups.append(group.getData())
|
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):
|
def connect(self, account):
|
||||||
"""Connect and authentificate to the Jabber server"""
|
"""Connect and authentificate to the Jabber server"""
|
||||||
|
@ -515,8 +515,8 @@ class GajimCore:
|
||||||
|
|
||||||
#create connexion if it doesn't already existe
|
#create connexion if it doesn't already existe
|
||||||
con = None
|
con = None
|
||||||
for conn in self.connexions:
|
for conn in self.connections:
|
||||||
if self.connexions[conn] == account:
|
if self.connections[conn] == account:
|
||||||
con = conn
|
con = conn
|
||||||
if not con:
|
if not con:
|
||||||
if self.cfgParser.tab[account]["use_proxy"]:
|
if self.cfgParser.tab[account]["use_proxy"]:
|
||||||
|
@ -566,7 +566,7 @@ class GajimCore:
|
||||||
|
|
||||||
#BUG in jabberpy library : if hostname is wrong : "boucle"
|
#BUG in jabberpy library : if hostname is wrong : "boucle"
|
||||||
if con.auth(name, password, ressource):
|
if con.auth(name, password, ressource):
|
||||||
self.connexions[con] = account
|
self.connections[con] = account
|
||||||
con.requestRoster()
|
con.requestRoster()
|
||||||
roster = con.getRoster().getRaw()
|
roster = con.getRoster().getRaw()
|
||||||
if not roster :
|
if not roster :
|
||||||
|
@ -621,9 +621,9 @@ class GajimCore:
|
||||||
# [], [self.socket], [])
|
# [], [self.socket], [])
|
||||||
self.send_to_socket(ev, self.socket)
|
self.send_to_socket(ev, self.socket)
|
||||||
return 0
|
return 0
|
||||||
if ev[1] and (ev[1] in self.connexions.values()):
|
if ev[1] and (ev[1] in self.connections.values()):
|
||||||
for con in self.connexions.keys():
|
for con in self.connections.keys():
|
||||||
if ev[1] == self.connexions[con]:
|
if ev[1] == self.connections[con]:
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
con = None
|
con = None
|
||||||
|
@ -631,9 +631,9 @@ class GajimCore:
|
||||||
if ev[0] == 'QUIT':
|
if ev[0] == 'QUIT':
|
||||||
self.hub.unregister(ev[2][0])
|
self.hub.unregister(ev[2][0])
|
||||||
if ev[2][1]:
|
if ev[2][1]:
|
||||||
for con in self.connexions.keys():
|
for con in self.connections.keys():
|
||||||
if self.connected[self.connexions[con]]:
|
if self.connected[self.connections[con]]:
|
||||||
self.connected[self.connexions[con]] = 0
|
self.connected[self.connections[con]] = 0
|
||||||
con.disconnect('Disconnected')
|
con.disconnect('Disconnected')
|
||||||
self.hub.sendPlugin('QUIT', None, ())
|
self.hub.sendPlugin('QUIT', None, ())
|
||||||
return 1
|
return 1
|
||||||
|
@ -859,7 +859,7 @@ class GajimCore:
|
||||||
self.gpg[ev[2]] = self.gpg[ev[1]]
|
self.gpg[ev[2]] = self.gpg[ev[1]]
|
||||||
del self.gpg[ev[1]]
|
del self.gpg[ev[1]]
|
||||||
if con:
|
if con:
|
||||||
self.connexions[con] = ev[2]
|
self.connections[con] = ev[2]
|
||||||
#('ASK_VCARD', account, jid)
|
#('ASK_VCARD', account, jid)
|
||||||
elif ev[0] == 'ASK_VCARD':
|
elif ev[0] == 'ASK_VCARD':
|
||||||
if con:
|
if con:
|
||||||
|
@ -995,16 +995,16 @@ class GajimCore:
|
||||||
else:
|
else:
|
||||||
log.debug(_("Unknown Command %s") % ev[0])
|
log.debug(_("Unknown Command %s") % ev[0])
|
||||||
if self.mode == 'server':
|
if self.mode == 'server':
|
||||||
for con in self.connexions:
|
for con in self.connections:
|
||||||
if self.connected[self.connexions[con]]:
|
if self.connected[self.connections[con]]:
|
||||||
con.process(1)
|
con.process(1)
|
||||||
#remove connexion that have been broken
|
#remove connexion that have been broken
|
||||||
for acc in self.connected:
|
for acc in self.connected:
|
||||||
if self.connected[acc]:
|
if self.connected[acc]:
|
||||||
break
|
break
|
||||||
for con in self.connexions:
|
for con in self.connections:
|
||||||
if self.connexions[con] == acc:
|
if self.connections[con] == acc:
|
||||||
del self.connexions[con]
|
del self.connections[con]
|
||||||
break
|
break
|
||||||
|
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
|
@ -862,11 +862,11 @@ class preferences_window:
|
||||||
|
|
||||||
self.xml.signal_autoconnect(self)
|
self.xml.signal_autoconnect(self)
|
||||||
|
|
||||||
class account_window:
|
class Account_modification_window:
|
||||||
"""Class for account informations"""
|
"""Class for account informations"""
|
||||||
def on_account_window_destroy(self, widget):
|
def on_account_modification_window_destroy(self, widget):
|
||||||
"""close window"""
|
"""close window"""
|
||||||
del self.plugin.windows['accountPreference']
|
del self.plugin.windows['account_modification_window']
|
||||||
|
|
||||||
def on_close_button_clicked(self, widget):
|
def on_close_button_clicked(self, widget):
|
||||||
"""When Close button is clicked"""
|
"""When Close button is clicked"""
|
||||||
|
@ -886,10 +886,10 @@ class account_window:
|
||||||
password_entry.set_sensitive(True)
|
password_entry.set_sensitive(True)
|
||||||
if infos.has_key('password'):
|
if infos.has_key('password'):
|
||||||
password_entry.set_text(infos['password'])
|
password_entry.set_text(infos['password'])
|
||||||
if infos.has_key('ressource'):
|
if infos.has_key('resource'):
|
||||||
self.xml.get_widget('ressource_entry').set_text(infos['ressource'])
|
self.xml.get_widget('resource_entry').set_text(infos['resource'])
|
||||||
if infos.has_key('priority'):
|
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'):
|
if infos.has_key('use_proxy'):
|
||||||
self.xml.get_widget('use_proxy_checkbutton').\
|
self.xml.get_widget('use_proxy_checkbutton').\
|
||||||
set_active(infos['use_proxy'])
|
set_active(infos['use_proxy'])
|
||||||
|
@ -931,8 +931,8 @@ class account_window:
|
||||||
if self.xml.get_widget('save_password_checkbutton').get_active():
|
if self.xml.get_widget('save_password_checkbutton').get_active():
|
||||||
save_password = 1
|
save_password = 1
|
||||||
password = self.xml.get_widget('password_entry').get_text()
|
password = self.xml.get_widget('password_entry').get_text()
|
||||||
ressource = self.xml.get_widget('ressource_entry').get_text()
|
resource = self.xml.get_widget('resource_entry').get_text()
|
||||||
priority = self.xml.get_widget('priority_entry').get_text()
|
priority = self.xml.get_widget('priority_spinbutton').get_value_as_int()
|
||||||
new_account_checkbutton = self.xml.get_widget('new_account_checkbutton')
|
new_account_checkbutton = self.xml.get_widget('new_account_checkbutton')
|
||||||
name = self.xml.get_widget('name_entry').get_text()
|
name = self.xml.get_widget('name_entry').get_text()
|
||||||
jid = self.xml.get_widget('jid_entry').get_text()
|
jid = self.xml.get_widget('jid_entry').get_text()
|
||||||
|
@ -977,12 +977,14 @@ class account_window:
|
||||||
return 0
|
return 0
|
||||||
if proxyhost == '':
|
if proxyhost == '':
|
||||||
Warning_dialog(_('You must enter a proxy host to use proxy'))
|
Warning_dialog(_('You must enter a proxy host to use proxy'))
|
||||||
|
'''FIXME: REMOVE THIS IF we're ok
|
||||||
if priority != '':
|
if priority != '':
|
||||||
try:
|
try:
|
||||||
priority = int(priority)
|
priority = int(priority)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
Warning_dialog(_('Priority must be a number'))
|
Warning_dialog(_('Priority must be a number'))
|
||||||
return 0
|
return 0
|
||||||
|
'''
|
||||||
(login, hostname) = jid.split('@')
|
(login, hostname) = jid.split('@')
|
||||||
key_name = self.xml.get_widget('gpg_name_label').get_text()
|
key_name = self.xml.get_widget('gpg_name_label').get_text()
|
||||||
if key_name == '': #no key selected
|
if key_name == '': #no key selected
|
||||||
|
@ -1021,7 +1023,7 @@ class account_window:
|
||||||
active = self.plugin.accounts[self.account]['active']
|
active = self.plugin.accounts[self.account]['active']
|
||||||
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
||||||
'savepass': save_password, 'password': password, \
|
'savepass': save_password, 'password': password, \
|
||||||
'ressource': ressource, 'priority' : priority, \
|
'resource': resource, 'priority' : priority, \
|
||||||
'autoconnect': autoconnect, 'use_proxy': use_proxy, 'proxyhost': \
|
'autoconnect': autoconnect, 'use_proxy': use_proxy, 'proxyhost': \
|
||||||
proxyhost, 'proxyport': proxyport, 'keyid': keyID, \
|
proxyhost, 'proxyport': proxyport, 'keyid': keyID, \
|
||||||
'keyname': key_name, 'savegpgpass': save_gpg_password, \
|
'keyname': key_name, 'savegpgpass': save_gpg_password, \
|
||||||
|
@ -1032,8 +1034,8 @@ class account_window:
|
||||||
if save_password:
|
if save_password:
|
||||||
self.plugin.send('PASSPHRASE', name, password)
|
self.plugin.send('PASSPHRASE', name, password)
|
||||||
#refresh accounts window
|
#refresh accounts window
|
||||||
if self.plugin.windows.has_key('accounts'):
|
if self.plugin.windows.has_key('accounts_window'):
|
||||||
self.plugin.windows['accounts'].init_accounts()
|
self.plugin.windows['accounts_window'].init_accounts()
|
||||||
#refresh roster
|
#refresh roster
|
||||||
self.plugin.roster.draw_roster()
|
self.plugin.roster.draw_roster()
|
||||||
widget.get_toplevel().destroy()
|
widget.get_toplevel().destroy()
|
||||||
|
@ -1045,11 +1047,11 @@ class account_window:
|
||||||
#if we neeed to register a new account
|
#if we neeed to register a new account
|
||||||
if new_account_checkbutton.get_active():
|
if new_account_checkbutton.get_active():
|
||||||
self.plugin.send('NEW_ACC', None, (hostname, login, password, name, \
|
self.plugin.send('NEW_ACC', None, (hostname, login, password, name, \
|
||||||
ressource, priority, use_proxy, proxyhost, proxyport))
|
resource, priority, use_proxy, proxyhost, proxyport))
|
||||||
return
|
return
|
||||||
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
||||||
'savepass': save_password, 'password': password, 'ressource': \
|
'savepass': save_password, 'password': password, 'resource': \
|
||||||
ressource, 'priority' : priority, 'autoconnect': autoconnect, \
|
resource, 'priority' : priority, 'autoconnect': autoconnect, \
|
||||||
'use_proxy': use_proxy, 'proxyhost': proxyhost, \
|
'use_proxy': use_proxy, 'proxyhost': proxyhost, \
|
||||||
'proxyport': proxyport, 'keyid': keyID, 'keyname': key_name, \
|
'proxyport': proxyport, 'keyid': keyID, 'keyname': key_name, \
|
||||||
'savegpgpass': save_gpg_password, 'gpgpassword': gpg_password,\
|
'savegpgpass': save_gpg_password, 'gpgpassword': gpg_password,\
|
||||||
|
@ -1067,8 +1069,8 @@ class account_window:
|
||||||
self.plugin.nicks[name] = login
|
self.plugin.nicks[name] = login
|
||||||
self.plugin.sleeper_state[name] = 0
|
self.plugin.sleeper_state[name] = 0
|
||||||
#refresh accounts window
|
#refresh accounts window
|
||||||
if self.plugin.windows.has_key('accounts'):
|
if self.plugin.windows.has_key('accounts_window'):
|
||||||
self.plugin.windows['accounts'].init_accounts()
|
self.plugin.windows['accounts_window'].init_accounts()
|
||||||
#refresh roster
|
#refresh roster
|
||||||
self.plugin.roster.draw_roster()
|
self.plugin.roster.draw_roster()
|
||||||
widget.get_toplevel().destroy()
|
widget.get_toplevel().destroy()
|
||||||
|
@ -1089,7 +1091,7 @@ class account_window:
|
||||||
self.account = acct
|
self.account = acct
|
||||||
#TODO:
|
#TODO:
|
||||||
# self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
# 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': \
|
# entryRessource.get_text(), 'priority' : prio, 'autoconnect': \
|
||||||
# autoconnect, 'use_proxy': useProxy, 'proxyhost': \
|
# autoconnect, 'use_proxy': useProxy, 'proxyhost': \
|
||||||
# entryProxyhost.get_text(), 'proxyport': proxyPort, 'keyid': keyID, \
|
# entryProxyhost.get_text(), 'proxyport': proxyPort, 'keyid': keyID, \
|
||||||
|
@ -1160,10 +1162,10 @@ class account_window:
|
||||||
password_entry.set_sensitive(False)
|
password_entry.set_sensitive(False)
|
||||||
password_entry.set_text('')
|
password_entry.set_text('')
|
||||||
|
|
||||||
#info must be a dictionnary
|
#infos must be a dictionnary
|
||||||
def __init__(self, plugin, infos = {}):
|
def __init__(self, plugin, infos = {}):
|
||||||
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'account_window', APP)
|
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'account_modification_window', APP)
|
||||||
self.window = self.xml.get_widget('account_window')
|
self.window = self.xml.get_widget('account_modification_window')
|
||||||
self.plugin = plugin
|
self.plugin = plugin
|
||||||
self.account = ''
|
self.account = ''
|
||||||
self.modify = False
|
self.modify = False
|
||||||
|
@ -1181,11 +1183,11 @@ class account_window:
|
||||||
self.init_account(infos)
|
self.init_account(infos)
|
||||||
self.xml.get_widget('new_account_checkbutton').set_sensitive(False)
|
self.xml.get_widget('new_account_checkbutton').set_sensitive(False)
|
||||||
|
|
||||||
class configure_accounts_window:
|
class Accounts_window:
|
||||||
"""Class for accounts window : lists of accounts"""
|
"""Class for accounts window : lists of accounts"""
|
||||||
def on_configure_accounts_window_destroy(self, widget):
|
def on_accounts_window_destroy(self, widget):
|
||||||
"""close window"""
|
"""close window"""
|
||||||
del self.plugin.windows['accounts']
|
del self.plugin.windows['accounts_window']
|
||||||
|
|
||||||
def on_close_button_clicked(self, widget):
|
def on_close_button_clicked(self, widget):
|
||||||
"""When Close button is clicked"""
|
"""When Close button is clicked"""
|
||||||
|
@ -1212,9 +1214,9 @@ class configure_accounts_window:
|
||||||
|
|
||||||
def on_new_button_clicked(self, widget):
|
def on_new_button_clicked(self, widget):
|
||||||
"""When new button is clicked : open an account information window"""
|
"""When new button is clicked : open an account information window"""
|
||||||
if not self.plugin.windows.has_key('accountPreference'):
|
if not self.plugin.windows.has_key('account_modification_window'):
|
||||||
self.plugin.windows['accountPreference'] = \
|
self.plugin.windows['account_modification_window'] = \
|
||||||
account_window(self.plugin)
|
Account_modification_window(self.plugin)
|
||||||
|
|
||||||
def on_delete_button_clicked(self, widget):
|
def on_delete_button_clicked(self, widget):
|
||||||
"""When delete button is clicked :
|
"""When delete button is clicked :
|
||||||
|
@ -1240,7 +1242,7 @@ class configure_accounts_window:
|
||||||
def on_modify_button_clicked(self, widget):
|
def on_modify_button_clicked(self, widget):
|
||||||
"""When modify button is clicked :
|
"""When modify button is clicked :
|
||||||
open the account information window for this account"""
|
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 = {}
|
# infos = {}
|
||||||
sel = self.accounts_treeview.get_selection()
|
sel = self.accounts_treeview.get_selection()
|
||||||
(model, iter) = sel.get_selected()
|
(model, iter) = sel.get_selected()
|
||||||
|
@ -1249,8 +1251,8 @@ class configure_accounts_window:
|
||||||
infos['accname'] = account
|
infos['accname'] = account
|
||||||
infos['jid'] = self.plugin.accounts[account]['name'] + \
|
infos['jid'] = self.plugin.accounts[account]['name'] + \
|
||||||
'@' + self.plugin.accounts[account]['hostname']
|
'@' + self.plugin.accounts[account]['hostname']
|
||||||
self.plugin.windows['accountPreference'] = \
|
self.plugin.windows['account_modification_window'] = \
|
||||||
account_window(self.plugin, infos)
|
Account_modification_window(self.plugin, infos)
|
||||||
|
|
||||||
def on_toggled(self, cell, path, model=None):
|
def on_toggled(self, cell, path, model=None):
|
||||||
iter = model.get_iter(path)
|
iter = model.get_iter(path)
|
||||||
|
@ -1263,8 +1265,8 @@ class configure_accounts_window:
|
||||||
|
|
||||||
def __init__(self, plugin):
|
def __init__(self, plugin):
|
||||||
self.plugin = plugin
|
self.plugin = plugin
|
||||||
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'configure_accounts_window', APP)
|
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'accounts_window', APP)
|
||||||
self.window = self.xml.get_widget('configure_accounts_window')
|
self.window = self.xml.get_widget('accounts_window')
|
||||||
self.accounts_treeview = self.xml.get_widget('accounts_treeview')
|
self.accounts_treeview = self.xml.get_widget('accounts_treeview')
|
||||||
model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, \
|
model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, \
|
||||||
gobject.TYPE_BOOLEAN)
|
gobject.TYPE_BOOLEAN)
|
||||||
|
|
|
@ -208,8 +208,8 @@ class vcard_information_window:
|
||||||
|
|
||||||
self.xml.signal_autoconnect(self)
|
self.xml.signal_autoconnect(self)
|
||||||
|
|
||||||
class passphrase_dialog:
|
class Passphrase_dialog:
|
||||||
"""Class for passphrase_dialog"""
|
"""Class for Passphrase dialog"""
|
||||||
def run(self):
|
def run(self):
|
||||||
"""Wait for OK button to be pressed and return passphrase/password"""
|
"""Wait for OK button to be pressed and return passphrase/password"""
|
||||||
rep = self.window.run()
|
rep = self.window.run()
|
||||||
|
@ -294,8 +294,8 @@ class choose_gpg_key_dialog:
|
||||||
self.keys_treeview.insert_column_with_attributes(-1, _('User name'), \
|
self.keys_treeview.insert_column_with_attributes(-1, _('User name'), \
|
||||||
renderer, text=1)
|
renderer, text=1)
|
||||||
|
|
||||||
class away_message_dialog:
|
class Away_message_dialog:
|
||||||
"""Class for away_message_dialogWindow"""
|
"""Class for Away message dialog"""
|
||||||
def run(self):
|
def run(self):
|
||||||
"""Wait for OK button to be pressed and return away messsage"""
|
"""Wait for OK button to be pressed and return away messsage"""
|
||||||
rep = self.window.run()
|
rep = self.window.run()
|
||||||
|
@ -447,7 +447,7 @@ class add_contact_window:
|
||||||
if jid:
|
if jid:
|
||||||
self.xml.get_widget('jid_entry').set_text(jid)
|
self.xml.get_widget('jid_entry').set_text(jid)
|
||||||
jid_splited = jid.split('@')
|
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:
|
if jid_splited[1] in jid_agents:
|
||||||
agent_combobox.set_active(jid_agents.index(jid_splited[1])+1)
|
agent_combobox.set_active(jid_agents.index(jid_splited[1])+1)
|
||||||
self.xml.signal_autoconnect(self)
|
self.xml.signal_autoconnect(self)
|
||||||
|
@ -574,7 +574,7 @@ class join_groupchat_window:
|
||||||
|
|
||||||
def __init__(self, plugin, account, server='', room = ''):
|
def __init__(self, plugin, account, server='', room = ''):
|
||||||
if not plugin.connected[account]:
|
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
|
return
|
||||||
self.plugin = plugin
|
self.plugin = plugin
|
||||||
self.account = account
|
self.account = account
|
||||||
|
|
|
@ -315,7 +315,7 @@
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget class="GtkWindow" id="configure_accounts_window">
|
<widget class="GtkWindow" id="accounts_window">
|
||||||
<property name="border_width">4</property>
|
<property name="border_width">4</property>
|
||||||
<property name="height_request">200</property>
|
<property name="height_request">200</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -330,7 +330,7 @@
|
||||||
<property name="skip_pager_hint">False</property>
|
<property name="skip_pager_hint">False</property>
|
||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
<signal name="destroy" handler="on_configure_accounts_window_destroy" last_modification_time="Wed, 02 Mar 2005 12:06:09 GMT"/>
|
<signal name="destroy" handler="on_accounts_window_destroy" last_modification_time="Mon, 07 Mar 2005 15:10:45 GMT"/>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox5">
|
<widget class="GtkVBox" id="vbox5">
|
||||||
|
@ -353,7 +353,7 @@
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="headers_visible">True</property>
|
<property name="headers_visible">True</property>
|
||||||
<property name="rules_hint">False</property>
|
<property name="rules_hint">True</property>
|
||||||
<property name="reorderable">False</property>
|
<property name="reorderable">False</property>
|
||||||
<property name="enable_search">True</property>
|
<property name="enable_search">True</property>
|
||||||
<signal name="cursor_changed" handler="on_accounts_treeview_cursor_changed" last_modification_time="Tue, 01 Mar 2005 18:21:26 GMT"/>
|
<signal name="cursor_changed" handler="on_accounts_treeview_cursor_changed" last_modification_time="Tue, 01 Mar 2005 18:21:26 GMT"/>
|
||||||
|
@ -395,13 +395,11 @@
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||||
<property name="spacing">7</property>
|
<property name="spacing">3</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="new_button">
|
<widget class="GtkButton" id="new_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_default">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="label">gtk-new</property>
|
<property name="label">gtk-new</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
@ -413,8 +411,6 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="modify_button">
|
<widget class="GtkButton" id="modify_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_default">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<property name="focus_on_click">True</property>
|
<property name="focus_on_click">True</property>
|
||||||
<signal name="clicked" handler="on_modify_button_clicked" last_modification_time="Tue, 01 Mar 2005 18:20:53 GMT"/>
|
<signal name="clicked" handler="on_modify_button_clicked" last_modification_time="Tue, 01 Mar 2005 18:20:53 GMT"/>
|
||||||
|
@ -484,8 +480,6 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="delete_button">
|
<widget class="GtkButton" id="delete_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_default">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="label">gtk-delete</property>
|
<property name="label">gtk-delete</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
@ -500,6 +494,7 @@
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
<property name="has_default">True</property>
|
<property name="has_default">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<property name="has_focus">True</property>
|
||||||
<property name="label">gtk-close</property>
|
<property name="label">gtk-close</property>
|
||||||
<property name="use_stock">True</property>
|
<property name="use_stock">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
@ -648,8 +643,10 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget class="GtkWindow" id="account_window">
|
<widget class="GtkWindow" id="account_modification_window">
|
||||||
<property name="border_width">4</property>
|
<property name="border_width">4</property>
|
||||||
|
<property name="width_request">539</property>
|
||||||
|
<property name="height_request">332</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title" translatable="yes">Account Modification</property>
|
<property name="title" translatable="yes">Account Modification</property>
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
|
@ -662,7 +659,7 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="skip_pager_hint">False</property>
|
<property name="skip_pager_hint">False</property>
|
||||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
<signal name="destroy" handler="on_account_window_destroy" last_modification_time="Mon, 28 Feb 2005 20:30:37 GMT"/>
|
<signal name="destroy" handler="on_account_modification_window_destroy" last_modification_time="Mon, 07 Mar 2005 16:05:10 GMT"/>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkVBox" id="vbox7">
|
<widget class="GtkVBox" id="vbox7">
|
||||||
|
@ -794,7 +791,7 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkEntry" id="ressource_entry">
|
<widget class="GtkEntry" id="resource_entry">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="editable">True</property>
|
<property name="editable">True</property>
|
||||||
|
@ -883,32 +880,11 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkEntry" id="priority_entry">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="editable">True</property>
|
|
||||||
<property name="visibility">True</property>
|
|
||||||
<property name="max_length">0</property>
|
|
||||||
<property name="text" translatable="yes">5</property>
|
|
||||||
<property name="has_frame">True</property>
|
|
||||||
<property name="invisible_char">*</property>
|
|
||||||
<property name="activates_default">False</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="right_attach">2</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
<property name="bottom_attach">5</property>
|
|
||||||
<property name="y_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="hbox2920">
|
<widget class="GtkHBox" id="hbox2920">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">0</property>
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkEntry" id="password_entry">
|
<widget class="GtkEntry" id="password_entry">
|
||||||
|
@ -932,6 +908,7 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkCheckButton" id="save_password_checkbutton">
|
<widget class="GtkCheckButton" id="save_password_checkbutton">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">If enabled, Gajim will remember the password for this account</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="label" translatable="yes">Save password</property>
|
<property name="label" translatable="yes">Save password</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
|
@ -952,8 +929,9 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="change_password_button">
|
<widget class="GtkButton" id="change_password_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="tooltip" translatable="yes">Click to change account's password</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="label" translatable="yes">Change password</property>
|
<property name="label" translatable="yes">Change</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<property name="focus_on_click">True</property>
|
<property name="focus_on_click">True</property>
|
||||||
|
@ -999,6 +977,27 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="y_options"></property>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkSpinButton" id="priority_spinbutton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="climb_rate">1</property>
|
||||||
|
<property name="digits">0</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
<property name="update_policy">GTK_UPDATE_ALWAYS</property>
|
||||||
|
<property name="snap_to_ticks">False</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="adjustment">1 0 100 1 10 5</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="tab_expand">False</property>
|
<property name="tab_expand">False</property>
|
||||||
|
@ -1011,13 +1010,13 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkImage" id="image6">
|
<widget class="GtkImage" id="image6">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-home</property>
|
<property name="stock">gtk-home</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">2</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -1067,7 +1066,7 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label_xalign">0</property>
|
<property name="label_xalign">0</property>
|
||||||
<property name="label_yalign">0.5</property>
|
<property name="label_yalign">0.5</property>
|
||||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkAlignment" id="alignment31">
|
<widget class="GtkAlignment" id="alignment31">
|
||||||
|
@ -1166,13 +1165,13 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkImage" id="image7">
|
<widget class="GtkImage" id="image7">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-preferences</property>
|
<property name="stock">gtk-preferences</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">2</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -1222,7 +1221,7 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label_xalign">0</property>
|
<property name="label_xalign">0</property>
|
||||||
<property name="label_yalign">0.5</property>
|
<property name="label_yalign">0.5</property>
|
||||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkAlignment" id="alignment26">
|
<widget class="GtkAlignment" id="alignment26">
|
||||||
|
@ -1240,7 +1239,7 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<widget class="GtkVBox" id="vbox32">
|
<widget class="GtkVBox" id="vbox32">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">0</property>
|
<property name="spacing">7</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="hbox39">
|
<widget class="GtkHBox" id="hbox39">
|
||||||
|
@ -1309,7 +1308,7 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
<property name="expand">True</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -1361,7 +1360,7 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="padding">0</property>
|
<property name="padding">0</property>
|
||||||
<property name="expand">True</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
@ -1401,7 +1400,7 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label_xalign">0</property>
|
<property name="label_xalign">0</property>
|
||||||
<property name="label_yalign">0.5</property>
|
<property name="label_yalign">0.5</property>
|
||||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkAlignment" id="alignment27">
|
<widget class="GtkAlignment" id="alignment27">
|
||||||
|
@ -1458,13 +1457,13 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkImage" id="image170">
|
<widget class="GtkImage" id="image170">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-dialog-error</property>
|
<property name="stock">gtk-dialog-error</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">2</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -1510,11 +1509,23 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="spacing">0</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkFrame" id="frame12">
|
<widget class="GtkFrame" id="frame23">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label_xalign">0</property>
|
<property name="label_xalign">0</property>
|
||||||
<property name="label_yalign">0.5</property>
|
<property name="label_yalign">0.5</property>
|
||||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkAlignment" id="alignment51">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xscale">1</property>
|
||||||
|
<property name="yscale">1</property>
|
||||||
|
<property name="top_padding">0</property>
|
||||||
|
<property name="bottom_padding">0</property>
|
||||||
|
<property name="left_padding">12</property>
|
||||||
|
<property name="right_padding">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkTable" id="table14">
|
<widget class="GtkTable" id="table14">
|
||||||
|
@ -1639,9 +1650,11 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label134">
|
<widget class="GtkLabel" id="label216">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes"><b>Proxy</b></property>
|
<property name="label" translatable="yes"><b>Proxy</b></property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
|
@ -1677,13 +1690,13 @@ Alex Podaras (bigpod@jabber.org)</property>
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkImage" id="image8">
|
<widget class="GtkImage" id="image8">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-refresh</property>
|
<property name="stock">gtk-refresh</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">2</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -1792,13 +1805,13 @@ on the server as a vCard</property>
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkImage" id="image128">
|
<widget class="GtkImage" id="image128">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-justify-center</property>
|
<property name="stock">gtk-justify-center</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">2</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -3839,7 +3852,7 @@ on the server as a vCard</property>
|
||||||
<widget class="GtkImage" id="image173">
|
<widget class="GtkImage" id="image173">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-select-color</property>
|
<property name="stock">gtk-select-color</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">2</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -4347,7 +4360,7 @@ on the server as a vCard</property>
|
||||||
<widget class="GtkImage" id="image174">
|
<widget class="GtkImage" id="image174">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-dialog-info</property>
|
<property name="stock">gtk-dialog-info</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">2</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -4866,7 +4879,7 @@ on the server as a vCard</property>
|
||||||
<widget class="GtkImage" id="image175">
|
<widget class="GtkImage" id="image175">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-dialog-question</property>
|
<property name="stock">gtk-dialog-question</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">2</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -5280,7 +5293,7 @@ Custom</property>
|
||||||
<widget class="GtkImage" id="image176">
|
<widget class="GtkImage" id="image176">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-preferences</property>
|
<property name="stock">gtk-preferences</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">2</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -7148,7 +7161,7 @@ Custom</property>
|
||||||
<widget class="GtkImage" id="image432">
|
<widget class="GtkImage" id="image432">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-close</property>
|
<property name="stock">gtk-close</property>
|
||||||
<property name="icon_size">4</property>
|
<property name="icon_size">1</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="yalign">0.5</property>
|
||||||
<property name="xpad">0</property>
|
<property name="xpad">0</property>
|
||||||
|
@ -8800,7 +8813,7 @@ Custom</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label209">
|
<widget class="GtkLabel" id="label209">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Enter it again:</property>
|
<property name="label" translatable="yes">Enter it again for confirmation:</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
|
|
@ -287,8 +287,8 @@ class tabbed_chat_window:
|
||||||
def on_tabbed_chat_window_delete_event(self, widget, event):
|
def on_tabbed_chat_window_delete_event(self, widget, event):
|
||||||
"""close window"""
|
"""close window"""
|
||||||
for jid in self.users:
|
for jid in self.users:
|
||||||
if time.time() - self.last_message_time[jid] < 2:
|
if time.time() - self.last_message_time[jid] < 2: # 2 seconds
|
||||||
dialog = Confirmation_dialog(_('You received a message from %s in the last two secondes.\nDo you still want to close this window ?') % jid)
|
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:
|
if dialog.get_response() != gtk.RESPONSE_YES:
|
||||||
return True #stop the propagation of the event
|
return True #stop the propagation of the event
|
||||||
|
|
||||||
|
@ -1839,13 +1839,13 @@ class roster_window:
|
||||||
menu.reposition()
|
menu.reposition()
|
||||||
|
|
||||||
def on_edit_account(self, widget, account):
|
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 = self.plugin.accounts[account]
|
||||||
infos['accname'] = account
|
infos['accname'] = account
|
||||||
infos['jid'] = self.plugin.accounts[account]["name"] + \
|
infos['jid'] = self.plugin.accounts[account]["name"] + \
|
||||||
'@' + self.plugin.accounts[account]["hostname"]
|
'@' + self.plugin.accounts[account]["hostname"]
|
||||||
self.plugin.windows['accountPreference'] = \
|
self.plugin.windows['account_modification_window'] = \
|
||||||
account_window(self.plugin, infos)
|
Account_modification_window(self.plugin, infos)
|
||||||
|
|
||||||
def mk_menu_account(self, event, iter):
|
def mk_menu_account(self, event, iter):
|
||||||
"""Make account's popup menu"""
|
"""Make account's popup menu"""
|
||||||
|
@ -2010,8 +2010,8 @@ class roster_window:
|
||||||
save_pass = self.plugin.accounts[account]['savepass']
|
save_pass = self.plugin.accounts[account]['savepass']
|
||||||
if not save_pass and not self.plugin.connected[account]:
|
if not save_pass and not self.plugin.connected[account]:
|
||||||
passphrase = ''
|
passphrase = ''
|
||||||
w = passphrase_dialog('Enter your password for account %s' \
|
w = Passphrase_dialog(_('Enter your password for account %s' \
|
||||||
% account, 'Save password', autoconnect)
|
% account, 'Save password', autoconnect))
|
||||||
if autoconnect:
|
if autoconnect:
|
||||||
gtk.main()
|
gtk.main()
|
||||||
passphrase, save = w.get_pass()
|
passphrase, save = w.get_pass()
|
||||||
|
@ -2039,8 +2039,8 @@ class roster_window:
|
||||||
passphrase = self.plugin.accounts[account]['gpgpassword']
|
passphrase = self.plugin.accounts[account]['gpgpassword']
|
||||||
else:
|
else:
|
||||||
passphrase = ''
|
passphrase = ''
|
||||||
w = passphrase_dialog('Enter GPG key passphrase for account %s'\
|
w = Passphrase_dialog(_('Enter GPG key passphrase for account %s'\
|
||||||
% account, 'Save passphrase', autoconnect)
|
% account, 'Save passphrase', autoconnect))
|
||||||
if autoconnect:
|
if autoconnect:
|
||||||
gtk.main()
|
gtk.main()
|
||||||
passphrase, save = w.get_pass()
|
passphrase, save = w.get_pass()
|
||||||
|
@ -2069,7 +2069,7 @@ class roster_window:
|
||||||
or (status == 'offline' and not \
|
or (status == 'offline' and not \
|
||||||
self.plugin.config['ask_offline_status']):
|
self.plugin.config['ask_offline_status']):
|
||||||
return status
|
return status
|
||||||
w = away_message_dialog(self.plugin)
|
w = Away_message_dialog(self.plugin)
|
||||||
message = w.run()
|
message = w.run()
|
||||||
return message
|
return message
|
||||||
|
|
||||||
|
@ -2238,8 +2238,8 @@ class roster_window:
|
||||||
def on_accounts_menuitem_activate(self, widget):
|
def on_accounts_menuitem_activate(self, widget):
|
||||||
"""When accounts is seleted :
|
"""When accounts is seleted :
|
||||||
call the accounts class to modify accounts"""
|
call the accounts class to modify accounts"""
|
||||||
if not self.plugin.windows.has_key('accounts'):
|
if not self.plugin.windows.has_key('accounts_window'):
|
||||||
self.plugin.windows['accounts'] = configure_accounts_window(self.plugin)
|
self.plugin.windows['accounts_window'] = Accounts_window(self.plugin)
|
||||||
|
|
||||||
def close_all(self, dic):
|
def close_all(self, dic):
|
||||||
"""close all the windows in the given dictionary"""
|
"""close all the windows in the given dictionary"""
|
||||||
|
@ -3077,16 +3077,16 @@ class plugin:
|
||||||
agent_registration_window(array[0], array[1], self, account)
|
agent_registration_window(array[0], array[1], self, account)
|
||||||
|
|
||||||
def handle_event_acc_ok(self, account, array):
|
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))
|
#use_proxy, proxyhost, proxyport))
|
||||||
if self.windows['accountPreference']:
|
if self.windows['account_modification_window']:
|
||||||
self.windows['accountPreference'].account_is_ok(array[1])
|
self.windows['account_modification_window'].account_is_ok(array[1])
|
||||||
name = array[3]
|
name = array[3]
|
||||||
#TODO: to be removed and done in account_is_ok function or to be put in else
|
#TODO: to be removed and done in account_is_ok function or to be put in else
|
||||||
self.accounts[array[3]] = {'name': array[1], \
|
self.accounts[array[3]] = {'name': array[1], \
|
||||||
'hostname': array[0],\
|
'hostname': array[0],\
|
||||||
'password': array[2],\
|
'password': array[2],\
|
||||||
'ressource': array[4],\
|
'resource': array[4],\
|
||||||
'priority': array[5],\
|
'priority': array[5],\
|
||||||
'use_proxy': array[6],\
|
'use_proxy': array[6],\
|
||||||
'proxyhost': array[7], \
|
'proxyhost': array[7], \
|
||||||
|
@ -3099,8 +3099,8 @@ class plugin:
|
||||||
self.roster.groups[name] = {}
|
self.roster.groups[name] = {}
|
||||||
self.roster.contacts[name] = {}
|
self.roster.contacts[name] = {}
|
||||||
self.sleeper_state[name] = 0
|
self.sleeper_state[name] = 0
|
||||||
if self.windows.has_key('accounts'):
|
if self.windows.has_key('accounts_window'):
|
||||||
self.windows['accounts'].init_accounts()
|
self.windows['accounts_window'].init_accounts()
|
||||||
self.roster.draw_roster()
|
self.roster.draw_roster()
|
||||||
|
|
||||||
def handle_event_quit(self, p1, p2):
|
def handle_event_quit(self, p1, p2):
|
||||||
|
|
Loading…
Add table
Reference in a new issue