diff src/gtk/misc-gtk.c @ 483:4376ffeab64e

2004-6-13 Brian Masney <masneyb@gftp.org> * lib/gftp.h lib/misc.c src/gtk/Makefile.am src/gtk/menu-items.c src/gtk/misc-gtk.c src/text/Makefile.am src/uicommon/Makefile.am src/uicommon/gftpui.c - added support to override the value of SHARE_DIR during runtime with the GFTP_SHARE_DIR environment variable
author masneyb
date Sun, 13 Jun 2004 14:25:18 +0000
parents 8fc4efa3f72d
children 39e9945288ea
line wrap: on
line diff
--- a/src/gtk/misc-gtk.c	Sun Jun 13 14:13:28 2004 +0000
+++ b/src/gtk/misc-gtk.c	Sun Jun 13 14:25:18 2004 +0000
@@ -1219,7 +1219,7 @@
 char *
 get_xpm_path (char *filename, int quit_on_err)
 {
-  char *tempstr, *exfile;
+  char *tempstr, *exfile, *share_dir;
 
   tempstr = g_strconcat (BASE_CONF_DIR, "/", filename, NULL);
   exfile = expand_path (tempstr);
@@ -1227,7 +1227,9 @@
   if (access (exfile, F_OK) != 0)
     {
       g_free (exfile);
-      tempstr = g_strconcat (SHARE_DIR, "/", filename, NULL);
+      share_dir = gftp_get_share_dir ();
+
+      tempstr = g_strconcat (share_dir, "/", filename, NULL);
       exfile = expand_path (tempstr);
       g_free (tempstr);
       if (access (exfile, F_OK) != 0)
@@ -1241,7 +1243,7 @@
 		return (NULL);
 
 	      printf (_("gFTP Error: Cannot find file %s in %s or %s\n"),
-		      filename, SHARE_DIR, BASE_CONF_DIR);
+		      filename, share_dir, BASE_CONF_DIR);
 	      exit (1);
 	    }
 	}