#include "util.h"
#include "callback.h"
+static char *navit_sharedir;
+
//##############################################################################################################
//# Description:
//# Comment:
graphics_gc_set_background(this_->gc[2], &(struct color) { 0xffff, 0xffff, 0xffff, 0xffff });
graphics_gc_set_foreground(this_->gc[2], &(struct color) { 0x0000, 0x0000, 0x0000, 0xffff });
this_->meth.background_gc(this_->priv, this_->gc[0]->priv);
+ navit_sharedir = getenv("NAVIT_SHAREDIR");
}
/**
struct graphics_gc *gc = NULL;
struct graphics_image *img;
struct point p;
+ char path[PATH_MAX];
es=itm->elements;
while (es) {
break;
case element_icon:
if (!img) {
- char *icon=g_strjoin(NULL,getenv("NAVIT_SHAREDIR"), "/xpm/", e->u.icon.src, NULL);
- img=graphics_image_new(gra, icon);
- g_free(icon);
+ sprintf(path,"%s/xpm/%s", navit_sharedir, e->u.icon.src);
+ img=graphics_image_new(gra, path);
if (! img)
dbg(0,"failed to load icon '%s'\n", e->u.icon.src);
}