[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 06 of 22] Fixed WPrefs.app to find its icons when not installed under GNUstep paths



# HG changeset patch
# User Dan Pascu <dan@ag-projects.com>
# Date 1121627806 25200
# Branch wm_0_92
# Node ID ef121bc27253a6b4804d567aa38b63faf9c53c6a
# Parent  1bdc6ee8e3160f2cdbea0816840c4b074d19930b
Fixed WPrefs.app to find its icons when not installed under GNUstep paths
(transplanted from 37e3cebc9f309b1f6d41d20c629529c52a4b29e0)

diff -r 1bdc6ee8e316 -r ef121bc27253 ChangeLog
--- a/ChangeLog	Tue Jul 05 12:41:06 2005 -0700
+++ b/ChangeLog	Sun Jul 17 12:16:46 2005 -0700
@@ -4,6 +4,7 @@
 - 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:
diff -r 1bdc6ee8e316 -r ef121bc27253 WINGs/Makefile.am
--- a/WINGs/Makefile.am	Tue Jul 05 12:41:06 2005 -0700
+++ b/WINGs/Makefile.am	Sun Jul 17 12:16:46 2005 -0700
@@ -108,12 +108,12 @@
 	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
diff -r 1bdc6ee8e316 -r ef121bc27253 WINGs/wapplication.c
--- a/WINGs/wapplication.c	Tue Jul 05 12:41:06 2005 -0700
+++ b/WINGs/wapplication.c	Sun Jul 17 12:16:46 2005 -0700
@@ -181,7 +181,6 @@
         return path;
     }
 
-
     if (getenv("GNUSTEP_SYSTEM_ROOT")) {
         path = checkFile(getenv("GNUSTEP_SYSTEM_ROOT"), appdir, ext, resource);
         if (path) {
diff -r 1bdc6ee8e316 -r ef121bc27253 WPrefs.app/Makefile.am
--- a/WPrefs.app/Makefile.am	Tue Jul 05 12:41:06 2005 -0700
+++ b/WPrefs.app/Makefile.am	Sun Jul 17 12:16:46 2005 -0700
@@ -42,7 +42,7 @@
 	imagebrowser.h \
 	xmodifier.c
 
-AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\"
+AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\" -DRESOURCE_PATH=\"$(wpdatadir)\"
 
 AM_CFLAGS = @NOSTRICTALIASING@
 
diff -r 1bdc6ee8e316 -r ef121bc27253 WPrefs.app/main.c
--- a/WPrefs.app/main.c	Tue Jul 05 12:41:06 2005 -0700
+++ b/WPrefs.app/main.c	Sun Jul 17 12:16:46 2005 -0700
@@ -100,7 +100,7 @@
 {
     Display *dpy;
     WMScreen *scr;
-    char *locale;
+    char *locale, *path;
     int i;
     char *display_name="";
 
@@ -109,6 +109,20 @@
     memset(DeadHandlers, 0, sizeof(DeadHandlers));
 
     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++) {


-- 
To unsubscribe, send mail to wmaker-dev-unsubscribe@lists.windowmaker.info.