res: move ui file to resources

This commit is contained in:
Jeremy Attali 2019-12-16 21:40:31 -05:00
parent 58b9c55b3c
commit 91976ee295
3 changed files with 3 additions and 1 deletions

View File

@ -2,5 +2,6 @@
<gresources>
<gresource prefix="/swappy">
<file>style/popover.css</file>
<file>swappy.ui</file>
</gresource>
</gresources>

View File

@ -214,7 +214,8 @@ static bool load_layout(struct swappy_state *state) {
/* Construct a GtkBuilder instance and load our UI description */
builder = gtk_builder_new();
if (gtk_builder_add_from_file(builder, "swappy.ui", &error) == 0) {
if (gtk_builder_add_from_resource(builder, "/swappy/swappy.ui", &error) ==
0) {
g_printerr("Error loading file: %s", error->message);
g_clear_error(&error);
return false;