libgnome nautilus patch



are there any problems with this patch?

jacob
-- 
"The people who made the Macintosh produced a miracle, but that
 doesn't mean their code was wonderful." -- Bob Cringely
? bleh
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnome/ChangeLog,v
retrieving revision 1.100.4.40
diff -u -r1.100.4.40 ChangeLog
--- ChangeLog	2001/01/23 07:43:24	1.100.4.40
+++ ChangeLog	2001/03/07 18:54:14
@@ -1,3 +1,11 @@
+2001-02-26  jacob berkman  <jacob ximian com>
+
+	* gnome-mime.c: 
+	* gnome-help.c: don't include gtk.h
+
+	* gnome-url.c: default to using nautilus for help browsing if it
+	is available
+
 Tue Jan 23 02:46:36 2001  George Lebl <jirka 5z com>
 
 	* gnome-dentry.c: include gnome-url.c, apply xalf patch from Peter
Index: gnome-help.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnome/Attic/gnome-help.c,v
retrieving revision 1.24.4.1
diff -u -r1.24.4.1 gnome-help.c
--- gnome-help.c	2000/01/02 02:54:12	1.24.4.1
+++ gnome-help.c	2001/03/07 18:54:14
@@ -23,7 +23,6 @@
 #endif
 
 #include <glib.h>
-#include <gtk/gtk.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
Index: gnome-mime.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnome/Attic/gnome-mime.c,v
retrieving revision 1.31.4.1
diff -u -r1.31.4.1 gnome-mime.c
--- gnome-mime.c	2000/02/14 20:55:44	1.31.4.1
+++ gnome-mime.c	2001/03/07 18:54:14
@@ -11,7 +11,6 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <regex.h>
-#include <gtk/gtk.h>
 #include "libgnomeP.h"
 #include "gnome-mime.h"
 #include <string.h>
Index: gnome-url.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnome/gnome-url.c,v
retrieving revision 1.7.6.1
diff -u -r1.7.6.1 gnome-url.c
--- gnome-url.c	2000/05/20 05:36:27	1.7.6.1
+++ gnome-url.c	2001/03/07 18:54:14
@@ -29,9 +29,6 @@
 #include "gnome-url.h"
 
 #define DEFAULT_HANDLER "gnome-moz-remote --newwin \"%s\""
-#define INFO_HANDLER  "gnome-help-browser \"%s\""
-#define MAN_HANDLER   "gnome-help-browser \"%s\""
-#define GHELP_HANDLER "gnome-help-browser \"%s\""
 
 static gchar *
 gnome_url_default_handler ()
@@ -39,11 +36,18 @@
 	static gchar *default_handler = 0;
 	
 	if (!default_handler) {
-		gchar *str;
+		gchar *str, *app;
 		gboolean def;
 		str = gnome_config_get_string_with_default ("/Gnome/URL Handlers/default-show",
 							    &def);
 		if (def) {
+			app = gnome_is_program_in_path ("nautilus");
+			if (app) {
+				g_free (app);
+				app = "nautilus \"%s\"";
+			} else
+				app = "gnome-help-browser \"%s\"";
+
 			/* first time gnome_url_show is run -- set up some useful defaults */
 			default_handler = DEFAULT_HANDLER;
 			gnome_config_set_string ("/Gnome/URL Handlers/default-show", default_handler);
@@ -51,16 +55,16 @@
 			g_free (gnome_config_get_string_with_default(
 				"/Gnome/URL Handlers/info-show", &def));
 			if (def)
-				gnome_config_set_string ("/Gnome/URL Handlers/info-show", INFO_HANDLER);
+				gnome_config_set_string ("/Gnome/URL Handlers/info-show", app);
 			g_free (gnome_config_get_string_with_default(
 				"/Gnome/URL Handlers/man-show", &def));
 			if (def)
-				gnome_config_set_string ("/Gnome/URL Handlers/man-show", MAN_HANDLER);
+				gnome_config_set_string ("/Gnome/URL Handlers/man-show", app);
 			g_free (gnome_config_get_string_with_default(
 				"/Gnome/URL Handlers/ghelp-show", &def));
 			if (def)
-				gnome_config_set_string ("/Gnome/URL Handlers/ghelp-show",
-							 GHELP_HANDLER);
+				gnome_config_set_string ("/Gnome/URL Handlers/ghelp-show", app);
+
 			gnome_config_sync_file ("/Gnome/");
 		} else
 			default_handler = str;


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