diff options
Diffstat (limited to 'src/event.c')
-rw-r--r-- | src/event.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/event.c b/src/event.c index 4b3e580..193ecfa 100644 --- a/src/event.c +++ b/src/event.c | |||
@@ -91,15 +91,9 @@ _add_new_chat_entry(MESSENGER_Application *app, | |||
91 | gtk_container_add(GTK_CONTAINER(ui->chats_listbox), entry->entry_box); | 91 | gtk_container_add(GTK_CONTAINER(ui->chats_listbox), entry->entry_box); |
92 | GNUNET_CHAT_context_set_user_pointer(context, entry); | 92 | GNUNET_CHAT_context_set_user_pointer(context, entry); |
93 | 93 | ||
94 | char context_id [9]; | 94 | gtk_container_add( |
95 | g_snprintf(context_id, sizeof(context_id), "%08lx", (gulong) context); | 95 | GTK_CONTAINER(ui->chats_stack), |
96 | 96 | entry->chat->chat_box | |
97 | gtk_widget_set_name(entry->entry_box, context_id); | ||
98 | |||
99 | gtk_stack_add_named( | ||
100 | ui->chats_stack, | ||
101 | entry->chat->chat_box, | ||
102 | context_id | ||
103 | ); | 97 | ); |
104 | 98 | ||
105 | g_hash_table_insert( | 99 | g_hash_table_insert( |
@@ -114,7 +108,15 @@ _add_new_chat_entry(MESSENGER_Application *app, | |||
114 | gtk_widget_get_parent(entry->entry_box) | 108 | gtk_widget_get_parent(entry->entry_box) |
115 | ); | 109 | ); |
116 | 110 | ||
111 | g_hash_table_insert( | ||
112 | app->ui.bindings, | ||
113 | row, | ||
114 | entry | ||
115 | ); | ||
116 | |||
117 | gtk_list_box_select_row(ui->chats_listbox, row); | 117 | gtk_list_box_select_row(ui->chats_listbox, row); |
118 | gtk_list_box_invalidate_filter(ui->chats_listbox); | ||
119 | |||
118 | gtk_widget_activate(GTK_WIDGET(row)); | 120 | gtk_widget_activate(GTK_WIDGET(row)); |
119 | } | 121 | } |
120 | 122 | ||