diff options
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 | { |