diff options
author | rbuj <[email protected]> | 2019-05-02 12:21:04 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-05-04 21:11:48 +0200 |
commit | b3605bee34d6b62eb4e5057bbad40513bdc600df (patch) | |
tree | ae1e2c3c91b19dca750974667b3d265b88c10557 /src/math-preferences.c | |
parent | d97327cd31de7d47054ee4caa299de51d9b4349e (diff) | |
download | mate-calc-b3605bee34d6b62eb4e5057bbad40513bdc600df.tar.bz2 mate-calc-b3605bee34d6b62eb4e5057bbad40513bdc600df.tar.xz |
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
Diffstat (limited to 'src/math-preferences.c')
-rw-r--r-- | src/math-preferences.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |