Skip to content

Commit 70fd470

Browse files
raveit65vkareh
authored andcommitted
Load eom-image-properties-dialog.ui with a gresource
1 parent 8734d0e commit 70fd470

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

‎data/Makefile.am‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ gsettings_SCHEMAS = org.mate.eom.gschema.xml
2222

2323
uidir = $(pkgdatadir)
2424
ui_DATA = \
25-
eom-image-properties-dialog.ui \
2625
eom-multiple-save-as-dialog.ui \
2726
eom-preferences-dialog.ui \
2827
eom-toolbar.xml
@@ -33,6 +32,7 @@ pkgconfig_DATA = eom.pc
3332
EXTRA_DIST = \
3433
$(ui_DATA) \
3534
eom.css \
35+
eom-image-properties-dialog.ui \
3636
eom-ui.xml \
3737
metadata-sidebar.ui \
3838
$(DESKTOP_IN_FILES) \

‎src/eom-properties-dialog.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -569,13 +569,11 @@ eom_properties_dialog_class_init (EomPropertiesDialogClass *klass)
569569
G_PARAM_READWRITE |
570570
G_PARAM_STATIC_STRINGS));
571571

572-
gchar* data;
573-
gsize data_size;
574-
g_file_get_contents(g_build_filename (EOM_DATA_DIR, "eom-image-properties-dialog.ui", NULL), &data, &data_size, NULL);
575-
GBytes *bytes = g_bytes_new_static(data, data_size);
576-
gtk_widget_class_set_template((GtkWidgetClass *) klass, bytes);
577-
578572
GtkWidgetClass *wklass = (GtkWidgetClass*) klass;
573+
574+
gtk_widget_class_set_template_from_resource (wklass,
575+
"/org/mate/eom/ui/eom-image-properties-dialog.ui");
576+
579577
gtk_widget_class_bind_template_child_private(wklass,
580578
EomPropertiesDialog,
581579
notebook);

‎src/eom.gresource.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<gresources>
33
<gresource prefix="/org/mate/eom/ui">
44
<file>eom.css</file>
5+
<file compressed="true" preprocess="xml-stripblanks">eom-image-properties-dialog.ui</file>
56
<file compressed="true" preprocess="xml-stripblanks">eom-ui.xml</file>
67
<file compressed="true" preprocess="xml-stripblanks">metadata-sidebar.ui</file>
78
</gresource>

0 commit comments

Comments
 (0)