mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Fixed WPrefs.app to find its icons when not installed under GNUstep paths
This commit is contained in:
@@ -4,6 +4,7 @@ Changes since version 0.92.0:
|
||||
- added check for --with-gnustepdir option to configure to verify that its
|
||||
argument is an absolute path
|
||||
- updated german translations (Torsten Marek <shlomme@gmx.net>)
|
||||
- fixed WPrefs.app to find its icons when not installed under GNUstep paths
|
||||
|
||||
|
||||
Changes since version 0.91.0:
|
||||
|
||||
@@ -108,12 +108,12 @@ libWUtil_a_SOURCES = \
|
||||
wutil.c
|
||||
|
||||
|
||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\"
|
||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\" -DRESOURCE_PATH=\"$(datadir)/WINGs\" -DDEBUG
|
||||
|
||||
AM_CFLAGS = @NOSTRICTALIASING@
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFTFLAGS@ @HEADER_SEARCH_PATH@ -DDEBUG
|
||||
@XFTFLAGS@ @HEADER_SEARCH_PATH@
|
||||
|
||||
|
||||
wcolorpanel.o: wcolorpanel.c
|
||||
|
||||
@@ -181,7 +181,6 @@ WMPathForResourceOfType(char *resource, char *ext)
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
if (getenv("GNUSTEP_SYSTEM_ROOT")) {
|
||||
path = checkFile(getenv("GNUSTEP_SYSTEM_ROOT"), appdir, ext, resource);
|
||||
if (path) {
|
||||
|
||||
@@ -42,7 +42,7 @@ WPrefs_SOURCES = \
|
||||
imagebrowser.h \
|
||||
xmodifier.c
|
||||
|
||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\"
|
||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\" -DRESOURCE_PATH=\"$(wpdatadir)\"
|
||||
|
||||
AM_CFLAGS = @NOSTRICTALIASING@
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy;
|
||||
WMScreen *scr;
|
||||
char *locale;
|
||||
char *locale, *path;
|
||||
int i;
|
||||
char *display_name="";
|
||||
|
||||
@@ -110,6 +110,20 @@ main(int argc, char **argv)
|
||||
|
||||
WMInitializeApplication("WPrefs", &argc, argv);
|
||||
|
||||
WMSetResourcePath(RESOURCE_PATH);
|
||||
path = WMPathForResourceOfType("WPrefs.tiff", NULL);
|
||||
if (!path) {
|
||||
/* maybe it is run directly from the source directory */
|
||||
WMSetResourcePath(".");
|
||||
path = WMPathForResourceOfType("WPrefs.tiff", NULL);
|
||||
if (!path) {
|
||||
WMSetResourcePath("..");
|
||||
}
|
||||
}
|
||||
if (path) {
|
||||
wfree(path);
|
||||
}
|
||||
|
||||
if (argc>1) {
|
||||
for (i=1; i<argc; i++) {
|
||||
if (strcmp(argv[i], "-version")==0
|
||||
|
||||
Reference in New Issue
Block a user