[eog] EogThumbnail: Load thumbnail frame from a GResource
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogThumbnail: Load thumbnail frame from a GResource
- Date: Mon, 5 Jan 2015 18:07:50 +0000 (UTC)
commit 65720c07c943885a0048220b7a35d91002afc164
Author: Felix Riemann <friemann gnome org>
Date: Mon Jan 5 19:06:26 2015 +0100
EogThumbnail: Load thumbnail frame from a GResource
Also optimize the frame's filesize.
data/pixmaps/Makefile.am | 7 +------
data/pixmaps/thumbnail-frame.png | Bin 908 -> 474 bytes
src/eog-thumbnail.c | 4 +++-
src/eog.gresource.xml | 1 +
4 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/data/pixmaps/Makefile.am b/data/pixmaps/Makefile.am
index e1ba2dd..0887f39 100644
--- a/data/pixmaps/Makefile.am
+++ b/data/pixmaps/Makefile.am
@@ -1,9 +1,4 @@
-pixmapsdir = $(pkgdatadir)/pixmaps
-
-pixmaps_DATA = \
- thumbnail-frame.png
-
EXTRA_DIST = \
- $(pixmaps_DATA)
+ thumbnail-frame.png
-include $(top_srcdir)/git.mk
diff --git a/data/pixmaps/thumbnail-frame.png b/data/pixmaps/thumbnail-frame.png
index c2605d5..d06e5bf 100644
Binary files a/data/pixmaps/thumbnail-frame.png and b/data/pixmaps/thumbnail-frame.png differ
diff --git a/src/eog-thumbnail.c b/src/eog-thumbnail.c
index fb0c461..2e9fdd0 100644
--- a/src/eog-thumbnail.c
+++ b/src/eog-thumbnail.c
@@ -534,6 +534,8 @@ eog_thumbnail_init (void)
}
if (frame == NULL) {
- frame = gdk_pixbuf_new_from_file (EOG_DATA_DIR "/pixmaps/thumbnail-frame.png", NULL);
+ frame = gdk_pixbuf_new_from_resource (
+ "/org/gnome/eog/ui/pixmaps/thumbnail-frame.png",
+ NULL);
}
}
diff --git a/src/eog.gresource.xml b/src/eog.gresource.xml
index 8dd0acf..a8feb2f 100644
--- a/src/eog.gresource.xml
+++ b/src/eog.gresource.xml
@@ -7,6 +7,7 @@
<file compressed="true" preprocess="xml-stripblanks">eog-multiple-save-as-dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks">eog-preferences-dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks">eog-ui.xml</file>
+ <file>pixmaps/thumbnail-frame.png</file>
</gresource>
</gresources>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]