From b3605bee34d6b62eb4e5057bbad40513bdc600df Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 2 May 2019 12:21:04 +0200 Subject: Use gresources for UI files .ui files are combined into a binary resource bundle, and they are marked as compressed, so they will be automatically uncompressed when the resource is used. REF https://developer.gnome.org/gio/stable/GResource.html --- src/math-preferences.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/math-preferences.c') diff --git a/src/math-preferences.c b/src/math-preferences.c index 1ba91cc..adbd58e 100644 --- a/src/math-preferences.c +++ b/src/math-preferences.c @@ -28,7 +28,7 @@ struct MathPreferencesDialogPrivate G_DEFINE_TYPE_WITH_PRIVATE (MathPreferencesDialog, math_preferences, GTK_TYPE_DIALOG); -#define UI_DIALOGS_FILE UI_DIR "/preferences.ui" +#define UI_DIALOGS_RESOURCE_PATH "/org/mate/calculator/ui/preferences.ui" #define GET_WIDGET(ui, name) \ GTK_WIDGET(gtk_builder_get_object(ui, name)) @@ -229,7 +229,7 @@ create_gui(MathPreferencesDialog *dialog) // FIXME: Handle errors dialog->priv->ui = gtk_builder_new(); - gtk_builder_add_objects_from_file(dialog->priv->ui, UI_DIALOGS_FILE, objects, &error); + gtk_builder_add_objects_from_resource(dialog->priv->ui, UI_DIALOGS_RESOURCE_PATH, objects, &error); if (error) g_warning("Error loading preferences UI: %s", error->message); g_clear_error(&error); -- cgit v1.2.1