diff options
author | fiaxh <git@lightrise.org> | 2022-02-14 14:55:59 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-07-27 20:34:20 +0200 |
commit | 7e7dcedaf31ee35499875491c9f569c575d28435 (patch) | |
tree | 0c5fee2b28baf320775fbc92b3c252e97d9d054f /main/src/ui/chat_input/smiley_converter.vala | |
parent | f25bfb00969a7e09996da2d5500e6718f4cc0148 (diff) | |
download | dino-7e7dcedaf31ee35499875491c9f569c575d28435.tar.gz dino-7e7dcedaf31ee35499875491c9f569c575d28435.zip |
Port from GTK3 to GTK4
Diffstat (limited to 'main/src/ui/chat_input/smiley_converter.vala')
-rw-r--r-- | main/src/ui/chat_input/smiley_converter.vala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/ui/chat_input/smiley_converter.vala b/main/src/ui/chat_input/smiley_converter.vala index 8f4dee9a..fe280d99 100644 --- a/main/src/ui/chat_input/smiley_converter.vala +++ b/main/src/ui/chat_input/smiley_converter.vala @@ -33,11 +33,13 @@ class SmileyConverter { public SmileyConverter(TextView text_input) { this.text_input = text_input; - text_input.key_press_event.connect(on_text_input_key_press); + var text_input_key_events = new EventControllerKey(); + text_input_key_events.key_pressed.connect(on_text_input_key_press); + text_input.add_controller(text_input_key_events); } - public bool on_text_input_key_press(EventKey event) { - if (event.keyval == Key.space || event.keyval == Key.Return) { + public bool on_text_input_key_press(uint keyval, uint keycode, Gdk.ModifierType state) { + if (keyval == Key.space || keyval == Key.Return) { check_convert(); } return false; |