ClickableNicknamesPlugin.[Andrey Musikhin].Insert nick in the middle of the message
This commit is contained in:
@@ -126,10 +126,16 @@ class Base(object):
|
|||||||
self.chat_control.room_jid)
|
self.chat_control.room_jid)
|
||||||
if nick not in nicks:
|
if nick not in nicks:
|
||||||
return
|
return
|
||||||
|
|
||||||
message_buffer = self.chat_control.msg_textview.get_buffer()
|
message_buffer = self.chat_control.msg_textview.get_buffer()
|
||||||
if message_buffer.get_char_count() < 2:
|
if message_buffer.get_char_count() < 1:
|
||||||
nick = nick + gajim.config.get('gc_refer_to_nick_char')
|
nick = nick + gajim.config.get('gc_refer_to_nick_char')
|
||||||
nick = nick + ' '
|
else:
|
||||||
|
start, end = message_buffer.get_bounds()
|
||||||
|
if message_buffer.get_text(start, end, True)[-1] != ' ':
|
||||||
|
nick = ' ' + nick
|
||||||
|
nick += ' '
|
||||||
|
|
||||||
message_buffer.insert_at_cursor(nick)
|
message_buffer.insert_at_cursor(nick)
|
||||||
self.chat_control.msg_textview.grab_focus()
|
self.chat_control.msg_textview.grab_focus()
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
[info]
|
[info]
|
||||||
name: Clickable Nicknames
|
name: Clickable Nicknames
|
||||||
short_name: clickable_nicknames
|
short_name: clickable_nicknames
|
||||||
version: 0.2.3
|
version: 0.3
|
||||||
description: Clickable nicknames in the conversation textview.
|
description: Clickable nicknames in the conversation textview.
|
||||||
authors: Denis Fomin <fominde@gmail.com>
|
authors: Andrey Musikhin <melomansegfault@gmail.com>
|
||||||
|
Denis Fomin <fominde@gmail.com> Andrey
|
||||||
homepage: http://trac-plugins.gajim.org/wiki/ClickableNicknamesPlugin
|
homepage: http://trac-plugins.gajim.org/wiki/ClickableNicknamesPlugin
|
||||||
min_gajim_version: 0.15.10
|
min_gajim_version: 0.15.10
|
||||||
|
|||||||
Reference in New Issue
Block a user