aboutsummaryrefslogtreecommitdiff
path: root/src/ui/chat_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/chat_entry.c')
-rw-r--r--src/ui/chat_entry.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ui/chat_entry.c b/src/ui/chat_entry.c
index b314211..3de1ada 100644
--- a/src/ui/chat_entry.c
+++ b/src/ui/chat_entry.c
@@ -24,11 +24,15 @@
24 24
25#include "chat_entry.h" 25#include "chat_entry.h"
26 26
27#include "../application.h"
28
27UI_CHAT_ENTRY_Handle* 29UI_CHAT_ENTRY_Handle*
28ui_chat_entry_new(void) 30ui_chat_entry_new(MESSENGER_Application *app)
29{ 31{
30 UI_CHAT_ENTRY_Handle* handle = g_malloc(sizeof(UI_CHAT_ENTRY_Handle)); 32 UI_CHAT_ENTRY_Handle* handle = g_malloc(sizeof(UI_CHAT_ENTRY_Handle));
31 33
34 handle->chat = ui_chat_new(app);
35
32 GtkBuilder* builder = gtk_builder_new_from_file("resources/ui/chat_entry.ui"); 36 GtkBuilder* builder = gtk_builder_new_from_file("resources/ui/chat_entry.ui");
33 37
34 handle->entry_box = GTK_WIDGET( 38 handle->entry_box = GTK_WIDGET(
@@ -57,3 +61,11 @@ ui_chat_entry_new(void)
57 61
58 return handle; 62 return handle;
59} 63}
64
65void
66ui_chat_entry_delete(UI_CHAT_ENTRY_Handle *handle)
67{
68 ui_chat_delete(handle->chat);
69
70 g_free(handle);
71}