shift + click on a GC occupant print his nick in textview. For #1933
This commit is contained in:
parent
92d7fe3d2a
commit
255667a41c
|
@ -1584,6 +1584,22 @@ class GroupchatControl(ChatControlBase):
|
|||
widget.collapse_row(path)
|
||||
else:
|
||||
widget.expand_row(path, False)
|
||||
elif event.state & gtk.gdk.SHIFT_MASK:
|
||||
message_buffer = self.msg_textview.get_buffer()
|
||||
start_iter, end_iter = message_buffer.get_bounds()
|
||||
cursor_position = message_buffer.get_insert()
|
||||
end_iter = message_buffer.get_iter_at_mark(cursor_position)
|
||||
text = message_buffer.get_text(start_iter, end_iter, False)
|
||||
start = ''
|
||||
if text: # Cursor is not at first position
|
||||
if not text[-1] in (' ', '\n', '\t'):
|
||||
start = ' '
|
||||
add = ' '
|
||||
else:
|
||||
add = self.gc_refer_to_nick_char + ' '
|
||||
message_buffer.insert_at_cursor(start + nick + add)
|
||||
self.msg_textview.grab_focus()
|
||||
return True
|
||||
|
||||
def on_list_treeview_motion_notify_event(self, widget, event):
|
||||
model = widget.get_model()
|
||||
|
|
Loading…
Reference in New Issue