diff options
Diffstat (limited to 'src/ui/messenger.c')
-rw-r--r-- | src/ui/messenger.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/ui/messenger.c b/src/ui/messenger.c index 70d71b3..3de94de 100644 --- a/src/ui/messenger.c +++ b/src/ui/messenger.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include "chat_entry.h" | 29 | #include "chat_entry.h" |
30 | #include "message.h" | 30 | #include "message.h" |
31 | #include "new_contact.h" | ||
31 | #include "new_platform.h" | 32 | #include "new_platform.h" |
32 | #include "../application.h" | 33 | #include "../application.h" |
33 | 34 | ||
@@ -67,6 +68,19 @@ handle_account_details_button_click(UNUSED GtkButton* button, | |||
67 | } | 68 | } |
68 | 69 | ||
69 | static void | 70 | static void |
71 | handle_new_contact_button_click(UNUSED GtkButton* button, | ||
72 | gpointer user_data) | ||
73 | { | ||
74 | MESSENGER_Application *app = (MESSENGER_Application*) user_data; | ||
75 | |||
76 | hdy_flap_set_reveal_flap(HDY_FLAP(app->ui.messenger.flap_user_details), FALSE); | ||
77 | |||
78 | ui_new_contact_dialog_init(app, &(app->ui.new_contact)); | ||
79 | |||
80 | gtk_widget_show(GTK_WIDGET(app->ui.new_contact.dialog)); | ||
81 | } | ||
82 | |||
83 | static void | ||
70 | handle_new_platform_button_click(UNUSED GtkButton* button, | 84 | handle_new_platform_button_click(UNUSED GtkButton* button, |
71 | gpointer user_data) | 85 | gpointer user_data) |
72 | { | 86 | { |
@@ -76,7 +90,7 @@ handle_new_platform_button_click(UNUSED GtkButton* button, | |||
76 | 90 | ||
77 | ui_new_platform_dialog_init(app, &(app->ui.new_platform)); | 91 | ui_new_platform_dialog_init(app, &(app->ui.new_platform)); |
78 | 92 | ||
79 | gtk_widget_show(GTK_WIDGET(app->ui.new_platform.platform_dialog)); | 93 | gtk_widget_show(GTK_WIDGET(app->ui.new_platform.dialog)); |
80 | } | 94 | } |
81 | 95 | ||
82 | static void | 96 | static void |
@@ -226,6 +240,13 @@ ui_messenger_init(MESSENGER_Application *app, | |||
226 | ); | 240 | ); |
227 | 241 | ||
228 | g_signal_connect( | 242 | g_signal_connect( |
243 | handle->new_contact_button, | ||
244 | "clicked", | ||
245 | G_CALLBACK(handle_new_contact_button_click), | ||
246 | app | ||
247 | ); | ||
248 | |||
249 | g_signal_connect( | ||
229 | handle->new_platform_button, | 250 | handle->new_platform_button, |
230 | "clicked", | 251 | "clicked", |
231 | G_CALLBACK(handle_new_platform_button_click), | 252 | G_CALLBACK(handle_new_platform_button_click), |