[Nautilus-list] More rh merge



Here is a patch that adds a desktop file to launch nautilus as a help 
browser. It is meant to replace the gnome help browser.

Ok to check in? (I will add ChangeLog entries)

/ Alex

Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/nautilus/Makefile.am,v
retrieving revision 1.51
diff -u -p -r1.51 Makefile.am
--- Makefile.am	2001/08/26 19:01:06	1.51
+++ Makefile.am	2001/09/03 19:36:00
@@ -39,6 +39,7 @@ EXTRA_DIST=					\
 	nautilus-clean.sh			\
 	nautilus.desktop			\
 	nautilus.desktop.in			\
+	nautilus-help.desktop			\
 	nautilus-launch-icon.png		\
 	nautilusConf.sh.in			\
 	nautilus-config.in			\
@@ -60,7 +61,8 @@ appicon_DATA = nautilus-launch-icon.png
 Applicationsdir = $(datadir)/gnome/apps/Applications
 Applications_DATA = $(DESKTOP_FILES)
 
-
+Toplevelmenudir = $(datadir)/gnome/apps
+Toplevelmenu_DATA = nautilus-help.desktop
 
 ## [The following is shamelessly copied from gnome-vfs.]
 
Index: components/help/help-method.c
===================================================================
RCS file: /cvs/gnome/nautilus/components/help/help-method.c,v
retrieving revision 1.32
diff -u -p -r1.32 help-method.c
--- components/help/help-method.c	2001/06/08 16:17:46	1.32
+++ components/help/help-method.c	2001/09/03 19:36:00
@@ -383,52 +383,71 @@ help_name_to_local_path (const char *old
 	GList *language_list;
 	char *new_uri_with_extension;
 	char *old_help;
+        gboolean is_toc;
 
+        is_toc = FALSE;
+        
         base_name = file_from_path (old_uri);
         if (base_name == NULL || base_name[0] == '\0') {
                 g_free (base_name);
                 return NULL;
         }
 
+        is_toc = strcmp (old_uri, "toc") == 0;
+        
 	new_uri_with_extension = NULL;
 	new_uri = NULL;
-	
+        
 	language_list = gnome_i18n_get_language_list ("LC_MESSAGES");
 
 	while (!new_uri_with_extension && language_list) {
 		const char *lang;
 
 		lang = language_list->data;
-		buf = g_strdup_printf ("gnome/help/%s/%s/%s", base_name, lang, old_uri);
+                if (is_toc)
+                        buf = g_strdup_printf ("gnome/help/help-browser/%s/default-page.html",
+                                               lang);
+                else
+                        buf = g_strdup_printf ("gnome/help/%s/%s/%s", base_name, lang, old_uri);
+
 		new_uri = gnome_unconditional_datadir_file (buf);
 		g_free (buf);
 
-		new_uri_with_extension = g_strconcat (new_uri, ".xml", NULL);
-		/* FIXME: Should we use g_file_test instead? */
-		if (!g_file_exists (new_uri_with_extension)) {
-			/* XML file doesn't exist - now try SGML */
-			g_free (new_uri_with_extension);
-	
-			new_uri_with_extension = g_strconcat (new_uri, ".sgml", NULL);
-			if (!g_file_exists (new_uri_with_extension)) {
+                if (is_toc) {
+                        if (g_file_exists (new_uri)) {
+                                new_uri_with_extension = new_uri;
+                                new_uri = NULL;
+                        }
+                } else {
+                        new_uri_with_extension = g_strconcat (new_uri, ".xml", NULL);
+                        /* FIXME: Should we use g_file_test instead? */
+                        if (!g_file_exists (new_uri_with_extension)) {
+                                /* XML file doesn't exist - now try SGML */
+                                g_free (new_uri_with_extension);
+                                
+                                new_uri_with_extension = g_strconcat (new_uri, ".sgml", NULL);
+                                if (!g_file_exists (new_uri_with_extension)) {
 				/* SGML file doesn't exist - fallback to SGML */
-				g_free (new_uri_with_extension);
-
-				old_help = g_strdup_printf ("gnome/help/%s/%s/index.html", base_name, lang);
-				new_uri_with_extension = gnome_unconditional_datadir_file (old_help);
-				g_free (old_help);
-				
-				if (!g_file_exists (new_uri_with_extension)) {
-					/* HTML file doesn't exist - next language */
-					g_free (new_uri_with_extension);
-					new_uri_with_extension = NULL;
-				}
-			}
-		}
-		g_free (new_uri);
-		new_uri = NULL;
-		language_list = language_list->next;
-	}
+                                        g_free (new_uri_with_extension);
+                                        
+                                        old_help = g_strdup_printf ("gnome/help/%s/%s/index.html", base_name, lang);
+                                        new_uri_with_extension = gnome_unconditional_datadir_file (old_help);
+                                        g_free (old_help);
+                                        
+                                        if (!g_file_exists (new_uri_with_extension)) {
+                                                /* HTML file doesn't exist - next language */
+                                                g_free (new_uri_with_extension);
+                                                new_uri_with_extension = NULL;
+                                        }
+                                }
+                        }
+                }
+
+                g_free (new_uri);
+                new_uri = NULL;
+                language_list = language_list->next;
+        }
+        
 	return new_uri_with_extension;			
 }
 
