update gtk resource path setting to use makefile variable

This commit is contained in:
Vincent Sanders 2016-02-20 18:37:50 +00:00
parent 592ff0ef76
commit 6a4efa35f8
2 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
# Where to search for NetSurf's resources after looking in ~/.netsurf and
# $NETSURFRES. It must have a trailing /
NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/
NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/:./gtk/res/
# Where to install the netsurf binary
NETSURF_GTK_BIN := $(PREFIX)/bin/

View File

@ -116,7 +116,7 @@ nsgtk_init_resource_path(const char *config_home)
if (config_home != NULL) {
resource_path_len = snprintf(NULL, 0,
"%s:${NETSURFRES}:%s:./gtk/res",
"%s:${NETSURFRES}:%s",
config_home,
GTK_RESPATH);
resource_path = malloc(resource_path_len + 1);
@ -124,12 +124,12 @@ nsgtk_init_resource_path(const char *config_home)
return NULL;
}
snprintf(resource_path, resource_path_len + 1,
"%s:${NETSURFRES}:%s:./gtk/res",
"%s:${NETSURFRES}:%s",
config_home,
GTK_RESPATH);
} else {
resource_path_len = snprintf(NULL, 0,
"${NETSURFRES}:%s:./gtk/res",
"${NETSURFRES}:%s",
GTK_RESPATH);
resource_path = malloc(resource_path_len + 1);
if (resource_path == NULL) {
@ -137,7 +137,7 @@ nsgtk_init_resource_path(const char *config_home)
}
snprintf(resource_path,
resource_path_len + 1,
"${NETSURFRES}:%s:./gtk/res",
"${NETSURFRES}:%s",
GTK_RESPATH);
}