feat: add emoji picker

This commit is contained in:
0xMRTT 2023-07-24 11:10:37 +02:00
parent 4d12edff81
commit 007da5a4e9
2 changed files with 13 additions and 0 deletions

View File

@ -232,6 +232,14 @@ template $BavarderWindow : Adw.ApplicationWindow {
Gtk.Box {
orientation: horizontal;
Button emoji_button {
valign: end;
icon-name: "emoji-people-symbolic";
tooltip-text: _("Open Emoji Picker");
halign: start;
clicked => $on_emoji();
}
ScrolledWindow scrolled_window {
vexpand: true;
hexpand: true;

View File

@ -291,6 +291,10 @@ class BavarderWindow(Adw.ApplicationWindow):
self.t = KillableThread(target=thread_run)
self.t.start()
@Gtk.Template.Callback()
def on_emoji(self, *args):
self.message_entry.do_insert_emoji(self.message_entry)
def cancel(self, *args):
try:
self.t.kill()
@ -338,3 +342,4 @@ class BavarderWindow(Adw.ApplicationWindow):
self.threads_row_activated_cb()