changeset dd39d9f43ed8 in /home/hg/repos/gajim
author: Yann Leboulanger <asterix(a)lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=dd39d9f43ed8
description: [mister] Correctly restore metacontact collapse state after filtering. See #8342
diffstat:
src/roster_window.py | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (59 lines):
diff -r d10220579f97 -r dd39d9f43ed8 src/roster_window.py
--- a/src/roster_window.py Mon May 16 20:24:53 2016 +0200
+++ b/src/roster_window.py Thu Jun 02 21:51:48 2016 +0200
@@ -4186,7 +4186,8 @@
for account in accounts:
if group in gajim.groups[account]: # This account has this group
gajim.groups[account][group]['expand'] = True
- if account + group in self.collapsed_rows:
+ if account + group in self.collapsed_rows \
+ and not self.rfilter_enabled:
self.collapsed_rows.remove(account + group)
for contact in gajim.contacts.iter_contacts(account):
jid = contact.jid
@@ -4199,7 +4200,8 @@
self.tree.expand_row(path, False)
elif type_ == 'account':
account = accounts[0] # There is only one cause we don't use merge
- if account in self.collapsed_rows:
+ if account in self.collapsed_rows \
+ and not self.rfilter_enabled:
self.collapsed_rows.remove(account)
self.draw_account(account)
# When we expand, groups are collapsed. Restore expand state
@@ -4215,7 +4217,8 @@
account = model[titer][C_ACCOUNT].decode('utf-8')
contact = gajim.contacts.get_contact(account, jid)
for group in contact.groups:
- if account + group + jid in self.collapsed_rows:
+ if account + group + jid in self.collapsed_rows \
+ and not self.rfilter_enabled:
self.collapsed_rows.remove(account + group + jid)
family = gajim.contacts.get_metacontacts_family(account, jid)
nearby_family = \
@@ -4250,11 +4253,13 @@
for account in accounts:
if group in gajim.groups[account]: # This account has this group
gajim.groups[account][group]['expand'] = False
- if account + group not in self.collapsed_rows:
+ if account + group not in self.collapsed_rows \
+ and not self.rfilter_enabled:
self.collapsed_rows.append(account + group)
elif type_ == 'account':
account = accounts[0] # There is only one cause we don't use merge
- if account not in self.collapsed_rows:
+ if account not in self.collapsed_rows \
+ and not self.rfilter_enabled:
self.collapsed_rows.append(account)
self.draw_account(account)
elif type_ == 'contact':
@@ -4266,7 +4271,8 @@
if not groups:
groups = [_('General')]
for group in groups:
- if account + group + jid not in self.collapsed_rows:
+ if account + group + jid not in self.collapsed_rows \
+ and not self.rfilter_enabled:
self.collapsed_rows.append(account + group + jid)
family = gajim.contacts.get_metacontacts_family(account, jid)
nearby_family = \
changeset d10220579f97 in /home/hg/repos/gajim
author: Yann Leboulanger <asterix(a)lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=d10220579f97
description: fix some log calls
diffstat:
src/common/socks5.py | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r 7452dc852b30 -r d10220579f97 src/common/socks5.py
--- a/src/common/socks5.py Wed May 11 21:40:30 2016 +0200
+++ b/src/common/socks5.py Mon May 16 20:24:53 2016 +0200
@@ -132,13 +132,19 @@
else:
fp = fingerprint
if receiving:
- log.debug('Trying to connect as receiver to cid ' + streamhost['cid'])
+ if 'cid' in streamhost: # jingle
+ log.debug('Trying to connect as receiver to cid ' + streamhost['cid'])
+ else: # SI
+ log.debug('Trying to connect as receiver to host ' + streamhost['host'])
file_props.type_ = 'r'
socks5obj = Socks5ReceiverClient(self.idlequeue, streamhost,
sid, file_props, fingerprint=fp)
self.add_sockobj(account, socks5obj)
else:
- log.debug('Trying to connect as sender to cid' + streamhost['cid'])
+ if 'cid' in streamhost: #jingle
+ log.debug('Trying to connect as sender to cid ' + streamhost['cid'])
+ else: # SI
+ log.debug('Trying to connect as sender to host ' + streamhost['host'])
if file_props.sha_str:
idx = file_props.sha_str
else:
@@ -165,7 +171,10 @@
Called when there is a host connected to one of the senders's
streamhosts. Stop other attempts for connections
"""
- log.debug('Connected to cid ' + streamhost['cid'])
+ if 'cid' in streamhost: # jingle
+ log.debug('Connected to cid ' + streamhost['cid'])
+ else: # SI
+ log.debug('Connected to host ' + streamhost['host'])
for host in file_props.streamhosts:
if host != streamhost and 'idx' in host:
if host['state'] == 1:
@@ -227,7 +236,10 @@
"""
Called when we loose connection during transfer
"""
- log.debug('Connection refused to cid ' + streamhost['cid'])
+ if 'cid' in streamhost: # jingle
+ log.debug('Connection refused to cid ' + streamhost['cid'])
+ else: # SI
+ log.debug('Connection refused to host ' + streamhost['host'])
if file_props is None:
return
streamhost['state'] = -1