Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
fc68a804 by wurstsalat at 2021-12-13T22:24:20+01:00
MessageInputTextView: Grab focus after clicking avatar in chat
Fixes #10696
- - - - -
2 changed files:
- gajim/gtk/controls/base.py
- gajim/gtk/conversation/rows/message.py
Changes:
=====================================
gajim/gtk/controls/base.py
=====================================
@@ -754,6 +754,7 @@ def on_mention(self, _widget, name):
text = f'{name}{gc_refer_to_nick_char} '
message_buffer = self.msg_textview.get_buffer()
message_buffer.insert_at_cursor(text)
+ GLib.idle_add(self.msg_textview.grab_focus)
def _on_message_textview_paste_event(self, _texview):
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
=====================================
gajim/gtk/conversation/rows/message.py
=====================================
@@ -242,6 +242,7 @@ def _get_avatar(self, kind: str, name: str) ->
Optional[cairo.Surface]:
def _on_avatar_clicked(self, _widget, event, name):
if event.type == Gdk.EventType.BUTTON_PRESS and event.button == 1:
self.get_parent().on_mention(name)
+ return Gdk.EVENT_STOP
@staticmethod
def _on_realize(event_box):
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/fc68a80408826e89a9af8225a084224a422c17d3
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/fc68a80408826e89a9af8225a084224a422c17d3
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits