File tree Expand file tree Collapse file tree 6 files changed +33
-16
lines changed
Expand file tree Collapse file tree 6 files changed +33
-16
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ AC_PROG_LIBTOOL
3737
3838AC_PROG_CC
3939AM_PROG_CC_C_O
40+ AC_PATH_PROG ( [ GLIB_COMPILE_RESOURCES] , [ glib-compile-resources] )
4041AC_PATH_PROG ( [ GLIB_GENMARSHAL] , [ glib-genmarshal] )
4142AC_PATH_PROG ( [ GLIB_MKENUMS] ,[ glib-mkenums] )
4243
Original file line number Diff line number Diff line change @@ -25,21 +25,17 @@ ui_DATA = \
2525 eom-image-properties-dialog.ui \
2626 eom-multiple-save-as-dialog.ui \
2727 eom-preferences-dialog.ui \
28- eom-ui.xml \
2928 eom-toolbar.xml
3029
3130pkgconfigdir = $(libdir ) /pkgconfig
3231pkgconfig_DATA = eom.pc
3332
34- themedir = $(pkgdatadir )
35- theme_DATA = \
36- eom.css
37-
3833EXTRA_DIST = \
39- $(theme_DATA ) \
40- $(ui_DATA ) \
41- $(DESKTOP_IN_FILES ) \
42- $(appdata_in_files )
34+ $(ui_DATA ) \
35+ eom.css \
36+ eom-ui.xml \
37+ $(DESKTOP_IN_FILES ) \
38+ $(appdata_in_files )
4339
4440CLEANFILES = \
4541 $(appdata_DATA )
Original file line number Diff line number Diff line change @@ -157,7 +157,9 @@ libeom_la_LIBADD += \
157157 $(X11_LIBS )
158158endif
159159
160- eom_SOURCES = main.c
160+ eom_SOURCES = \
161+ main.c \
162+ eom-resources.c
161163
162164eom_CFLAGS = \
163165 -I$(top_srcdir ) /cut-n-paste/toolbar-editor \
@@ -177,8 +179,13 @@ eom_LDADD = \
177179BUILT_SOURCES = \
178180 eom-enum-types.c \
179181 eom-enum-types.h \
182+ eom-resources.c \
180183 $(MARSHAL_OUTPUT )
181184
185+ eom-resources.c : eom.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES ) --sourcedir=$(top_srcdir ) /data --generate-dependencies eom.gresource.xml)
186+ $(AM_V_GEN ) $(GLIB_COMPILE_RESOURCES ) " $<" --target=$@ \
187+ --sourcedir =$(top_srcdir ) /data --c-name _eom --generate-source
188+
182189eom-enum-types.h : eom-enum-types.h.template $(INST_H_FILES ) $(GLIB_MKENUMS )
183190 $(AM_V_GEN ) (cd $( srcdir) && $( GLIB_MKENUMS) --template eom-enum-types.h.template $( INST_H_FILES) ) > $@
184191
@@ -192,6 +199,7 @@ eom-marshal.c: eom-marshal.list $(GLIB_GENMARSHAL)
192199 $(AM_V_GEN )$(GLIB_GENMARSHAL ) $< --body --header --prefix=eom_marshal > $@
193200
194201EXTRA_DIST = \
202+ eom.gresource.xml \
195203 eom-enum-types.h.template \
196204 eom-enum-types.c.template \
197205 eom-marshal.list
Original file line number Diff line number Diff line change @@ -4380,9 +4380,9 @@ eom_window_construct_ui (EomWindow *window)
43804380
43814381 gtk_ui_manager_insert_action_group (priv -> ui_mgr , priv -> actions_collection , 0 );
43824382
4383- if (!gtk_ui_manager_add_ui_from_file (priv -> ui_mgr ,
4384- EOM_DATA_DIR " /eom-ui.xml" ,
4385- & error )) {
4383+ if (!gtk_ui_manager_add_ui_from_resource (priv -> ui_mgr ,
4384+ "/org/mate/eom/ui /eom-ui.xml" ,
4385+ & error )) {
43864386 g_warning ("building menus failed: %s" , error -> message );
43874387 g_error_free (error );
43884388 }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <gresources >
3+ <gresource prefix =" /org/mate/eom/ui" >
4+ <file >eom.css</file >
5+ <file compressed =" true" preprocess =" xml-stripblanks" >eom-ui.xml</file >
6+ </gresource >
7+ </gresources >
8+
9+
10+
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ main (int argc, char **argv)
9696{
9797 GError * error = NULL ;
9898 GOptionContext * ctx ;
99+ GFile * css_file ;
99100 GtkCssProvider * provider ;
100101
101102 bindtextdomain (GETTEXT_PACKAGE , EOM_LOCALE_DIR );
@@ -140,10 +141,11 @@ main (int argc, char **argv)
140141 eom_thumbnail_init ();
141142
142143 /* Load special style properties for EomThumbView's scrollbar */
144+ css_file = g_file_new_for_uri ("resource:///org/mate/eom/ui/eom.css" );
143145 provider = gtk_css_provider_new ();
144- if (G_UNLIKELY (!gtk_css_provider_load_from_path (provider ,
145- EOM_CSS_FILE_PATH ,
146- & error )))
146+ if (G_UNLIKELY (!gtk_css_provider_load_from_file (provider ,
147+ css_file ,
148+ & error )))
147149 {
148150 g_critical ("Could not load CSS data: %s" , error -> message );
149151 g_clear_error (& error );
You can’t perform that action at this time.
0 commit comments