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 196b00a..4e31952 100644
--- a/src/ui/messenger.c
+++ b/src/ui/messenger.c
@@ -24,6 +24,7 @@
24 24
25#include "messenger.h" 25#include "messenger.h"
26 26
27#include "new_platform.h"
27#include "../application.h" 28#include "../application.h"
28 29
29static void 30static void
@@ -53,6 +54,19 @@ handle_account_details_button_click(UNUSED GtkButton* button,
53} 54}
54 55
55static void 56static void
57handle_new_platform_button_click(UNUSED GtkButton* button,
58 gpointer user_data)
59{
60 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
61
62 hdy_flap_set_reveal_flap(HDY_FLAP(app->ui.messenger.flap_user_details), FALSE);
63
64 ui_new_platform_dialog_init(app, &(app->ui.new_platform));
65
66 gtk_widget_show(GTK_WIDGET(app->ui.new_platform.platform_dialog));
67}
68
69static void
56handle_chats_listbox_row_activated(UNUSED GtkListBox* listbox, 70handle_chats_listbox_row_activated(UNUSED GtkListBox* listbox,
57 UNUSED GtkListBoxRow* row, 71 UNUSED GtkListBoxRow* row,
58 gpointer user_data) 72 gpointer user_data)
@@ -215,6 +229,13 @@ ui_messenger_init(MESSENGER_Application *app,
215 gtk_builder_get_object(builder, "new_platform_button") 229 gtk_builder_get_object(builder, "new_platform_button")
216 ); 230 );
217 231
232 g_signal_connect(
233 handle->new_platform_button,
234 "clicked",
235 G_CALLBACK(handle_new_platform_button_click),
236 app
237 );
238
218 handle->contacts_button = GTK_BUTTON( 239 handle->contacts_button = GTK_BUTTON(
219 gtk_builder_get_object(builder, "contacts_button") 240 gtk_builder_get_object(builder, "contacts_button")
220 ); 241 );