many improvements :
- it is now possible not to save the passphrase for accounts - close button in accounts window - unset sensitivity of some widgets in preferences window when some checkboxes are not active - autoconnect accounts is now available - apply button in preferences window
This commit is contained in:
parent
329e35f932
commit
35d2ba75d2
13
core/core.py
13
core/core.py
|
@ -224,11 +224,13 @@ class GajimCore:
|
|||
#connexions {con: name, ...}
|
||||
self.connexions = {}
|
||||
self.gpg = {}
|
||||
self.passwords = {}
|
||||
if USE_GPG:
|
||||
self.gpg_common = MyGnuPG()
|
||||
for a in self.accounts:
|
||||
self.connected[a] = 0 #0:offline, 1:online, 2:away,
|
||||
#3:xa, 4:dnd, 5:invisible
|
||||
self.passwords[a] = self.cfgParser.tab[a]["password"]
|
||||
if USE_GPG:
|
||||
self.gpg[a] = MyGnuPG()
|
||||
self.myVCardID = []
|
||||
|
@ -271,7 +273,6 @@ class GajimCore:
|
|||
'localhost', 'port': 8255, 'modules': 'gtkgui'}}
|
||||
fname = os.path.expanduser(CONFPATH)
|
||||
reps = string.split(fname, '/')
|
||||
# del reps[0]
|
||||
path = ''
|
||||
while len(reps) > 1:
|
||||
path = path + reps[0] + '/'
|
||||
|
@ -482,7 +483,7 @@ class GajimCore:
|
|||
"""Connect and authentificate to the Jabber server"""
|
||||
hostname = self.cfgParser.tab[account]["hostname"]
|
||||
name = self.cfgParser.tab[account]["name"]
|
||||
password = self.cfgParser.tab[account]["password"]
|
||||
password = self.passwords[account]
|
||||
ressource = self.cfgParser.tab[account]["ressource"]
|
||||
|
||||
#create connexion if it doesn't already existe
|
||||
|
@ -811,7 +812,9 @@ class GajimCore:
|
|||
#('ACC_CHG', old_account, new_account)
|
||||
elif ev[0] == 'ACC_CHG':
|
||||
self.connected[ev[2]] = self.connected[ev[1]]
|
||||
self.passwords[ev[2]] = self.passwords[ev[1]]
|
||||
del self.connected[ev[1]]
|
||||
del self.passwords[ev[1]]
|
||||
if USE_GPG:
|
||||
self.gpg[ev[2]] = self.gpg[ev[1]]
|
||||
del self.gpg[ev[1]]
|
||||
|
@ -892,14 +895,16 @@ class GajimCore:
|
|||
else:
|
||||
con.send(common.jabber.Presence('%s/%s' % (ev[2][1], ev[2][0]), \
|
||||
'available', show=ev[2][2], status = ev[2][3]))
|
||||
#('PASSPHRASE', account, passphrase)
|
||||
elif ev[0] == 'PASSPHRASE':
|
||||
#('GPGPASSPHRASE', account, passphrase)
|
||||
elif ev[0] == 'GPGPASSPHRASE':
|
||||
if USE_GPG:
|
||||
self.gpg[ev[1]].passphrase = ev[2]
|
||||
elif ev[0] == 'GPG_SECRETE_KEYS':
|
||||
if USE_GPG:
|
||||
keys = self.gpg_common.get_secret_keys()
|
||||
self.hub.sendPlugin('GPG_SECRETE_KEYS', ev[1], keys)
|
||||
elif ev[0] == 'PASSPHRASE':
|
||||
self.passwords[ev[1]] = ev[2]
|
||||
else:
|
||||
log.debug(_("Unknown Command %s") % ev[0])
|
||||
if self.mode == 'server':
|
||||
|
|
|
@ -264,6 +264,10 @@ class preference_Window:
|
|||
self.write_cfg()
|
||||
self.xml.get_widget('Preferences').destroy()
|
||||
|
||||
def on_apply(self, widget):
|
||||
"""When Apply button is clicked"""
|
||||
self.write_cfg()
|
||||
|
||||
def change_notebook_page(self, number):
|
||||
self.notebook.set_current_page(number)
|
||||
|
||||
|
@ -319,6 +323,11 @@ class preference_Window:
|
|||
first_iter, end_iter = buf.get_bounds()
|
||||
name = model.get_value(iter, 0)
|
||||
model.set_value(iter, 1, buf.get_text(first_iter, end_iter))
|
||||
|
||||
def on_chk_toggled(self, widget, widgets):
|
||||
"""set or unset sensitivity of widgets when widget is toggled"""
|
||||
for w in widgets:
|
||||
w.set_sensitive(widget.get_active())
|
||||
|
||||
def __init__(self, plugin):
|
||||
"""Initialize Preference window"""
|
||||
|
@ -380,6 +389,7 @@ class preference_Window:
|
|||
#Autopopupaway
|
||||
st = self.plugin.config['autopopupaway']
|
||||
self.chk_autoppaway.set_active(st)
|
||||
self.chk_autoppaway.set_sensitive(self.plugin.config['autopopup'])
|
||||
|
||||
#Autoaway
|
||||
st = self.plugin.config['autoaway']
|
||||
|
@ -388,6 +398,7 @@ class preference_Window:
|
|||
#Autoawaytime
|
||||
st = self.plugin.config['autoawaytime']
|
||||
self.spin_autoawaytime.set_value(st)
|
||||
self.spin_autoawaytime.set_sensitive(self.plugin.config['autoaway'])
|
||||
|
||||
#Autoxa
|
||||
st = self.plugin.config['autoxa']
|
||||
|
@ -396,6 +407,7 @@ class preference_Window:
|
|||
#Autoxatime
|
||||
st = self.plugin.config['autoxatime']
|
||||
self.spin_autoxatime.set_value(st)
|
||||
self.spin_autoxatime.set_sensitive(self.plugin.config['autoxa'])
|
||||
|
||||
#Status messages
|
||||
self.msg_tree = self.xml.get_widget('msg_treeview')
|
||||
|
@ -461,6 +473,7 @@ class preference_Window:
|
|||
self.xml.get_widget('fontbutton_user_text').set_font_name(fontStr)
|
||||
|
||||
self.xml.signal_connect('gtk_widget_destroy', self.delete_event)
|
||||
self.xml.signal_connect('on_apply_clicked', self.on_apply)
|
||||
self.xml.signal_connect('on_ok_clicked', self.on_ok)
|
||||
self.xml.signal_connect('on_cancel_clicked', self.on_cancel)
|
||||
self.xml.signal_connect('on_msg_treeview_cursor_changed', \
|
||||
|
@ -469,6 +482,12 @@ class preference_Window:
|
|||
self.on_new_msg_button_clicked)
|
||||
self.xml.signal_connect('on_delete_msg_button_clicked', \
|
||||
self.on_delete_msg_button_clicked)
|
||||
self.xml.signal_connect('on_chk_autopopup_toggled', \
|
||||
self.on_chk_toggled, [self.chk_autoppaway])
|
||||
self.xml.signal_connect('on_chk_autoaway_toggled', \
|
||||
self.on_chk_toggled, [self.spin_autoawaytime])
|
||||
self.xml.signal_connect('on_chk_autoxa_toggled', \
|
||||
self.on_chk_toggled, [self.spin_autoxatime])
|
||||
|
||||
class accountPreference_Window:
|
||||
"""Class for account informations"""
|
||||
|
@ -489,8 +508,13 @@ class accountPreference_Window:
|
|||
self.xml.get_widget("entry_name").set_text(infos['accname'])
|
||||
if infos.has_key('jid'):
|
||||
self.xml.get_widget("entry_jid").set_text(infos['jid'])
|
||||
if infos.has_key('password'):
|
||||
self.xml.get_widget("entry_password").set_text(infos['password'])
|
||||
if infos.has_key('savepass'):
|
||||
self.xml.get_widget('chk_password').set_active(\
|
||||
infos['savepass'])
|
||||
if infos['savepass']:
|
||||
self.xml.get_widget('entry_password').set_sensitive(True)
|
||||
if infos.has_key('password'):
|
||||
self.xml.get_widget("entry_password").set_text(infos['password'])
|
||||
if infos.has_key('ressource'):
|
||||
self.xml.get_widget("entry_ressource").set_text(infos['ressource'])
|
||||
if infos.has_key('priority'):
|
||||
|
@ -519,9 +543,15 @@ class accountPreference_Window:
|
|||
if infos.has_key('gpgpass'):
|
||||
self.xml.get_widget('gpg_pass_entry').set_text(\
|
||||
infos['gpgpass'])
|
||||
if infos.has_key('autoconnect'):
|
||||
self.xml.get_widget('chk_autoconnect').set_active(\
|
||||
infos['autoconnect'])
|
||||
|
||||
def on_save_clicked(self, widget):
|
||||
"""When save button is clicked : Save informations in config file"""
|
||||
savepass = 0
|
||||
if self.xml.get_widget("chk_password").get_active():
|
||||
savepass = 1
|
||||
entryPass = self.xml.get_widget("entry_password")
|
||||
entryRessource = self.xml.get_widget("entry_ressource")
|
||||
entryPriority = self.xml.get_widget("entry_priority")
|
||||
|
@ -529,6 +559,9 @@ class accountPreference_Window:
|
|||
check = self.xml.get_widget("checkbutton")
|
||||
entryName = self.xml.get_widget("entry_name")
|
||||
entryJid = self.xml.get_widget("entry_jid")
|
||||
autoconnect = 0
|
||||
if self.xml.get_widget("chk_autoconnect").get_active():
|
||||
autoconnect = 1
|
||||
checkProxy = self.xml.get_widget("checkbutton_proxy")
|
||||
if checkProxy.get_active():
|
||||
useProxy = 1
|
||||
|
@ -598,11 +631,12 @@ class accountPreference_Window:
|
|||
del self.plugin.accounts[self.account]
|
||||
self.plugin.send('ACC_CHG', self.account, name)
|
||||
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
||||
'password': entryPass.get_text(), 'ressource': \
|
||||
entryRessource.get_text(), 'priority' : prio, 'use_proxy': \
|
||||
useProxy, 'proxyhost': entryProxyhost.get_text(), 'proxyport': \
|
||||
proxyPort, 'keyid': keyID, 'keyname': keyName, 'savegpgpass': \
|
||||
save_gpg_pass, 'gpgpass': gpg_pass}
|
||||
'savepass': savepass, 'password': entryPass.get_text(), \
|
||||
'ressource': entryRessource.get_text(), 'priority' : prio, \
|
||||
'autoconnect': autoconnect, 'use_proxy': useProxy, 'proxyhost': \
|
||||
entryProxyhost.get_text(), 'proxyport': proxyPort, 'keyid': keyID, \
|
||||
'keyname': keyName, 'savegpgpass': save_gpg_pass, \
|
||||
'gpgpass': gpg_pass}
|
||||
self.plugin.send('CONFIG', None, ('accounts', self.plugin.accounts))
|
||||
#refresh accounts window
|
||||
if self.plugin.windows.has_key('accounts'):
|
||||
|
@ -623,11 +657,11 @@ class accountPreference_Window:
|
|||
check.set_active(FALSE)
|
||||
return
|
||||
self.plugin.accounts[name] = {'name': login, 'hostname': hostname,\
|
||||
'password': entryPass.get_text(), 'ressource': \
|
||||
entryRessource.get_text(), 'priority' : prio, 'use_proxy': useProxy, \
|
||||
'proxyhost': entryProxyhost.get_text(), 'proxyport': proxyPort, \
|
||||
'keyid': keyID, 'keyname': keyName, 'savegpgpass': save_gpg_pass, \
|
||||
'gpgpass': gpg_pass}
|
||||
'savepass': savepass, 'password': entryPass.get_text(), 'ressource': \
|
||||
entryRessource.get_text(), 'priority' : prio, 'autoconnect': \
|
||||
autoconnect, 'use_proxy': useProxy, 'proxyhost': \
|
||||
entryProxyhost.get_text(), 'proxyport': proxyPort, 'keyid': keyID, \
|
||||
'keyname': keyName, 'savegpgpass': save_gpg_pass, 'gpgpass': gpg_pass}
|
||||
self.plugin.send('CONFIG', None, ('accounts', self.plugin.accounts))
|
||||
#update variables
|
||||
self.plugin.windows[name] = {'infos': {}, 'chats': {}, 'gc': {}}
|
||||
|
@ -673,12 +707,16 @@ class accountPreference_Window:
|
|||
self.xml.get_widget('gpg_pass_checkbutton').set_active(False)
|
||||
self.xml.get_widget('gpg_pass_entry').set_text('')
|
||||
|
||||
def on_gpg_pass_checkbutton_toggled(self, widget, data=None):
|
||||
if self.xml.get_widget('gpg_pass_checkbutton').get_active():
|
||||
self.xml.get_widget('gpg_pass_entry').set_sensitive(True)
|
||||
else:
|
||||
self.xml.get_widget('gpg_pass_entry').set_sensitive(False)
|
||||
self.xml.get_widget('gpg_pass_entry').set_text('')
|
||||
def on_chk_toggled(self, widget, widgets):
|
||||
"""set or unset sensitivity of widgets when widget is toggled"""
|
||||
for w in widgets:
|
||||
w.set_sensitive(widget.get_active())
|
||||
|
||||
def on_chk_toggled_and_clear(self, widget, widgets):
|
||||
self.on_chk_toggled(widget, widgets)
|
||||
for w in widgets:
|
||||
if not widget.get_active():
|
||||
w.set_text('')
|
||||
|
||||
#info must be a dictionnary
|
||||
def __init__(self, plugin, infos = {}):
|
||||
|
@ -691,6 +729,7 @@ class accountPreference_Window:
|
|||
self.xml.get_widget('gpg_name_label').set_text('')
|
||||
self.xml.get_widget('gpg_pass_checkbutton').set_sensitive(False)
|
||||
self.xml.get_widget('gpg_pass_entry').set_sensitive(False)
|
||||
self.xml.get_widget('entry_password').set_sensitive(False)
|
||||
if infos:
|
||||
self.modify = True
|
||||
self.account = infos['accname']
|
||||
|
@ -703,7 +742,9 @@ class accountPreference_Window:
|
|||
self.xml.signal_connect('on_close_clicked', self.on_close)
|
||||
self.xml.signal_connect('on_choose_gpg_clicked', self.on_choose_gpg)
|
||||
self.xml.signal_connect('on_gpg_pass_checkbutton_toggled', \
|
||||
self.on_gpg_pass_checkbutton_toggled)
|
||||
self.on_chk_toggled_and_clear, [self.xml.get_widget('gpg_pass_entry')])
|
||||
self.xml.signal_connect('on_pass_checkbutton_toggled', \
|
||||
self.on_chk_toggled_and_clear, [self.xml.get_widget('entry_password')])
|
||||
|
||||
class accounts_Window:
|
||||
"""Class for accounts window : lists of accounts"""
|
||||
|
@ -711,10 +752,9 @@ class accounts_Window:
|
|||
"""close window"""
|
||||
del self.plugin.windows['accounts']
|
||||
|
||||
#Not for the moment ... but maybe one day there will be a button
|
||||
# def on_close(self, widget):
|
||||
# """When Close button is clicked"""
|
||||
# widget.get_toplevel().destroy()
|
||||
def on_close(self, widget):
|
||||
"""When Close button is clicked"""
|
||||
widget.get_toplevel().destroy()
|
||||
|
||||
def init_accounts(self):
|
||||
"""initialize listStore with existing accounts"""
|
||||
|
@ -810,6 +850,7 @@ class accounts_Window:
|
|||
self.xml.signal_connect('on_new_clicked', self.on_new_clicked)
|
||||
self.xml.signal_connect('on_delete_clicked', self.on_delete_clicked)
|
||||
self.xml.signal_connect('on_modify_clicked', self.on_modify_clicked)
|
||||
self.xml.signal_connect('on_close_clicked', self.on_close)
|
||||
self.init_accounts()
|
||||
|
||||
|
||||
|
|
|
@ -200,9 +200,10 @@ class passphrase_Window:
|
|||
if event.keyval == gtk.keysyms.Return:
|
||||
self.xml.get_widget("Passphrase").response(gtk.RESPONSE_OK)
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, txt):
|
||||
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'Passphrase', APP)
|
||||
self.entry = self.xml.get_widget("entry")
|
||||
self.xml.get_widget("label").set_text(txt)
|
||||
self.xml.signal_connect('on_Passphrase_key_press_event', \
|
||||
self.on_key_pressed)
|
||||
|
||||
|
|
|
@ -693,57 +693,49 @@
|
|||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2">
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox15">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">20</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="spacing">7</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="new_button">
|
||||
<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="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_new_clicked" last_modification_time="Thu, 11 Dec 2003 17:06:22 GMT"/>
|
||||
<signal name="clicked" handler="on_new_clicked" last_modification_time="Thu, 28 Oct 2004 11:35:22 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="delete_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-delete</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_delete_clicked" last_modification_time="Thu, 11 Dec 2003 17:06:43 GMT"/>
|
||||
<signal name="clicked" handler="on_delete_clicked" last_modification_time="Thu, 28 Oct 2004 13:36:37 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="modify_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_modify_clicked" last_modification_time="Thu, 11 Dec 2003 17:07:02 GMT"/>
|
||||
<signal name="clicked" handler="on_modify_clicked" last_modification_time="Thu, 28 Oct 2004 13:36:59 GMT"/>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment1">
|
||||
<widget class="GtkAlignment" id="alignment30">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
|
@ -755,13 +747,13 @@
|
|||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox3">
|
||||
<widget class="GtkHBox" id="hbox45">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image1">
|
||||
<widget class="GtkImage" id="image172">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-refresh</property>
|
||||
<property name="icon_size">4</property>
|
||||
|
@ -778,7 +770,7 @@
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<widget class="GtkLabel" id="label167">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Modify</property>
|
||||
<property name="use_underline">True</property>
|
||||
|
@ -802,11 +794,19 @@
|
|||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="close_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_close_clicked" last_modification_time="Thu, 28 Oct 2004 11:36:49 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
@ -867,7 +867,7 @@
|
|||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Gajim</b>
|
||||
<property name="label" translatable="yes"><b>Gajim</b> (http://www.gajim.org)
|
||||
|
||||
Copyright © 2003-2004 Gajim Team
|
||||
|
||||
|
@ -1064,30 +1064,6 @@ Yann Le Boulanger (asterix@crans.org)</property>
|
|||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label10">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Password:</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label9">
|
||||
<property name="visible">True</property>
|
||||
|
@ -1242,6 +1218,29 @@ Yann Le Boulanger (asterix@crans.org)</property>
|
|||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="chk_password">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Save password</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_pass_checkbutton_toggled" last_modification_time="Thu, 28 Oct 2004 13:45:57 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
|
@ -1300,18 +1299,92 @@ Yann Le Boulanger (asterix@crans.org)</property>
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label13">
|
||||
<widget class="GtkVBox" id="vbox37">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Empty</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame19">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment31">
|
||||
<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>
|
||||
<widget class="GtkVBox" id="vbox38">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="chk_autoconnect">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Connect at startup</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label168">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Startup</b></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">label_item</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
|
@ -3938,180 +4011,6 @@ on the server.</property>
|
|||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame8">
|
||||
<property name="width_request">180</property>
|
||||
<property name="height_request">165</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table5">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">10</property>
|
||||
<property name="column_spacing">3</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label70">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Outgoing Messages</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label71">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Status Messages</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label72">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Incoming Messages</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_in">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_out">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_status">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label73">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Color</b></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">label_item</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x">0</property>
|
||||
<property name="y">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame7">
|
||||
<property name="width_request">145</property>
|
||||
|
@ -4287,6 +4186,180 @@ position</property>
|
|||
<property name="y">103</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame8">
|
||||
<property name="width_request">180</property>
|
||||
<property name="height_request">165</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table5">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">10</property>
|
||||
<property name="column_spacing">3</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label70">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Outgoing Messages</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label71">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Status Messages</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label72">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Incoming Messages</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_in">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_out">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkColorButton" id="colorbutton_status">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_alpha">False</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label73">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Color</b></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">label_item</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="x">0</property>
|
||||
<property name="y">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
|
@ -4344,6 +4417,7 @@ messages</property>
|
|||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_chk_autopopup_toggled" last_modification_time="Thu, 28 Oct 2004 11:01:25 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -4457,6 +4531,7 @@ when NOT online</property>
|
|||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_chk_autoaway_toggled" last_modification_time="Thu, 28 Oct 2004 11:17:52 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
|
@ -4525,6 +4600,7 @@ when NOT online</property>
|
|||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_chk_autoxa_toggled" last_modification_time="Thu, 28 Oct 2004 11:20:22 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
|
@ -4864,6 +4940,19 @@ when NOT online</property>
|
|||
<signal name="clicked" handler="on_ok_clicked" last_modification_time="Mon, 29 Dec 2003 13:48:07 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="button_apply">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_apply_clicked" last_modification_time="Thu, 28 Oct 2004 11:23:17 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -8468,7 +8557,7 @@ when NOT online</property>
|
|||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label148">
|
||||
<widget class="GtkLabel" id="label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Enter your passphrase</property>
|
||||
<property name="use_underline">False</property>
|
||||
|
|
|
@ -1346,6 +1346,17 @@ class roster_Window:
|
|||
|
||||
def send_status(self, account, status, txt):
|
||||
if status != 'offline':
|
||||
save_pass = 0
|
||||
if self.plugin.accounts[account].has_key("savepass"):
|
||||
save_pass = self.plugin.accounts[account]["savepass"]
|
||||
if not save_pass and not self.plugin.connected[account]:
|
||||
passphrase = ''
|
||||
w = passphrase_Window('Enter your passphrase for your account %s' % account)
|
||||
passphrase = w.run()
|
||||
if passphrase == -1:
|
||||
return
|
||||
self.plugin.send('PASSPHRASE', account, passphrase)
|
||||
|
||||
keyid = None
|
||||
save_gpg_pass = 0
|
||||
if self.plugin.accounts[account].has_key("savegpgpass"):
|
||||
|
@ -1358,11 +1369,11 @@ class roster_Window:
|
|||
passphrase = self.plugin.accounts[account]['gpgpass']
|
||||
else:
|
||||
passphrase = ''
|
||||
w = passphrase_Window()
|
||||
w = passphrase_Window('Enter your passphrase for your the GPG key of your account %s' % account)
|
||||
passphrase = w.run()
|
||||
if passphrase == -1:
|
||||
passphrase = ''
|
||||
self.plugin.send('PASSPHRASE', account, passphrase)
|
||||
self.plugin.send('GPGPASSPHRASE', account, passphrase)
|
||||
self.plugin.send('STATUS', account, (status, txt))
|
||||
if status == 'online' and self.plugin.sleeper.getState() != \
|
||||
common.sleepy.STATE_UNKNOWN:
|
||||
|
@ -2396,7 +2407,7 @@ class plugin:
|
|||
'msg0_name':'Brb',\
|
||||
'msg0':'Back in some minutes.',\
|
||||
'msg1_name':'Eating',\
|
||||
'msg1':'I\'m eating, so let a message.',\
|
||||
'msg1':'I\'m eating, so leave me a message.',\
|
||||
'msg2_name':'Film',\
|
||||
'msg2':'I\'m watching a film.',\
|
||||
'trayicon':1,\
|
||||
|
@ -2453,6 +2464,11 @@ class plugin:
|
|||
self.roster = roster_Window(self)
|
||||
gtk.timeout_add(100, self.read_queue)
|
||||
gtk.timeout_add(1000, self.read_sleepy)
|
||||
#auto connect at startup
|
||||
for a in self.accounts.keys():
|
||||
if self.accounts[a].has_key('autoconnect'):
|
||||
if self.accounts[a]['autoconnect']:
|
||||
self.roster.send_status(a, 'online', 'Online')
|
||||
self.sleeper = common.sleepy.Sleepy( \
|
||||
self.config['autoawaytime']*60, \
|
||||
self.config['autoxatime']*60)
|
||||
|
|
Loading…
Reference in New Issue