diff options
Diffstat (limited to 'src/ui/messenger.c')
-rw-r--r-- | src/ui/messenger.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/ui/messenger.c b/src/ui/messenger.c index b4d12af..e6ea657 100644 --- a/src/ui/messenger.c +++ b/src/ui/messenger.c | |||
@@ -39,9 +39,10 @@ | |||
39 | #include "../application.h" | 39 | #include "../application.h" |
40 | 40 | ||
41 | static gboolean | 41 | static gboolean |
42 | _flap_reveal_switch(gpointer user_data) | 42 | _flap_user_details_reveal_switch(gpointer user_data) |
43 | { | 43 | { |
44 | HdyFlap* flap = HDY_FLAP(user_data); | 44 | UI_MESSENGER_Handle *handle = (UI_MESSENGER_Handle*) user_data; |
45 | HdyFlap* flap = handle->flap_user_details; | ||
45 | 46 | ||
46 | if (TRUE == hdy_flap_get_reveal_flap(flap)) { | 47 | if (TRUE == hdy_flap_get_reveal_flap(flap)) { |
47 | hdy_flap_set_reveal_flap(flap, FALSE); | 48 | hdy_flap_set_reveal_flap(flap, FALSE); |
@@ -49,14 +50,21 @@ _flap_reveal_switch(gpointer user_data) | |||
49 | hdy_flap_set_reveal_flap(flap, TRUE); | 50 | hdy_flap_set_reveal_flap(flap, TRUE); |
50 | } | 51 | } |
51 | 52 | ||
53 | gtk_widget_set_sensitive(GTK_WIDGET(handle->chats_listbox), TRUE); | ||
52 | return FALSE; | 54 | return FALSE; |
53 | } | 55 | } |
54 | 56 | ||
55 | static void | 57 | static void |
56 | handle_flap_via_button_click(UNUSED GtkButton* button, | 58 | handle_user_details_via_button_click(UNUSED GtkButton* button, |
57 | gpointer user_data) | 59 | gpointer user_data) |
58 | { | 60 | { |
59 | g_idle_add(G_SOURCE_FUNC(_flap_reveal_switch), user_data); | 61 | UI_MESSENGER_Handle *handle = (UI_MESSENGER_Handle*) user_data; |
62 | |||
63 | gtk_widget_set_sensitive(GTK_WIDGET(handle->chats_listbox), FALSE); | ||
64 | g_idle_add( | ||
65 | G_SOURCE_FUNC(_flap_user_details_reveal_switch), | ||
66 | handle | ||
67 | ); | ||
60 | } | 68 | } |
61 | 69 | ||
62 | static void | 70 | static void |
@@ -375,8 +383,8 @@ ui_messenger_init(MESSENGER_Application *app, | |||
375 | g_signal_connect( | 383 | g_signal_connect( |
376 | handle->hide_user_details_button, | 384 | handle->hide_user_details_button, |
377 | "clicked", | 385 | "clicked", |
378 | G_CALLBACK(handle_flap_via_button_click), | 386 | G_CALLBACK(handle_user_details_via_button_click), |
379 | handle->flap_user_details | 387 | handle |
380 | ); | 388 | ); |
381 | 389 | ||
382 | handle->lobby_button = GTK_BUTTON( | 390 | handle->lobby_button = GTK_BUTTON( |
@@ -497,8 +505,8 @@ ui_messenger_init(MESSENGER_Application *app, | |||
497 | g_signal_connect( | 505 | g_signal_connect( |
498 | handle->user_details_button, | 506 | handle->user_details_button, |
499 | "clicked", | 507 | "clicked", |
500 | G_CALLBACK(handle_flap_via_button_click), | 508 | G_CALLBACK(handle_user_details_via_button_click), |
501 | handle->flap_user_details | 509 | handle |
502 | ); | 510 | ); |
503 | 511 | ||
504 | handle->chats_search = GTK_SEARCH_ENTRY( | 512 | handle->chats_search = GTK_SEARCH_ENTRY( |