aboutsummaryrefslogtreecommitdiff
path: root/src/ui/chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/chat.c')
-rw-r--r--src/ui/chat.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/ui/chat.c b/src/ui/chat.c
index c45b7b5..a8547ba 100644
--- a/src/ui/chat.c
+++ b/src/ui/chat.c
@@ -47,15 +47,30 @@ handle_flap_via_button_click(UNUSED GtkButton *button,
47} 47}
48 48
49static void 49static void
50handle_chat_contacts_listbox_row_activated(UNUSED GtkListBox *listbox, 50handle_chat_contacts_listbox_row_activated(GtkListBox *listbox,
51 GtkListBoxRow *row, 51 GtkListBoxRow *row,
52 gpointer user_data) 52 gpointer user_data)
53{ 53{
54 MESSENGER_Application *app = (MESSENGER_Application*) user_data; 54 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
55 55
56 GtkTextView *text_view = GTK_TEXT_VIEW(
57 g_hash_table_lookup(app->ui.bindings, listbox)
58 );
59
60 if (!text_view)
61 return;
62
56 if (!gtk_list_box_row_get_selectable(row)) 63 if (!gtk_list_box_row_get_selectable(row))
57 { 64 {
58 //g_idle_add(G_SOURCE_FUNC(_open_new_contact_dialog), app); 65 ui_invite_contact_dialog_init(app, &(app->ui.invite_contact));
66
67 g_hash_table_insert(
68 app->ui.bindings,
69 app->ui.invite_contact.contacts_listbox,
70 text_view
71 );
72
73 gtk_widget_show(GTK_WIDGET(app->ui.invite_contact.dialog));
59 return; 74 return;
60 } 75 }
61 76
@@ -375,6 +390,12 @@ ui_chat_new(MESSENGER_Application *app)
375 390
376 g_hash_table_insert( 391 g_hash_table_insert(
377 app->ui.bindings, 392 app->ui.bindings,
393 handle->chat_contacts_listbox,
394 handle->send_text_view
395 );
396
397 g_hash_table_insert(
398 app->ui.bindings,
378 handle->attach_file_button, 399 handle->attach_file_button,
379 handle->send_text_view 400 handle->send_text_view
380 ); 401 );