[punchagan & me] print /me in history correctly. Fixes #4852
This commit is contained in:
parent
72d3c578d4
commit
a562bfdcb6
1 changed files with 16 additions and 12 deletions
|
@ -438,22 +438,26 @@ class HistoryWindow:
|
||||||
helpers.get_uf_show(show) }
|
helpers.get_uf_show(show) }
|
||||||
tag_msg = 'status'
|
tag_msg = 'status'
|
||||||
|
|
||||||
# do not do this if gcstats, avoid dupping contact_name
|
if message.startswith('/me ') or message.startswith('/me\n'):
|
||||||
# eg. nkour: nkour is now Offline
|
tag_msg = tag_name
|
||||||
if contact_name and kind != constants.KIND_GCSTATUS:
|
else:
|
||||||
# add stuff before and after contact name
|
# do not do this if gcstats, avoid dupping contact_name
|
||||||
before_str = gajim.config.get('before_nickname')
|
# eg. nkour: nkour is now Offline
|
||||||
before_str = helpers.from_one_line(before_str)
|
if contact_name and kind != constants.KIND_GCSTATUS:
|
||||||
after_str = gajim.config.get('after_nickname')
|
# add stuff before and after contact name
|
||||||
after_str = helpers.from_one_line(after_str)
|
before_str = gajim.config.get('before_nickname')
|
||||||
format = before_str + contact_name + after_str + ' '
|
before_str = helpers.from_one_line(before_str)
|
||||||
buf.insert_with_tags_by_name(end_iter, format, tag_name)
|
after_str = gajim.config.get('after_nickname')
|
||||||
|
after_str = helpers.from_one_line(after_str)
|
||||||
|
format = before_str + contact_name + after_str + ' '
|
||||||
|
buf.insert_with_tags_by_name(end_iter, format, tag_name)
|
||||||
|
|
||||||
message = message + '\n'
|
message = message + '\n'
|
||||||
if tag_msg:
|
if tag_msg:
|
||||||
self.history_textview.print_real_text(message, [tag_msg])
|
self.history_textview.print_real_text(message, [tag_msg],
|
||||||
|
name=contact_name)
|
||||||
else:
|
else:
|
||||||
self.history_textview.print_real_text(message)
|
self.history_textview.print_real_text(message, name=contact_name)
|
||||||
|
|
||||||
def on_query_entry_activate(self, widget):
|
def on_query_entry_activate(self, widget):
|
||||||
text = self.query_entry.get_text()
|
text = self.query_entry.get_text()
|
||||||
|
|
Loading…
Add table
Reference in a new issue