diff options
Diffstat (limited to 'src/ui/messenger.c')
-rw-r--r-- | src/ui/messenger.c | 21 |
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 | ||
29 | static void | 30 | static void |
@@ -53,6 +54,19 @@ handle_account_details_button_click(UNUSED GtkButton* button, | |||
53 | } | 54 | } |
54 | 55 | ||
55 | static void | 56 | static void |
57 | handle_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 | |||
69 | static void | ||
56 | handle_chats_listbox_row_activated(UNUSED GtkListBox* listbox, | 70 | handle_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 | ); |