diff options
Diffstat (limited to 'src/ui/chat_entry.c')
-rw-r--r-- | src/ui/chat_entry.c | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/src/ui/chat_entry.c b/src/ui/chat_entry.c index f538978..7ba67d2 100644 --- a/src/ui/chat_entry.c +++ b/src/ui/chat_entry.c | |||
@@ -71,7 +71,7 @@ ui_chat_entry_new(MESSENGER_Application *app) | |||
71 | void | 71 | void |
72 | ui_chat_entry_update(UI_CHAT_ENTRY_Handle *handle, | 72 | ui_chat_entry_update(UI_CHAT_ENTRY_Handle *handle, |
73 | MESSENGER_Application *app, | 73 | MESSENGER_Application *app, |
74 | const struct GNUNET_CHAT_Context *context) | 74 | struct GNUNET_CHAT_Context *context) |
75 | { | 75 | { |
76 | const struct GNUNET_CHAT_Contact* contact; | 76 | const struct GNUNET_CHAT_Contact* contact; |
77 | const struct GNUNET_CHAT_Group* group; | 77 | const struct GNUNET_CHAT_Group* group; |
@@ -107,9 +107,6 @@ ui_chat_entry_update(UI_CHAT_ENTRY_Handle *handle, | |||
107 | 107 | ||
108 | ui_chat_update(handle->chat, app, context); | 108 | ui_chat_update(handle->chat, app, context); |
109 | 109 | ||
110 | hdy_avatar_set_text(handle->chat->chat_avatar, title? title : ""); | ||
111 | hdy_avatar_set_icon_name(handle->chat->chat_avatar, icon); | ||
112 | |||
113 | if (!(handle->chat->messages)) | 110 | if (!(handle->chat->messages)) |
114 | return; | 111 | return; |
115 | 112 | ||
@@ -160,3 +157,34 @@ ui_chat_entry_delete(UI_CHAT_ENTRY_Handle *handle) | |||
160 | 157 | ||
161 | g_free(handle); | 158 | g_free(handle); |
162 | } | 159 | } |
160 | |||
161 | void | ||
162 | ui_chat_entry_dispose(UI_CHAT_ENTRY_Handle *handle, | ||
163 | MESSENGER_Application *app) | ||
164 | { | ||
165 | UI_MESSENGER_Handle *ui = &(app->ui.messenger); | ||
166 | |||
167 | ui->chat_entries = g_list_remove(ui->chat_entries, handle); | ||
168 | |||
169 | gtk_container_remove( | ||
170 | GTK_CONTAINER(ui->chats_listbox), | ||
171 | gtk_widget_get_parent(handle->entry_box) | ||
172 | ); | ||
173 | |||
174 | struct GNUNET_CHAT_Context *context = (struct GNUNET_CHAT_Context*) ( | ||
175 | g_object_get_qdata( | ||
176 | G_OBJECT(handle->chat->send_text_view), | ||
177 | app->quarks.data | ||
178 | ) | ||
179 | ); | ||
180 | |||
181 | if (context) | ||
182 | GNUNET_CHAT_context_set_user_pointer(context, NULL); | ||
183 | |||
184 | gtk_container_remove( | ||
185 | GTK_CONTAINER(ui->chats_stack), | ||
186 | handle->chat->chat_box | ||
187 | ); | ||
188 | |||
189 | ui_chat_entry_delete(handle); | ||
190 | } | ||