summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-07-30 15:04:48 +0200
committerVictor Kareh <[email protected]>2018-08-01 15:55:49 -0400
commit70fd47058ace7814ec7f83243a62254e887f88ab (patch)
treea4b0eae23f43aad85b8abe2270173fcb3044eb91
parent8734d0e6e3f55598e3409c1e8d8b5a9b749ed5d6 (diff)
downloadeom-70fd47058ace7814ec7f83243a62254e887f88ab.tar.bz2
eom-70fd47058ace7814ec7f83243a62254e887f88ab.tar.xz
Load eom-image-properties-dialog.ui with a gresource
-rw-r--r--data/Makefile.am2
-rw-r--r--src/eom-properties-dialog.c10
-rw-r--r--src/eom.gresource.xml1
3 files changed, 6 insertions, 7 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 1de120d..ef52670 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -22,7 +22,6 @@ gsettings_SCHEMAS = org.mate.eom.gschema.xml
uidir = $(pkgdatadir)
ui_DATA = \
- eom-image-properties-dialog.ui \
eom-multiple-save-as-dialog.ui \
eom-preferences-dialog.ui \
eom-toolbar.xml
@@ -33,6 +32,7 @@ pkgconfig_DATA = eom.pc
EXTRA_DIST = \
$(ui_DATA) \
eom.css \
+ eom-image-properties-dialog.ui \
eom-ui.xml \
metadata-sidebar.ui \
$(DESKTOP_IN_FILES) \
diff --git a/src/eom-properties-dialog.c b/src/eom-properties-dialog.c
index be376c9..a6c3cf0 100644
--- a/src/eom-properties-dialog.c
+++ b/src/eom-properties-dialog.c
@@ -569,13 +569,11 @@ eom_properties_dialog_class_init (EomPropertiesDialogClass *klass)
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
- gchar* data;
- gsize data_size;
- g_file_get_contents(g_build_filename (EOM_DATA_DIR, "eom-image-properties-dialog.ui", NULL), &data, &data_size, NULL);
- GBytes *bytes = g_bytes_new_static(data, data_size);
- gtk_widget_class_set_template((GtkWidgetClass *) klass, bytes);
-
GtkWidgetClass *wklass = (GtkWidgetClass*) klass;
+
+ gtk_widget_class_set_template_from_resource (wklass,
+ "/org/mate/eom/ui/eom-image-properties-dialog.ui");
+
gtk_widget_class_bind_template_child_private(wklass,
EomPropertiesDialog,
notebook);
diff --git a/src/eom.gresource.xml b/src/eom.gresource.xml
index a4a9fe3..8a10c9f 100644
--- a/src/eom.gresource.xml
+++ b/src/eom.gresource.xml
@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/org/mate/eom/ui">
<file>eom.css</file>
+ <file compressed="true" preprocess="xml-stripblanks">eom-image-properties-dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks">eom-ui.xml</file>
<file compressed="true" preprocess="xml-stripblanks">metadata-sidebar.ui</file>
</gresource>