diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/message.c | 7 | ||||
-rw-r--r-- | src/ui/messenger.c | 19 | ||||
-rw-r--r-- | src/ui/messenger.h | 6 |
3 files changed, 31 insertions, 1 deletions
diff --git a/src/ui/message.c b/src/ui/message.c index 6f379d7..cd8be30 100644 --- a/src/ui/message.c +++ b/src/ui/message.c | |||
@@ -174,7 +174,12 @@ ui_message_update(UI_MESSAGE_Handle *handle, | |||
174 | if (!file) | 174 | if (!file) |
175 | return; | 175 | return; |
176 | 176 | ||
177 | // TODO | 177 | gtk_stack_set_visible_child( |
178 | handle->content_stack, | ||
179 | GTK_WIDGET(handle->file_revealer) | ||
180 | ); | ||
181 | |||
182 | gtk_revealer_set_reveal_child(handle->file_revealer, TRUE); | ||
178 | } | 183 | } |
179 | 184 | ||
180 | void | 185 | void |
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 | { |
diff --git a/src/ui/messenger.h b/src/ui/messenger.h index 44deb3c..e16487b 100644 --- a/src/ui/messenger.h +++ b/src/ui/messenger.h | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <libhandy-1/handy.h> | 29 | #include <libhandy-1/handy.h> |
30 | #include <libnotify/notify.h> | 30 | #include <libnotify/notify.h> |
31 | 31 | ||
32 | #include <gnunet/gnunet_chat_lib.h> | ||
33 | |||
32 | typedef struct MESSENGER_Application MESSENGER_Application; | 34 | typedef struct MESSENGER_Application MESSENGER_Application; |
33 | 35 | ||
34 | typedef struct UI_MESSENGER_Handle | 36 | typedef struct UI_MESSENGER_Handle |
@@ -73,6 +75,10 @@ void | |||
73 | ui_messenger_init(MESSENGER_Application *app, | 75 | ui_messenger_init(MESSENGER_Application *app, |
74 | UI_MESSENGER_Handle *handle); | 76 | UI_MESSENGER_Handle *handle); |
75 | 77 | ||
78 | gboolean | ||
79 | ui_messenger_is_context_active(UI_MESSENGER_Handle *handle, | ||
80 | struct GNUNET_CHAT_Context *context); | ||
81 | |||
76 | void | 82 | void |
77 | ui_messenger_cleanup(UI_MESSENGER_Handle *handle); | 83 | ui_messenger_cleanup(UI_MESSENGER_Handle *handle); |
78 | 84 | ||