changeset ca1a9400d580 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=ca1a9400d580
description: Auto-accept contents we have created (it would make no sense to refuse it...)
diffstat:
src/common/jingle.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (14 lines):
diff -r a7bb24c5fe6e -r ca1a9400d580 src/common/jingle.py
--- a/src/common/jingle.py Fri Sep 25 23:05:14 2009 +0200
+++ b/src/common/jingle.py Fri Sep 25 23:52:39 2009 +0200
@@ -200,6 +200,10 @@
content.name = name
self.contents[(creator, name)] = content
+ if (creator == 'initiator') == self.weinitiate:
+ # The content is from us, accept it
+ content.accepted = True
+
def remove_content(self, creator, name):
''' We do not need this now '''
#TODO:
changeset d787a442999a in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=d787a442999a
description: Improved handling of RTL nicknames in roster. Fixes #4293
If the number of connected resources is appended in parentheses,
the appropriate ltr or rtl mark is inserted before, so that the
writing direction at the end of the nickname matches the writing
direction of the whole displayed string as determined by
http://www.unicode.org/reports/tr9/#The_Paragraph_Level
diffstat:
src/common/i18n.py | 14 ++++++++++++++
src/roster_window.py | 4 +++-
2 files changed, 17 insertions(+), 1 deletions(-)
diffs (45 lines):
diff -r f69ddcfb9bcb -r d787a442999a src/common/i18n.py
--- a/src/common/i18n.py Thu Sep 24 11:26:46 2009 +0200
+++ b/src/common/i18n.py Fri Sep 25 17:11:38 2009 +0200
@@ -5,6 +5,7 @@
## Copyright (C) 2004 Vincent Hanquez <tab AT snarc.org>
## Copyright (C) 2004-2007 Yann Leboulanger <asterix AT lagaule.org>
## Copyright (C) 2005-2006 Nikos Kouremenos <kourem AT gmail.com>
+## Copyright (C) 2009 Benjamin Richter <br AT waldteufel-online.net>
##
## This file is part of Gajim.
##
@@ -25,6 +26,19 @@
import gettext
import os
import defs
+import unicodedata
+
+def paragraph_direction_mark(text):
+ """Determine paragraph writing direction according to
+ http://www.unicode.org/reports/tr9/#The_Paragraph_Level
+
+ Returns either Unicode LTR mark or RTL mark."""
+ for c in text:
+ bidi = unicodedata.bidirectional(c)
+ if bidi == 'L': return u'\u200E'
+ elif bidi == 'AL' or bidi == 'R': return u'\u200F'
+
+ return u'\u200E'
APP = 'gajim'
DIR = defs.localedir
diff -r f69ddcfb9bcb -r d787a442999a src/roster_window.py
--- a/src/roster_window.py Thu Sep 24 11:26:46 2009 +0200
+++ b/src/roster_window.py Fri Sep 25 17:11:38 2009 +0200
@@ -1113,7 +1113,9 @@
if c.show not in ('error', 'offline'):
nb_connected_contact += 1
if nb_connected_contact > 1:
- name += ' (' + unicode(nb_connected_contact) + ')'
+ # switch back to default writing direction
+ name += i18n.paragraph_direction_mark(unicode(name))
+ name += u' (%d)' % nb_connected_contact
# show (account_name) if there are 2 contact with same jid
# in merged mode