1
0
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:
dan
2005-07-17 19:16:46 +00:00
parent f3a960d9d8
commit d26f18505a
5 changed files with 19 additions and 5 deletions

View File

@@ -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