diff options
author | Vincent Untz <[email protected]> | 2012-02-02 14:04:27 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-04-26 13:01:37 +0200 |
commit | cfe060300ff10557f8805eee176604095c48cc2d (patch) | |
tree | c52c7f5d23819a981635089f021a9de032461c14 /applets/clock/clock-face.c | |
parent | c61d3711954a959ebc7c957ac4f39c8ca3b783e9 (diff) | |
download | mate-panel-cfe060300ff10557f8805eee176604095c48cc2d.tar.bz2 mate-panel-cfe060300ff10557f8805eee176604095c48cc2d.tar.xz |
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
Diffstat (limited to 'applets/clock/clock-face.c')
-rw-r--r-- | applets/clock/clock-face.c | 23 |
1 files changed, 14 insertions, 9 deletions
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 <math.h> #include <time.h> +#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 */ |