Re: [evolution-patches] Gnome Pilot Conduit Path Fixes



New version of the patch that uses g_getenv () and checks for a NULL
value returned by it.

-- dobey

On Tue, 2003-06-10 at 14:19, Rodney Dawes wrote:
> New version of the patch that just concatenates the paths together, so
> that we load the conduits from all the available places.
> 
> -- dobey
> 
> On Mon, 2003-06-09 at 18:46, Rodney Dawes wrote:
> > This patch fixes the searching of pilot conduit paths to work with
> > SuSE properly, as well as use the GNOME2_PATH env var instead of the
> > GNOME_PATH one from gnome 1.4.
> > 
> > -- dobey
Index: libgpilotdCM/gnome-pilot-conduit-management.gob
===================================================================
RCS file: /cvs/gnome/gnome-pilot/libgpilotdCM/gnome-pilot-conduit-management.gob,v
retrieving revision 1.27
diff -u -r1.27 gnome-pilot-conduit-management.gob
--- libgpilotdCM/gnome-pilot-conduit-management.gob	20 Mar 2003 16:35:44 -0000	1.27
+++ libgpilotdCM/gnome-pilot-conduit-management.gob	11 Jun 2003 15:22:33 -0000
@@ -269,23 +269,22 @@
 	private GList*
 	get_conduit_file_names (gchar *path, gchar *ext) {
 		gchar *gnome_path = NULL;
+		const gchar *susepath, *gnome2path;
 		GList *result = NULL;
 		GDir *dir;
 		const char *name;
 		gchar **paths;
 		int idx;
 		
-		/* Get the path crap */
-		gnome_path = getenv ("GNOME_PATH");
-		if (gnome_path) {
-			if (strchr (gnome_path, '=')) {
-				gnome_path = strchr (gnome_path, '=');
-				gnome_path++;
-			}
-		} else {
-			/* Use the compiled in CONDUITDIR */
-			gnome_path = CONDUITDIR;
-		}
+		susepath = g_getenv ("GNOMEPATH");
+		gnome2path = g_getenv ("GNOME2_PATH");
+		/* Concat SuSE's GNOMEPATH, GNOME2_PATH, and CONDUITDIR
+		   This is so that we can load all conduits in these paths */
+		gnome_path = g_strconcat (CONDUITDIR, ":",
+					  susepath ? susepath : "", ":",
+					  gnome2path ? gnome2path : "",
+					  NULL);
+
 		if (gnome_path == NULL) {
 			g_warning ("Cannot locate the %s files", ext);
 			return NULL;
@@ -316,6 +315,7 @@
 		}
 		
 		g_strfreev (paths);
+		g_free (gnome_path);
 		return result;
 	}
 


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