diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2021-12-22 00:13:00 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2021-12-22 00:13:00 +0100 |
commit | beaa1080606c0ce173cd61afd0b6ac25ffd94116 (patch) | |
tree | 968a01dd1ea139811d3a0122af38782f0c5a1816 /src/ui/messenger.c | |
parent | 412c7d4f210096c7cde549c48e3e2a2262724d00 (diff) | |
download | messenger-gtk-beaa1080606c0ce173cd61afd0b6ac25ffd94116.tar.gz messenger-gtk-beaa1080606c0ce173cd61afd0b6ac25ffd94116.zip |
Added notifications in case of lost focus
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/ui/messenger.c')
-rw-r--r-- | src/ui/messenger.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ui/messenger.c b/src/ui/messenger.c index afa444b..0db82a0 100644 --- a/src/ui/messenger.c +++ b/src/ui/messenger.c | |||
@@ -396,6 +396,25 @@ ui_messenger_init(MESSENGER_Application *app, | |||
396 | ); | 396 | ); |
397 | } | 397 | } |
398 | 398 | ||
399 | gboolean | ||
400 | ui_messenger_is_context_active(UI_MESSENGER_Handle *handle, | ||
401 | struct GNUNET_CHAT_Context *context) | ||
402 | { | ||
403 | if (!gtk_window_is_active(GTK_WINDOW(handle->main_window))) | ||
404 | return FALSE; | ||
405 | |||
406 | UI_CHAT_ENTRY_Handle *entry = GNUNET_CHAT_context_get_user_pointer(context); | ||
407 | |||
408 | if (!entry) | ||
409 | return FALSE; | ||
410 | |||
411 | GtkListBoxRow *row = GTK_LIST_BOX_ROW( | ||
412 | gtk_widget_get_parent(entry->entry_box) | ||
413 | ); | ||
414 | |||
415 | return gtk_list_box_row_is_selected(row); | ||
416 | } | ||
417 | |||
399 | void | 418 | void |
400 | ui_messenger_cleanup(UI_MESSENGER_Handle *handle) | 419 | ui_messenger_cleanup(UI_MESSENGER_Handle *handle) |
401 | { | 420 | { |