diff options
Diffstat (limited to 'src/ui/messenger.c')
-rw-r--r-- | src/ui/messenger.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ui/messenger.c b/src/ui/messenger.c index 8842385..314edb4 100644 --- a/src/ui/messenger.c +++ b/src/ui/messenger.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include "message.h" | 31 | #include "message.h" |
32 | #include "new_contact.h" | 32 | #include "new_contact.h" |
33 | #include "new_platform.h" | 33 | #include "new_platform.h" |
34 | #include "settings.h" | ||
35 | |||
34 | #include "../application.h" | 36 | #include "../application.h" |
35 | 37 | ||
36 | static void | 38 | static void |
@@ -108,6 +110,19 @@ handle_contacts_button_click(UNUSED GtkButton* button, | |||
108 | } | 110 | } |
109 | 111 | ||
110 | static void | 112 | static void |
113 | handle_settings_button_click(UNUSED GtkButton* button, | ||
114 | gpointer user_data) | ||
115 | { | ||
116 | MESSENGER_Application *app = (MESSENGER_Application*) user_data; | ||
117 | |||
118 | hdy_flap_set_reveal_flap(HDY_FLAP(app->ui.messenger.flap_user_details), FALSE); | ||
119 | |||
120 | ui_settings_dialog_init(app, &(app->ui.settings)); | ||
121 | |||
122 | gtk_widget_show(GTK_WIDGET(app->ui.settings.dialog)); | ||
123 | } | ||
124 | |||
125 | static void | ||
111 | handle_chats_listbox_row_activated(UNUSED GtkListBox* listbox, | 126 | handle_chats_listbox_row_activated(UNUSED GtkListBox* listbox, |
112 | GtkListBoxRow* row, | 127 | GtkListBoxRow* row, |
113 | gpointer user_data) | 128 | gpointer user_data) |
@@ -282,6 +297,13 @@ ui_messenger_init(MESSENGER_Application *app, | |||
282 | app | 297 | app |
283 | ); | 298 | ); |
284 | 299 | ||
300 | g_signal_connect( | ||
301 | handle->settings_button, | ||
302 | "clicked", | ||
303 | G_CALLBACK(handle_settings_button_click), | ||
304 | app | ||
305 | ); | ||
306 | |||
285 | handle->user_details_button = GTK_BUTTON( | 307 | handle->user_details_button = GTK_BUTTON( |
286 | gtk_builder_get_object(handle->builder, "user_details_button") | 308 | gtk_builder_get_object(handle->builder, "user_details_button") |
287 | ); | 309 | ); |