changeset bb040bbfe145 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=bb040bbfe145
description: try to improve behavour with contacs connected with several
resources
diffstat:
src/gui_interface.py | 2 +-
src/message_control.py | 8 +-------
2 files changed, 2 insertions(+), 8 deletions(-)
diffs (44 lines):
diff -r eb0712345796 -r bb040bbfe145 src/gui_interface.py
--- a/src/gui_interface.py Sun Aug 19 22:35:46 2012 +0200
+++ b/src/gui_interface.py Mon Aug 20 14:49:29 2012 +0200
@@ -375,7 +375,7 @@
is_highest = (highest and highest.resource == resource)
ctrl = self.msg_win_mgr.get_control(jid, account)
- if ctrl and ctrl.session and ctrl.session.resource == resource:
+ if ctrl and ctrl.session and len(obj.contact_list) > 1:
ctrl.remove_session(ctrl.session)
def handle_event_msgerror(self, obj):
diff -r eb0712345796 -r bb040bbfe145 src/message_control.py
--- a/src/message_control.py Sun Aug 19 22:35:46 2012 +0200
+++ b/src/message_control.py Mon Aug 20 14:49:29 2012 +0200
@@ -60,7 +60,6 @@
self.resource = resource
self.session = None
- self.other_sessions = []
gajim.last_message_time[self.account][self.get_full_jid()] = 0
@@ -203,10 +202,6 @@
if oldsession:
oldsession.control = None
- self.other_sessions.append(oldsession)
-
- if self.session in self.other_sessions:
- self.other_sessions.remove(self.session)
crypto_changed = bool(session and isinstance(session,
EncryptedStanzaSession) and session.enable_encryption) != \
@@ -229,8 +224,7 @@
last_session = self.other_sessions.pop(0)
if session not in self.other_sessions:
self.other_sessions.append(session)
- if last_session:
- self.session = last_session
+ self.session = last_session
def _nec_message_outgoing(self, obj):
# Send the given message to the active tab.
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits