aboutsummaryrefslogtreecommitdiff
path: root/src/ui/messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/messenger.c')
-rw-r--r--src/ui/messenger.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ui/messenger.c b/src/ui/messenger.c
index bc3a8dd..8842385 100644
--- a/src/ui/messenger.c
+++ b/src/ui/messenger.c
@@ -27,6 +27,7 @@
27#include <gtk-3.0/gdk/gdkkeys.h> 27#include <gtk-3.0/gdk/gdkkeys.h>
28 28
29#include "chat_entry.h" 29#include "chat_entry.h"
30#include "contacts.h"
30#include "message.h" 31#include "message.h"
31#include "new_contact.h" 32#include "new_contact.h"
32#include "new_platform.h" 33#include "new_platform.h"
@@ -94,6 +95,19 @@ handle_new_platform_button_click(UNUSED GtkButton* button,
94} 95}
95 96
96static void 97static void
98handle_contacts_button_click(UNUSED GtkButton* button,
99 gpointer user_data)
100{
101 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
102
103 hdy_flap_set_reveal_flap(HDY_FLAP(app->ui.messenger.flap_user_details), FALSE);
104
105 ui_contacts_dialog_init(app, &(app->ui.contacts));
106
107 gtk_widget_show(GTK_WIDGET(app->ui.contacts.dialog));
108}
109
110static void
97handle_chats_listbox_row_activated(UNUSED GtkListBox* listbox, 111handle_chats_listbox_row_activated(UNUSED GtkListBox* listbox,
98 GtkListBoxRow* row, 112 GtkListBoxRow* row,
99 gpointer user_data) 113 gpointer user_data)
@@ -261,6 +275,13 @@ ui_messenger_init(MESSENGER_Application *app,
261 gtk_builder_get_object(handle->builder, "settings_button") 275 gtk_builder_get_object(handle->builder, "settings_button")
262 ); 276 );
263 277
278 g_signal_connect(
279 handle->contacts_button,
280 "clicked",
281 G_CALLBACK(handle_contacts_button_click),
282 app
283 );
284
264 handle->user_details_button = GTK_BUTTON( 285 handle->user_details_button = GTK_BUTTON(
265 gtk_builder_get_object(handle->builder, "user_details_button") 286 gtk_builder_get_object(handle->builder, "user_details_button")
266 ); 287 );