From cfe060300ff10557f8805eee176604095c48cc2d Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Thu, 2 Feb 2012 14:04:27 +0100 Subject: clock: Convert to GResource origin commits: https://git.gnome.org/browse/gnome-panel/commit/?h=gnome-3-4&id=aa2895d https://git.gnome.org/browse/gnome-panel/commit/?h=gnome-3-4&id=695d30c https://git.gnome.org/browse/gnome-panel/commit/?h=gnome-3-4&id=00f9870 https://git.gnome.org/browse/gnome-panel/commit/?h=gnome-3-4&id=9ade365 --- applets/clock/clock-face.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'applets/clock/clock-face.c') diff --git a/applets/clock/clock-face.c b/applets/clock/clock-face.c index dd63a2b6..36603865 100644 --- a/applets/clock/clock-face.c +++ b/applets/clock/clock-face.c @@ -15,6 +15,7 @@ #include #include +#include "clock.h" #include "clock-face.h" #include "clock-location.h" #include "clock-utils.h" @@ -436,18 +437,22 @@ clock_face_load_face (ClockFace *this, gint width, gint height) return; } - /* The pixbuf is not cached, let's load it */ - name = g_strconcat (ICONDIR, "/clock-face-", size_string[priv->size], - "-", daytime_string[priv->timeofday], ".svg", - NULL); - priv->face_pixbuf = clock_utils_pixbuf_from_svg_file_at_size (name, width, height); + /* The pixbuf is not cached, let's load it */ + name = g_strconcat (CLOCK_RESOURCE_PATH "icons/", + "clock-face-", size_string[priv->size], + "-", daytime_string[priv->timeofday], ".svg", + NULL); + priv->face_pixbuf = clock_utils_pixbuf_from_svg_resource_at_size (name, + width, height); g_free (name); if (!priv->face_pixbuf) { - name = g_strconcat (ICONDIR, "/clock-face-", - size_string[priv->size], ".svg", NULL); - priv->face_pixbuf = clock_utils_pixbuf_from_svg_file_at_size (name, width, height); - g_free (name); + name = g_strconcat (CLOCK_RESOURCE_PATH "icons/", + "clock-face-", size_string[priv->size], ".svg", + NULL); + priv->face_pixbuf = clock_utils_pixbuf_from_svg_resource_at_size (name, + width, height); + g_free (name); } /* Save the found pixbuf in the cache */ -- cgit v1.2.1