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