[gnome-software] Do not install the star images and instead compile them as resources
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not install the star images and instead compile them as resources
- Date: Tue, 5 Nov 2013 18:06:52 +0000 (UTC)
commit 42699078fa41370400647a580acc09f17b5267f5
Author: Richard Hughes <richard hughsie com>
Date: Tue Nov 5 11:25:01 2013 +0000
Do not install the star images and instead compile them as resources
data/Makefile.am | 8 +++-----
src/gnome-software.gresource.xml | 2 ++
{data => src}/gs-star-dim.png | Bin 491 -> 491 bytes
src/gs-star-widget.c | 24 ++++++++++++------------
{data => src}/gs-star.png | Bin 421 -> 421 bytes
5 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 8bd10b7..a5ef461 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -9,12 +9,10 @@ dist_resources_DATA = \
featured-gimp.png \
featured-gnome-sudoku.png \
featured-mypaint.png \
- featured-weather.png \
- featured-weather-bg.png \
+ featured-weather.png \
+ featured-weather-bg.png \
featured-xchat.png \
- featured.ini \
- gs-star-dim.png \
- gs-star.png
+ featured.ini
@GSETTINGS_RULES@
gsettings_SCHEMAS = org.gnome.software.gschema.xml
diff --git a/src/gnome-software.gresource.xml b/src/gnome-software.gresource.xml
index 1f0ece8..9bdbbd9 100644
--- a/src/gnome-software.gresource.xml
+++ b/src/gnome-software.gresource.xml
@@ -14,5 +14,7 @@
<file>gtk-style-hc.css</file>
<file preprocess="to-pixdata">shadow.png</file>
<file preprocess="to-pixdata">shadow-active.png</file>
+ <file preprocess="to-pixdata">gs-star.png</file>
+ <file preprocess="to-pixdata">gs-star-dim.png</file>
</gresource>
</gresources>
diff --git a/src/gs-star-widget.c b/src/gs-star-widget.c
index eabde7c..abea50a 100644
--- a/src/gs-star-widget.c
+++ b/src/gs-star-widget.c
@@ -71,22 +71,22 @@ static void
gs_star_widget_refresh (GsStarWidget *star)
{
GsStarWidgetPrivate *priv;
- const gchar *img = DATADIR "/gnome-software/gs-star.png";
- const gchar *img_dim = DATADIR "/gnome-software/gs-star-dim.png";
+ const gchar *img = "/org/gnome/software/gs-star.png";
+ const gchar *img_dim = "/org/gnome/software/gs-star-dim.png";
priv = gs_star_widget_get_instance_private (star);
/* set the dim states correctly */
- gtk_image_set_from_file (GTK_IMAGE (priv->image1),
- priv->rating >= rate_to_star[0] ? img : img_dim);
- gtk_image_set_from_file (GTK_IMAGE (priv->image2),
- priv->rating >= rate_to_star[1] ? img : img_dim);
- gtk_image_set_from_file (GTK_IMAGE (priv->image3),
- priv->rating >= rate_to_star[2] ? img : img_dim);
- gtk_image_set_from_file (GTK_IMAGE (priv->image4),
- priv->rating >= rate_to_star[3] ? img : img_dim);
- gtk_image_set_from_file (GTK_IMAGE (priv->image5),
- priv->rating >= rate_to_star[4] ? img : img_dim);
+ gtk_image_set_from_resource (GTK_IMAGE (priv->image1),
+ priv->rating >= rate_to_star[0] ? img : img_dim);
+ gtk_image_set_from_resource (GTK_IMAGE (priv->image2),
+ priv->rating >= rate_to_star[1] ? img : img_dim);
+ gtk_image_set_from_resource (GTK_IMAGE (priv->image3),
+ priv->rating >= rate_to_star[2] ? img : img_dim);
+ gtk_image_set_from_resource (GTK_IMAGE (priv->image4),
+ priv->rating >= rate_to_star[3] ? img : img_dim);
+ gtk_image_set_from_resource (GTK_IMAGE (priv->image5),
+ priv->rating >= rate_to_star[4] ? img : img_dim);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]