--- /dev/null	Fri Mar 23 23:37:44 2001
+++ nautilus-help.desktop	Mon Sep  3 15:32:19 2001
@@ -0,0 +1,71 @@
+[Desktop Entry]
+Name=Help
+Name[ca]=Sistema d'ajuda
+Name[cs]=Systm npovdy
+Name[da]=Hjlp
+Name[de]=GNOME-Hilfe
+Name[el]= 
+Name[es]=Sistema de ayuda
+Name[et]=Abimees
+Name[eu]=Laguntza sistema
+Name[fi]=Ohjeselain
+Name[fr]=Systme d'Aide
+Name[ga]=Coris Cnamh
+Name[gl]=Sistema de axuda
+Name[hu]=GNOME Sg
+Name[it]=Guida di Gnome
+Name[ja]=إץƥ
+Name[ko]= ý
+Name[lt]=Pagalbos sistema
+Name[nl]=Help systeem
+Name[no]=GNOME Hjelp-leser
+Name[pl]=System pomocy
+Name[pt]=Ajuda GNOME
+Name[pt_BR]=Sistema de Ajuda
+Name[ro]=Sistem ajutor
+Name[ru]= 
+Name[sk]=Pomocnk
+Name[sl]=Sistem pomoi
+Name[sv]=Hjlpsystem
+Name[tr]=Yardm gezgini
+Name[uk]=צ 
+Name[wa]=Aidance di Gnome
+Name[zh_CN.GB2312]=˵
+Name[zh_TW.Big5]=U
+Comment=Documentation
+Comment[ca]=Sistema integrat d'ajuda (Info, man, HTML)
+Comment[cs]=Integrovan systm npovdy (Info, man, HTML)
+Comment[da]=Integreret hjlpesystem (Info, man, HTML)
+Comment[de]=Integriertes Hilfesystem (Info, man, HTML)
+Comment[el]=   (Info, man, HTML)
+Comment[es]=Sistema integral de ayuda (Info, man, HTML)
+Comment[et]=Abi- ja dokumentatsiooniprogramm (info, man, html)
+Comment[eu]=Laguntza sistema bateratua (Info, man, HTML)
+Comment[fi]=Gnomen ohjeselain (Info-, manuaali- ja HTML-sivut)
+Comment[fr]=Systme d'Aide Intgr (Info, man, HTML)
+Comment[ga]=Coris Cnamh Gnome (Info, man, HTML)
+Comment[gl]=Sistema integrado de axuda (Info, Man, HTML)
+Comment[hu]=GNOME Sg-bngsz
+Comment[it]=Sistema di aiuto integrato (info, man, HTML)
+Comment[ja]=إץƥ(Info, man, HTML)
+Comment[ko]=  ý
+Comment[lt]=Integruota pagalbos sistema (Info, man, HTML)
+Comment[nl]=Help systeem (Info, man, HTML)
+Comment[no]=Integrert hjelpesystem (Info, man, HTML)
+Comment[pl]=Zintegrowany system pomocy (Info, Man, HTML)
+Comment[pt]=Sistema integrado de ajuda (Info, Man e HTML)
+Comment[pt_BR]=Sistema integrado de ajuda (Info, Man e HTML)
+Comment[ro]=Sistem ajutor integrat (Info, man, HTML)
+Comment[ru]=    (Info, man, HTML)
+Comment[sk]=Integrovan pomocnk (Info, man, HTML)
+Comment[sl]=Integriran sistem pomoi (Info, man, HTML)
+Comment[sv]=Integrerat hjlpsystem (Info, man HTML)
+Comment[tr]=Deiik ekil yardm dosyalarn izlemeni salar
+Comment[uk]=  צϧ æ (Info, man, HTML)
+Comment[wa]=Sistinme intgr d' aidance (pdjes info, man, HTML)
+Comment[zh_CN.GB2312]=ϸ˵ϵͳ (Info, man, HTML)
+Comment[zh_TW.Big5]=XUt (Info, man, HTML)
+Exec=nautilus --no-default-window --no-desktop ghelp:toc
+Icon=gnome-help.png
+Terminal=0
+Type=Application





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