diff options
Diffstat (limited to 'src/ui/messenger.c')
-rw-r--r-- | src/ui/messenger.c | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/src/ui/messenger.c b/src/ui/messenger.c index 829d31a..059927a 100644 --- a/src/ui/messenger.c +++ b/src/ui/messenger.c | |||
@@ -24,8 +24,8 @@ | |||
24 | 24 | ||
25 | #include "messenger.h" | 25 | #include "messenger.h" |
26 | 26 | ||
27 | void handle_user_details_button_click(UI_UNUSED GtkButton* button, | 27 | void handle_flap_via_button_click(UI_UNUSED GtkButton* button, |
28 | gpointer user_data) | 28 | gpointer user_data) |
29 | { | 29 | { |
30 | HdyFlap* flap = HDY_FLAP(user_data); | 30 | HdyFlap* flap = HDY_FLAP(user_data); |
31 | 31 | ||
@@ -131,14 +131,14 @@ ui_messenger_init(struct UI_MESSENGER_Handle *handle) | |||
131 | g_signal_connect( | 131 | g_signal_connect( |
132 | handle->user_details_button, | 132 | handle->user_details_button, |
133 | "clicked", | 133 | "clicked", |
134 | G_CALLBACK(handle_user_details_button_click), | 134 | G_CALLBACK(handle_flap_via_button_click), |
135 | handle->flap_user_details | 135 | handle->flap_user_details |
136 | ); | 136 | ); |
137 | 137 | ||
138 | g_signal_connect( | 138 | g_signal_connect( |
139 | handle->hide_user_details_button, | 139 | handle->hide_user_details_button, |
140 | "clicked", | 140 | "clicked", |
141 | G_CALLBACK(handle_user_details_button_click), | 141 | G_CALLBACK(handle_flap_via_button_click), |
142 | handle->flap_user_details | 142 | handle->flap_user_details |
143 | ); | 143 | ); |
144 | 144 | ||
@@ -184,6 +184,40 @@ ui_messenger_init(struct UI_MESSENGER_Handle *handle) | |||
184 | G_BINDING_INVERT_BOOLEAN | 184 | G_BINDING_INVERT_BOOLEAN |
185 | ); | 185 | ); |
186 | 186 | ||
187 | handle->flap_chat_details = HDY_FLAP( | ||
188 | gtk_builder_get_object(builder, "flap_chat_details") | ||
189 | ); | ||
190 | |||
191 | handle->chat_title = GTK_LABEL( | ||
192 | gtk_builder_get_object(builder, "chat_title") | ||
193 | ); | ||
194 | |||
195 | handle->chat_subtitle = GTK_LABEL( | ||
196 | gtk_builder_get_object(builder, "chat_subtitle") | ||
197 | ); | ||
198 | |||
199 | handle->chat_details_button = GTK_BUTTON( | ||
200 | gtk_builder_get_object(builder, "chat_details_button") | ||
201 | ); | ||
202 | |||
203 | handle->hide_chat_details_button = GTK_BUTTON( | ||
204 | gtk_builder_get_object(builder, "hide_chat_details_button") | ||
205 | ); | ||
206 | |||
207 | g_signal_connect( | ||
208 | handle->chat_details_button, | ||
209 | "clicked", | ||
210 | G_CALLBACK(handle_flap_via_button_click), | ||
211 | handle->flap_chat_details | ||
212 | ); | ||
213 | |||
214 | g_signal_connect( | ||
215 | handle->hide_chat_details_button, | ||
216 | "clicked", | ||
217 | G_CALLBACK(handle_flap_via_button_click), | ||
218 | handle->flap_chat_details | ||
219 | ); | ||
220 | |||
187 | gtk_widget_show(GTK_WIDGET(handle->main_window)); | 221 | gtk_widget_show(GTK_WIDGET(handle->main_window)); |
188 | 222 | ||
189 | g_signal_connect(handle->main_window, "destroy", G_CALLBACK(gtk_main_quit), NULL); | 223 | g_signal_connect(handle->main_window, "destroy", G_CALLBACK(gtk_main_quit), NULL); |