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.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ui/chat_entry.c b/src/ui/chat_entry.c
index 3de1ada..21b793e 100644
--- a/src/ui/chat_entry.c
+++ b/src/ui/chat_entry.c
@@ -32,31 +32,30 @@ ui_chat_entry_new(MESSENGER_Application *app)
32 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));
33 33
34 handle->chat = ui_chat_new(app); 34 handle->chat = ui_chat_new(app);
35 35 handle->builder = gtk_builder_new_from_file("resources/ui/chat_entry.ui");
36 GtkBuilder* builder = gtk_builder_new_from_file("resources/ui/chat_entry.ui");
37 36
38 handle->entry_box = GTK_WIDGET( 37 handle->entry_box = GTK_WIDGET(
39 gtk_builder_get_object(builder, "entry_box") 38 gtk_builder_get_object(handle->builder, "entry_box")
40 ); 39 );
41 40
42 handle->entry_avatar = HDY_AVATAR( 41 handle->entry_avatar = HDY_AVATAR(
43 gtk_builder_get_object(builder, "entry_avatar") 42 gtk_builder_get_object(handle->builder, "entry_avatar")
44 ); 43 );
45 44
46 handle->title_label = GTK_LABEL( 45 handle->title_label = GTK_LABEL(
47 gtk_builder_get_object(builder, "title_label") 46 gtk_builder_get_object(handle->builder, "title_label")
48 ); 47 );
49 48
50 handle->timestamp_label = GTK_LABEL( 49 handle->timestamp_label = GTK_LABEL(
51 gtk_builder_get_object(builder, "timestamp_label") 50 gtk_builder_get_object(handle->builder, "timestamp_label")
52 ); 51 );
53 52
54 handle->text_label = GTK_LABEL( 53 handle->text_label = GTK_LABEL(
55 gtk_builder_get_object(builder, "text_label") 54 gtk_builder_get_object(handle->builder, "text_label")
56 ); 55 );
57 56
58 handle->read_receipt_image = GTK_IMAGE( 57 handle->read_receipt_image = GTK_IMAGE(
59 gtk_builder_get_object(builder, "read_receipt_image") 58 gtk_builder_get_object(handle->builder, "read_receipt_image")
60 ); 59 );
61 60
62 return handle; 61 return handle;
@@ -67,5 +66,7 @@ ui_chat_entry_delete(UI_CHAT_ENTRY_Handle *handle)
67{ 66{
68 ui_chat_delete(handle->chat); 67 ui_chat_delete(handle->chat);
69 68
69 g_object_unref(handle->builder);
70
70 g_free(handle); 71 g_free(handle);
71} 72}