aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/iconcache.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2006-10-16 17:53:16 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2006-10-16 17:53:16 +0000
commite46568349c49cadc870f5c0fc84dcce2f7c461b1 (patch)
tree139332ea64b814967711035cf388438a2c9fa302 /hardinfo2/iconcache.c
parent3722c94e232b39d2a05ef359a60d25ac0cbe7887 (diff)
Use g_str_equal instead of strcmp.
About box cleanups Use g_build_filename instead of building paths on my own Better BinReloc support (should work even if binreloc initialization fails)
Diffstat (limited to 'hardinfo2/iconcache.c')
-rw-r--r--hardinfo2/iconcache.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hardinfo2/iconcache.c b/hardinfo2/iconcache.c
index ee5d2f4f..91b26d4d 100644
--- a/hardinfo2/iconcache.c
+++ b/hardinfo2/iconcache.c
@@ -36,9 +36,7 @@ GdkPixbuf *icon_cache_get_pixbuf(const gchar *file)
icon = g_hash_table_lookup(cache, file);
if (!icon) {
- gchar *tmp = g_strdup_printf("%s/hardinfo/pixmaps/%s",
- path_data, file);
-
+ gchar *tmp = g_build_filename(path_data, "pixmaps", file, NULL);
icon = gdk_pixbuf_new_from_file(tmp, NULL);
g_hash_table_insert(cache, g_strdup(file), icon);
@@ -63,8 +61,7 @@ GdkPixbuf *icon_cache_get_pixbuf_at_size(const gchar *file, gint wid, gint hei)
icon = g_hash_table_lookup(cache, file);
if (!icon) {
- gchar *tmp = g_strdup_printf("%s/hardinfo/pixmaps/%s",
- path_data, file);
+ gchar *tmp = g_build_filename(path_data, "pixmaps", file, NULL);
icon = gdk_pixbuf_new_from_file_at_size(tmp, wid, hei, NULL);
g_hash_table_insert(cache, g_strdup(file), icon);