changeset a1313c0308ca in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=a1313c0308ca
description: keep in config file room.JID.muc_restore_*. Fixes #7276
diffstat:
src/common/config.py | 2 ++
src/common/connection.py | 9 ++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r d68dac387bb8 -r a1313c0308ca src/common/config.py
--- a/src/common/config.py Wed Dec 12 22:03:13 2012 +0100
+++ b/src/common/config.py Thu Dec 13 10:07:51 2012 +0100
@@ -463,6 +463,8 @@
}, {}),
'rooms': ({
'speller_language': [ opt_str, '', _('Language for which we want to check misspelled words')],
+ 'muc_restore_lines': [opt_int, -2, _('How many lines to request from server when entering a groupchat. -1 means no limit, -2 means global value')],
+ 'muc_restore_timeout': [opt_int, -2, _('How many minutes back to request logs when a entering a groupchat. -1 means no limit, -2 means global value')],
}, {}),
'plugins': ({
'active': [opt_bool, False, _('State whether plugins should be activated on exit (this is saved on Gajim exit). This option SHOULD NOT be used to (de)activate plug-ins. Use GUI instead.')],
diff -r d68dac387bb8 -r a1313c0308ca src/common/connection.py
--- a/src/common/connection.py Wed Dec 12 22:03:13 2012 +0100
+++ b/src/common/connection.py Thu Dec 13 10:07:51 2012 +0100
@@ -2385,10 +2385,9 @@
tags = {}
timeout = gajim.config.get_per('room', room_jid,
'muc_restore_timeout')
- if timeout is None:
- timeout = gajim.config.get('muc_restore_timeout') * 60
- else:
- timeout *= 60
+ if timeout is None or timeout == -2:
+ timeout = gajim.config.get('muc_restore_timeout')
+ timeout *= 60
if timeout >= 0:
last_date = self.last_history_time[room_jid]
if last_date == 0:
@@ -2399,7 +2398,7 @@
last_date))
tags['since'] = last_date
nb = gajim.config.get_per('room', room_jid, 'muc_restore_lines')
- if nb is None:
+ if nb is None or nb == -2:
nb = gajim.config.get('muc_restore_lines')
if nb >= 0:
tags['maxstanzas'] = nb
changeset d68dac387bb8 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=d68dac387bb8
description: don't reconnect a disabled account. Fixes #7265
diffstat:
src/common/connection.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r f7d75c53873f -r d68dac387bb8 src/common/connection.py
--- a/src/common/connection.py Sun Dec 09 17:07:50 2012 +0100
+++ b/src/common/connection.py Wed Dec 12 22:03:13 2012 +0100
@@ -2641,6 +2641,9 @@
self.connection.send(message)
def check_pingalive(self):
+ if not gajim.config.get_per('accounts', self.name, 'active'):
+ # Account may have been disabled
+ return
if self.awaiting_xmpp_ping_id:
# We haven't got the pong in time, disco and reconnect
log.warn("No reply received for keepalive ping. Reconnecting.")