diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/chat.c | 8 | ||||
-rw-r--r-- | src/ui/chat_entry.c | 4 | ||||
-rw-r--r-- | src/ui/contact_entry.c | 6 | ||||
-rw-r--r-- | src/ui/contact_entry.h | 2 | ||||
-rw-r--r-- | src/ui/contacts.c | 6 | ||||
-rw-r--r-- | src/ui/invite_contact.c | 6 | ||||
-rw-r--r-- | src/ui/message.c | 44 | ||||
-rw-r--r-- | src/ui/message.h | 11 | ||||
-rw-r--r-- | src/ui/messenger.c | 4 | ||||
-rw-r--r-- | src/ui/new_contact.c | 4 | ||||
-rw-r--r-- | src/ui/new_group.c | 6 | ||||
-rw-r--r-- | src/ui/new_platform.c | 4 | ||||
-rw-r--r-- | src/ui/new_profile.c | 4 | ||||
-rw-r--r-- | src/ui/picker.c | 4 | ||||
-rw-r--r-- | src/ui/profile_entry.c | 6 | ||||
-rw-r--r-- | src/ui/profile_entry.h | 2 | ||||
-rw-r--r-- | src/ui/send_file.c | 4 | ||||
-rw-r--r-- | src/ui/settings.c | 4 |
18 files changed, 62 insertions, 67 deletions
diff --git a/src/ui/chat.c b/src/ui/chat.c index 3831f66..71f7ebc 100644 --- a/src/ui/chat.c +++ b/src/ui/chat.c | |||
@@ -279,8 +279,8 @@ ui_chat_new(MESSENGER_Application *app) | |||
279 | handle->messages = NULL; | 279 | handle->messages = NULL; |
280 | handle->edge_value = 0; | 280 | handle->edge_value = 0; |
281 | 281 | ||
282 | handle->builder = gtk_builder_new_from_file( | 282 | handle->builder = gtk_builder_new_from_resource( |
283 | "resources/ui/chat.ui" | 283 | application_get_resource_path(app, "ui/chat.ui") |
284 | ); | 284 | ); |
285 | 285 | ||
286 | handle->chat_box = GTK_WIDGET( | 286 | handle->chat_box = GTK_WIDGET( |
@@ -466,6 +466,7 @@ ui_chat_new(MESSENGER_Application *app) | |||
466 | } | 466 | } |
467 | 467 | ||
468 | struct IterateChatGroupClosure { | 468 | struct IterateChatGroupClosure { |
469 | MESSENGER_Application *app; | ||
469 | GHashTable *bindings; | 470 | GHashTable *bindings; |
470 | GtkListBox *listbox; | 471 | GtkListBox *listbox; |
471 | }; | 472 | }; |
@@ -480,7 +481,7 @@ iterate_ui_chat_update_group_contacts(void *cls, | |||
480 | ); | 481 | ); |
481 | 482 | ||
482 | GtkListBox *listbox = closure->listbox; | 483 | GtkListBox *listbox = closure->listbox; |
483 | UI_PROFILE_ENTRY_Handle* entry = ui_profile_entry_new(); | 484 | UI_PROFILE_ENTRY_Handle* entry = ui_profile_entry_new(closure->app); |
484 | 485 | ||
485 | const char *name = GNUNET_CHAT_contact_get_name(contact); | 486 | const char *name = GNUNET_CHAT_contact_get_name(contact); |
486 | 487 | ||
@@ -559,6 +560,7 @@ ui_chat_update(UI_CHAT_Handle *handle, | |||
559 | if (group) | 560 | if (group) |
560 | { | 561 | { |
561 | struct IterateChatGroupClosure closure; | 562 | struct IterateChatGroupClosure closure; |
563 | closure.app = app; | ||
562 | closure.bindings = app->ui.bindings; | 564 | closure.bindings = app->ui.bindings; |
563 | closure.listbox = handle->chat_contacts_listbox; | 565 | closure.listbox = handle->chat_contacts_listbox; |
564 | 566 | ||
diff --git a/src/ui/chat_entry.c b/src/ui/chat_entry.c index 7de4064..1dabec8 100644 --- a/src/ui/chat_entry.c +++ b/src/ui/chat_entry.c | |||
@@ -35,7 +35,9 @@ ui_chat_entry_new(MESSENGER_Application *app) | |||
35 | UI_CHAT_ENTRY_Handle* handle = g_malloc(sizeof(UI_CHAT_ENTRY_Handle)); | 35 | UI_CHAT_ENTRY_Handle* handle = g_malloc(sizeof(UI_CHAT_ENTRY_Handle)); |
36 | 36 | ||
37 | handle->chat = ui_chat_new(app); | 37 | handle->chat = ui_chat_new(app); |
38 | handle->builder = gtk_builder_new_from_file("resources/ui/chat_entry.ui"); | 38 | handle->builder = gtk_builder_new_from_resource( |
39 | application_get_resource_path(app, "ui/chat_entry.ui") | ||
40 | ); | ||
39 | 41 | ||
40 | handle->entry_box = GTK_WIDGET( | 42 | handle->entry_box = GTK_WIDGET( |
41 | gtk_builder_get_object(handle->builder, "entry_box") | 43 | gtk_builder_get_object(handle->builder, "entry_box") |
diff --git a/src/ui/contact_entry.c b/src/ui/contact_entry.c index cf830db..291c3b0 100644 --- a/src/ui/contact_entry.c +++ b/src/ui/contact_entry.c | |||
@@ -27,11 +27,13 @@ | |||
27 | #include "../application.h" | 27 | #include "../application.h" |
28 | 28 | ||
29 | UI_CONTACT_ENTRY_Handle* | 29 | UI_CONTACT_ENTRY_Handle* |
30 | ui_contact_entry_new(void) | 30 | ui_contact_entry_new(MESSENGER_Application *app) |
31 | { | 31 | { |
32 | UI_CONTACT_ENTRY_Handle* handle = g_malloc(sizeof(UI_CONTACT_ENTRY_Handle)); | 32 | UI_CONTACT_ENTRY_Handle* handle = g_malloc(sizeof(UI_CONTACT_ENTRY_Handle)); |
33 | 33 | ||
34 | handle->builder = gtk_builder_new_from_file("resources/ui/contact_entry.ui"); | 34 | handle->builder = gtk_builder_new_from_resource( |
35 | application_get_resource_path(app, "ui/contact_entry.ui") | ||
36 | ); | ||
35 | 37 | ||
36 | handle->entry_box = GTK_WIDGET( | 38 | handle->entry_box = GTK_WIDGET( |
37 | gtk_builder_get_object(handle->builder, "entry_box") | 39 | gtk_builder_get_object(handle->builder, "entry_box") |
diff --git a/src/ui/contact_entry.h b/src/ui/contact_entry.h index 6b39077..1ec97fc 100644 --- a/src/ui/contact_entry.h +++ b/src/ui/contact_entry.h | |||
@@ -40,7 +40,7 @@ typedef struct UI_CONTACT_ENTRY_Handle | |||
40 | } UI_CONTACT_ENTRY_Handle; | 40 | } UI_CONTACT_ENTRY_Handle; |
41 | 41 | ||
42 | UI_CONTACT_ENTRY_Handle* | 42 | UI_CONTACT_ENTRY_Handle* |
43 | ui_contact_entry_new(void); | 43 | ui_contact_entry_new(MESSENGER_Application *app); |
44 | 44 | ||
45 | void | 45 | void |
46 | ui_contact_entry_delete(UI_CONTACT_ENTRY_Handle *handle); | 46 | ui_contact_entry_delete(UI_CONTACT_ENTRY_Handle *handle); |
diff --git a/src/ui/contacts.c b/src/ui/contacts.c index fac9e62..3969446 100644 --- a/src/ui/contacts.c +++ b/src/ui/contacts.c | |||
@@ -104,7 +104,7 @@ _iterate_contacts(void *cls, | |||
104 | 104 | ||
105 | const char *key = GNUNET_CHAT_contact_get_key(contact); | 105 | const char *key = GNUNET_CHAT_contact_get_key(contact); |
106 | 106 | ||
107 | UI_CONTACT_ENTRY_Handle *entry = ui_contact_entry_new(); | 107 | UI_CONTACT_ENTRY_Handle *entry = ui_contact_entry_new(app); |
108 | gtk_list_box_prepend( | 108 | gtk_list_box_prepend( |
109 | app->ui.contacts.contacts_listbox, | 109 | app->ui.contacts.contacts_listbox, |
110 | entry->entry_box | 110 | entry->entry_box |
@@ -139,7 +139,9 @@ ui_contacts_dialog_init(MESSENGER_Application *app, | |||
139 | { | 139 | { |
140 | handle->contact_entries = NULL; | 140 | handle->contact_entries = NULL; |
141 | 141 | ||
142 | handle->builder = gtk_builder_new_from_file("resources/ui/contacts.ui"); | 142 | handle->builder = gtk_builder_new_from_resource( |
143 | application_get_resource_path(app, "ui/contacts.ui") | ||
144 | ); | ||
143 | 145 | ||
144 | handle->dialog = GTK_DIALOG( | 146 | handle->dialog = GTK_DIALOG( |
145 | gtk_builder_get_object(handle->builder, "contacts_dialog") | 147 | gtk_builder_get_object(handle->builder, "contacts_dialog") |
diff --git a/src/ui/invite_contact.c b/src/ui/invite_contact.c index 5b6a71c..8cbde0c 100644 --- a/src/ui/invite_contact.c +++ b/src/ui/invite_contact.c | |||
@@ -96,7 +96,7 @@ _iterate_contacts(void *cls, | |||
96 | 96 | ||
97 | const char *key = GNUNET_CHAT_contact_get_key(contact); | 97 | const char *key = GNUNET_CHAT_contact_get_key(contact); |
98 | 98 | ||
99 | UI_CONTACT_ENTRY_Handle *entry = ui_contact_entry_new(); | 99 | UI_CONTACT_ENTRY_Handle *entry = ui_contact_entry_new(app); |
100 | gtk_list_box_prepend( | 100 | gtk_list_box_prepend( |
101 | app->ui.invite_contact.contacts_listbox, | 101 | app->ui.invite_contact.contacts_listbox, |
102 | entry->entry_box | 102 | entry->entry_box |
@@ -131,7 +131,9 @@ ui_invite_contact_dialog_init(MESSENGER_Application *app, | |||
131 | { | 131 | { |
132 | handle->contact_entries = NULL; | 132 | handle->contact_entries = NULL; |
133 | 133 | ||
134 | handle->builder = gtk_builder_new_from_file("resources/ui/invite_contact.ui"); | 134 | handle->builder = gtk_builder_new_from_resource( |
135 | application_get_resource_path(app, "ui/invite_contact.ui") | ||
136 | ); | ||
135 | 137 | ||
136 | handle->dialog = GTK_DIALOG( | 138 | handle->dialog = GTK_DIALOG( |
137 | gtk_builder_get_object(handle->builder, "invite_contact_dialog") | 139 | gtk_builder_get_object(handle->builder, "invite_contact_dialog") |
diff --git a/src/ui/message.c b/src/ui/message.c index 47ec2aa..da6bb97 100644 --- a/src/ui/message.c +++ b/src/ui/message.c | |||
@@ -27,8 +27,8 @@ | |||
27 | #include "../application.h" | 27 | #include "../application.h" |
28 | 28 | ||
29 | UI_MESSAGE_Handle* | 29 | UI_MESSAGE_Handle* |
30 | ui_message_new(UI_MESSAGE_Type type, | 30 | ui_message_new(MESSENGER_Application *app, |
31 | UI_MESSAGE_ContentType content_type) | 31 | UI_MESSAGE_Type type) |
32 | { | 32 | { |
33 | UI_MESSAGE_Handle* handle = g_malloc(sizeof(UI_MESSAGE_Handle)); | 33 | UI_MESSAGE_Handle* handle = g_malloc(sizeof(UI_MESSAGE_Handle)); |
34 | 34 | ||
@@ -39,17 +39,19 @@ ui_message_new(UI_MESSAGE_Type type, | |||
39 | switch (handle->type) | 39 | switch (handle->type) |
40 | { | 40 | { |
41 | case UI_MESSAGE_SENT: | 41 | case UI_MESSAGE_SENT: |
42 | ui_builder_file = "resources/ui/message-sent.ui"; | 42 | ui_builder_file = "ui/message-sent.ui"; |
43 | break; | 43 | break; |
44 | case UI_MESSAGE_STATUS: | 44 | case UI_MESSAGE_STATUS: |
45 | ui_builder_file = "resources/ui/message-status.ui"; | 45 | ui_builder_file = "ui/message-status.ui"; |
46 | break; | 46 | break; |
47 | default: | 47 | default: |
48 | ui_builder_file = "resources/ui/message.ui"; | 48 | ui_builder_file = "ui/message.ui"; |
49 | break; | 49 | break; |
50 | } | 50 | } |
51 | 51 | ||
52 | handle->builder = gtk_builder_new_from_file(ui_builder_file); | 52 | handle->builder = gtk_builder_new_from_resource( |
53 | application_get_resource_path(app, ui_builder_file) | ||
54 | ); | ||
53 | 55 | ||
54 | handle->message_box = GTK_WIDGET( | 56 | handle->message_box = GTK_WIDGET( |
55 | gtk_builder_get_object(handle->builder, "message_box") | 57 | gtk_builder_get_object(handle->builder, "message_box") |
@@ -94,8 +96,8 @@ ui_message_new(UI_MESSAGE_Type type, | |||
94 | gtk_builder_get_object(handle->builder, "content_box") | 96 | gtk_builder_get_object(handle->builder, "content_box") |
95 | ); | 97 | ); |
96 | 98 | ||
97 | GtkBuilder *builder = gtk_builder_new_from_file( | 99 | GtkBuilder *builder = gtk_builder_new_from_resource( |
98 | "resources/ui/message_content.ui" | 100 | application_get_resource_path(app, "ui/message_content.ui") |
99 | ); | 101 | ); |
100 | 102 | ||
101 | handle->timestamp_label = GTK_LABEL( | 103 | handle->timestamp_label = GTK_LABEL( |
@@ -131,32 +133,6 @@ ui_message_new(UI_MESSAGE_Type type, | |||
131 | break; | 133 | break; |
132 | } | 134 | } |
133 | 135 | ||
134 | switch (content_type) | ||
135 | { | ||
136 | case UI_MESSAGE_CONTENT_TEXT: | ||
137 | gtk_stack_set_visible_child( | ||
138 | handle->content_stack, | ||
139 | GTK_WIDGET(handle->text_label) | ||
140 | ); | ||
141 | break; | ||
142 | case UI_MESSAGE_CONTENT_FILE: | ||
143 | gtk_stack_set_visible_child( | ||
144 | handle->content_stack, | ||
145 | GTK_WIDGET(handle->file_revealer) | ||
146 | ); | ||
147 | |||
148 | gtk_revealer_set_reveal_child(handle->file_revealer, TRUE); | ||
149 | break; | ||
150 | case UI_MESSAGE_CONTENT_PREVIEW: | ||
151 | gtk_stack_set_visible_child( | ||
152 | handle->content_stack, | ||
153 | GTK_WIDGET(handle->preview_drawing_area) | ||
154 | ); | ||
155 | break; | ||
156 | default: | ||
157 | break; | ||
158 | } | ||
159 | |||
160 | gtk_container_add(content_box, GTK_WIDGET( | 136 | gtk_container_add(content_box, GTK_WIDGET( |
161 | gtk_builder_get_object(builder, "message_content_box") | 137 | gtk_builder_get_object(builder, "message_content_box") |
162 | )); | 138 | )); |
diff --git a/src/ui/message.h b/src/ui/message.h index 27577a9..f5883de 100644 --- a/src/ui/message.h +++ b/src/ui/message.h | |||
@@ -41,13 +41,6 @@ typedef enum UI_MESSAGE_Type | |||
41 | UI_MESSAGE_STATUS = 2 | 41 | UI_MESSAGE_STATUS = 2 |
42 | } UI_MESSAGE_Type; | 42 | } UI_MESSAGE_Type; |
43 | 43 | ||
44 | typedef enum UI_MESSAGE_ContentType | ||
45 | { | ||
46 | UI_MESSAGE_CONTENT_TEXT = 0, | ||
47 | UI_MESSAGE_CONTENT_FILE = 1, | ||
48 | UI_MESSAGE_CONTENT_PREVIEW = 2 | ||
49 | } UI_MESSAGE_ContentType; | ||
50 | |||
51 | typedef struct UI_MESSAGE_Handle | 44 | typedef struct UI_MESSAGE_Handle |
52 | { | 45 | { |
53 | UI_MESSAGE_Type type; | 46 | UI_MESSAGE_Type type; |
@@ -75,8 +68,8 @@ typedef struct UI_MESSAGE_Handle | |||
75 | } UI_MESSAGE_Handle; | 68 | } UI_MESSAGE_Handle; |
76 | 69 | ||
77 | UI_MESSAGE_Handle* | 70 | UI_MESSAGE_Handle* |
78 | ui_message_new(UI_MESSAGE_Type type, | 71 | ui_message_new(MESSENGER_Application *app, |
79 | UI_MESSAGE_ContentType content_type); | 72 | UI_MESSAGE_Type type); |
80 | 73 | ||
81 | void | 74 | void |
82 | ui_message_update(UI_MESSAGE_Handle *handle, | 75 | ui_message_update(UI_MESSAGE_Handle *handle, |
diff --git a/src/ui/messenger.c b/src/ui/messenger.c index 0db82a0..a926332 100644 --- a/src/ui/messenger.c +++ b/src/ui/messenger.c | |||
@@ -194,7 +194,9 @@ ui_messenger_init(MESSENGER_Application *app, | |||
194 | { | 194 | { |
195 | handle->chat_entries = NULL; | 195 | handle->chat_entries = NULL; |
196 | 196 | ||
197 | handle->builder = gtk_builder_new_from_file("resources/ui/messenger.ui"); | 197 | handle->builder = gtk_builder_new_from_resource( |
198 | application_get_resource_path(app, "ui/messenger.ui") | ||
199 | ); | ||
198 | 200 | ||
199 | handle->main_window = GTK_APPLICATION_WINDOW( | 201 | handle->main_window = GTK_APPLICATION_WINDOW( |
200 | gtk_builder_get_object(handle->builder, "main_window") | 202 | gtk_builder_get_object(handle->builder, "main_window") |
diff --git a/src/ui/new_contact.c b/src/ui/new_contact.c index 7e6f9c6..147f591 100644 --- a/src/ui/new_contact.c +++ b/src/ui/new_contact.c | |||
@@ -287,7 +287,9 @@ ui_new_contact_dialog_init(MESSENGER_Application *app, | |||
287 | handle->video = zbar_video_create(); | 287 | handle->video = zbar_video_create(); |
288 | handle->scanner = zbar_image_scanner_create(); | 288 | handle->scanner = zbar_image_scanner_create(); |
289 | 289 | ||
290 | handle->builder = gtk_builder_new_from_file("resources/ui/new_contact.ui"); | 290 | handle->builder = gtk_builder_new_from_resource( |
291 | application_get_resource_path(app, "ui/new_contact.ui") | ||
292 | ); | ||
291 | 293 | ||
292 | handle->dialog = GTK_DIALOG( | 294 | handle->dialog = GTK_DIALOG( |
293 | gtk_builder_get_object(handle->builder, "new_contact_dialog") | 295 | gtk_builder_get_object(handle->builder, "new_contact_dialog") |
diff --git a/src/ui/new_group.c b/src/ui/new_group.c index e161fbb..dbad66b 100644 --- a/src/ui/new_group.c +++ b/src/ui/new_group.c | |||
@@ -163,7 +163,7 @@ _iterate_contacts(void *cls, | |||
163 | 163 | ||
164 | const char *key = GNUNET_CHAT_contact_get_key(contact); | 164 | const char *key = GNUNET_CHAT_contact_get_key(contact); |
165 | 165 | ||
166 | UI_CONTACT_ENTRY_Handle *entry = ui_contact_entry_new(); | 166 | UI_CONTACT_ENTRY_Handle *entry = ui_contact_entry_new(app); |
167 | gtk_list_box_prepend( | 167 | gtk_list_box_prepend( |
168 | app->ui.new_group.contacts_listbox, | 168 | app->ui.new_group.contacts_listbox, |
169 | entry->entry_box | 169 | entry->entry_box |
@@ -198,7 +198,9 @@ ui_new_group_dialog_init(MESSENGER_Application *app, | |||
198 | { | 198 | { |
199 | handle->contact_entries = NULL; | 199 | handle->contact_entries = NULL; |
200 | 200 | ||
201 | handle->builder = gtk_builder_new_from_file("resources/ui/new_group.ui"); | 201 | handle->builder = gtk_builder_new_from_resource( |
202 | application_get_resource_path(app, "ui/new_group.ui") | ||
203 | ); | ||
202 | 204 | ||
203 | handle->dialog = GTK_DIALOG( | 205 | handle->dialog = GTK_DIALOG( |
204 | gtk_builder_get_object(handle->builder, "new_group_dialog") | 206 | gtk_builder_get_object(handle->builder, "new_group_dialog") |
diff --git a/src/ui/new_platform.c b/src/ui/new_platform.c index dad4ad1..544b7c7 100644 --- a/src/ui/new_platform.c +++ b/src/ui/new_platform.c | |||
@@ -100,7 +100,9 @@ void | |||
100 | ui_new_platform_dialog_init(MESSENGER_Application *app, | 100 | ui_new_platform_dialog_init(MESSENGER_Application *app, |
101 | UI_NEW_PLATFORM_Handle *handle) | 101 | UI_NEW_PLATFORM_Handle *handle) |
102 | { | 102 | { |
103 | handle->builder = gtk_builder_new_from_file("resources/ui/new_platform.ui"); | 103 | handle->builder = gtk_builder_new_from_resource( |
104 | application_get_resource_path(app, "ui/new_platform.ui") | ||
105 | ); | ||
104 | 106 | ||
105 | handle->dialog = GTK_DIALOG( | 107 | handle->dialog = GTK_DIALOG( |
106 | gtk_builder_get_object(handle->builder, "new_platform_dialog") | 108 | gtk_builder_get_object(handle->builder, "new_platform_dialog") |
diff --git a/src/ui/new_profile.c b/src/ui/new_profile.c index d845fdf..d1d0274 100644 --- a/src/ui/new_profile.c +++ b/src/ui/new_profile.c | |||
@@ -77,7 +77,9 @@ void | |||
77 | ui_new_profile_dialog_init(MESSENGER_Application *app, | 77 | ui_new_profile_dialog_init(MESSENGER_Application *app, |
78 | UI_NEW_PROFILE_Handle *handle) | 78 | UI_NEW_PROFILE_Handle *handle) |
79 | { | 79 | { |
80 | handle->builder = gtk_builder_new_from_file("resources/ui/new_profile.ui"); | 80 | handle->builder = gtk_builder_new_from_resource( |
81 | application_get_resource_path(app, "ui/new_profile.ui") | ||
82 | ); | ||
81 | 83 | ||
82 | handle->dialog = GTK_DIALOG( | 84 | handle->dialog = GTK_DIALOG( |
83 | gtk_builder_get_object(handle->builder, "new_profile_dialog") | 85 | gtk_builder_get_object(handle->builder, "new_profile_dialog") |
diff --git a/src/ui/picker.c b/src/ui/picker.c index 4a5d205..bdaa713 100644 --- a/src/ui/picker.c +++ b/src/ui/picker.c | |||
@@ -97,8 +97,8 @@ ui_picker_new(UNUSED MESSENGER_Application *app, | |||
97 | { | 97 | { |
98 | UI_PICKER_Handle *handle = g_malloc(sizeof(UI_PICKER_Handle)); | 98 | UI_PICKER_Handle *handle = g_malloc(sizeof(UI_PICKER_Handle)); |
99 | 99 | ||
100 | handle->builder = gtk_builder_new_from_file( | 100 | handle->builder = gtk_builder_new_from_resource( |
101 | "resources/ui/picker.ui" | 101 | application_get_resource_path(app, "ui/picker.ui") |
102 | ); | 102 | ); |
103 | 103 | ||
104 | handle->picker_box = GTK_WIDGET( | 104 | handle->picker_box = GTK_WIDGET( |
diff --git a/src/ui/profile_entry.c b/src/ui/profile_entry.c index 4a03f94..c2b232f 100644 --- a/src/ui/profile_entry.c +++ b/src/ui/profile_entry.c | |||
@@ -27,11 +27,13 @@ | |||
27 | #include "../application.h" | 27 | #include "../application.h" |
28 | 28 | ||
29 | UI_PROFILE_ENTRY_Handle* | 29 | UI_PROFILE_ENTRY_Handle* |
30 | ui_profile_entry_new(void) | 30 | ui_profile_entry_new(MESSENGER_Application *app) |
31 | { | 31 | { |
32 | UI_PROFILE_ENTRY_Handle* handle = g_malloc(sizeof(UI_PROFILE_ENTRY_Handle)); | 32 | UI_PROFILE_ENTRY_Handle* handle = g_malloc(sizeof(UI_PROFILE_ENTRY_Handle)); |
33 | 33 | ||
34 | handle->builder = gtk_builder_new_from_file("resources/ui/profile_entry.ui"); | 34 | handle->builder = gtk_builder_new_from_resource( |
35 | application_get_resource_path(app, "ui/profile_entry.ui") | ||
36 | ); | ||
35 | 37 | ||
36 | handle->entry_box = GTK_WIDGET( | 38 | handle->entry_box = GTK_WIDGET( |
37 | gtk_builder_get_object(handle->builder, "entry_box") | 39 | gtk_builder_get_object(handle->builder, "entry_box") |
diff --git a/src/ui/profile_entry.h b/src/ui/profile_entry.h index 6196737..92d2fd0 100644 --- a/src/ui/profile_entry.h +++ b/src/ui/profile_entry.h | |||
@@ -38,7 +38,7 @@ typedef struct UI_PROFILE_ENTRY_Handle | |||
38 | } UI_PROFILE_ENTRY_Handle; | 38 | } UI_PROFILE_ENTRY_Handle; |
39 | 39 | ||
40 | UI_PROFILE_ENTRY_Handle* | 40 | UI_PROFILE_ENTRY_Handle* |
41 | ui_profile_entry_new(void); | 41 | ui_profile_entry_new(MESSENGER_Application *app); |
42 | 42 | ||
43 | void | 43 | void |
44 | ui_profile_entry_delete(UI_PROFILE_ENTRY_Handle *handle); | 44 | ui_profile_entry_delete(UI_PROFILE_ENTRY_Handle *handle); |
diff --git a/src/ui/send_file.c b/src/ui/send_file.c index 0d0c04b..4b9643c 100644 --- a/src/ui/send_file.c +++ b/src/ui/send_file.c | |||
@@ -231,7 +231,9 @@ void | |||
231 | ui_send_file_dialog_init(MESSENGER_Application *app, | 231 | ui_send_file_dialog_init(MESSENGER_Application *app, |
232 | UI_SEND_FILE_Handle *handle) | 232 | UI_SEND_FILE_Handle *handle) |
233 | { | 233 | { |
234 | handle->builder = gtk_builder_new_from_file("resources/ui/send_file.ui"); | 234 | handle->builder = gtk_builder_new_from_resource( |
235 | application_get_resource_path(app, "ui/send_file.ui") | ||
236 | ); | ||
235 | 237 | ||
236 | handle->dialog = GTK_DIALOG( | 238 | handle->dialog = GTK_DIALOG( |
237 | gtk_builder_get_object(handle->builder, "send_file_dialog") | 239 | gtk_builder_get_object(handle->builder, "send_file_dialog") |
diff --git a/src/ui/settings.c b/src/ui/settings.c index ca58270..6863968 100644 --- a/src/ui/settings.c +++ b/src/ui/settings.c | |||
@@ -37,7 +37,9 @@ void | |||
37 | ui_settings_dialog_init(MESSENGER_Application *app, | 37 | ui_settings_dialog_init(MESSENGER_Application *app, |
38 | UI_SETTINGS_Handle *handle) | 38 | UI_SETTINGS_Handle *handle) |
39 | { | 39 | { |
40 | handle->builder = gtk_builder_new_from_file("resources/ui/settings.ui"); | 40 | handle->builder = gtk_builder_new_from_resource( |
41 | application_get_resource_path(app, "ui/settings.ui") | ||
42 | ); | ||
41 | 43 | ||
42 | handle->dialog = HDY_PREFERENCES_WINDOW( | 44 | handle->dialog = HDY_PREFERENCES_WINDOW( |
43 | gtk_builder_get_object(handle->builder, "settings_dialog") | 45 | gtk_builder_get_object(handle->builder, "settings_dialog") |