changeset 2a31971d0de3 in /home/hg/repos/gajim

author: Yann Leboulanger <aste...@lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=2a31971d0de3
description: [lumirayz and mrDoctorWho] Ignore /me when determining 
direction_mark. Fixes #7414

diffstat:

 src/conversation_textview.py |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 8d9109212550 -r 2a31971d0de3 src/conversation_textview.py
--- a/src/conversation_textview.py      Sat Aug 31 17:09:34 2013 +0400
+++ b/src/conversation_textview.py      Tue Sep 03 18:19:46 2013 +0200
@@ -1289,14 +1289,17 @@
             # We don't have tim for outgoing messages...
             tim = time.localtime()
         current_print_time = gajim.config.get('print_time')
-        direction_mark = i18n.paragraph_direction_mark(unicode(text))
+        if text.startswith('/me '):
+            direction_mark = i18n.paragraph_direction_mark(unicode(text[3:]))
+        else:
+            direction_mark = i18n.paragraph_direction_mark(unicode(text))
         # don't apply direction mark if it's status message
         if kind == 'status':
             direction_mark = i18n.direction_mark
         if current_print_time == 'always' and kind != 'info' and not simple:
             timestamp_str = self.get_time_to_show(tim, direction_mark)
             timestamp = time.strftime(timestamp_str, tim)
-            timestamp = direction_mark + timestamp
+            timestamp = direction_mark + timestamp + direction_mark
             buffer_.insert_with_tags_by_name(end_iter, timestamp,
                 *other_tags_for_time)
         elif current_print_time == 'sometimes' and kind != 'info' and not 
simple:
@@ -1427,8 +1430,7 @@
             before_str = helpers.from_one_line(before_str)
             after_str = gajim.config.get('after_nickname')
             after_str = helpers.from_one_line(after_str)
-            format_ = direction_mark + before_str + name + direction_mark + \
-                after_str + ' '
+            format_ = before_str + name + direction_mark + after_str + ' '
             buffer_.insert_with_tags_by_name(end_iter, format_, *name_tags)
 
     def print_subject(self, subject, iter_=None):
_______________________________________________
Commits mailing list
Commits@gajim.org
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to