[Nautilus-list] More rh merge
- From: Alex Larsson <alexl redhat com>
- To: <nautilus-list lists eazel com>
- Subject: [Nautilus-list] More rh merge
- Date: Mon, 3 Sep 2001 15:39:53 -0400 (EDT)
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]=Systém nápovìdy
+Name[da]=Hjælp
+Name[de]=GNOME-Hilfe
+Name[el]=Óýóôçìá ÂïÞèåéáò
+Name[es]=Sistema de ayuda
+Name[et]=Abimees
+Name[eu]=Laguntza sistema
+Name[fi]=Ohjeselain
+Name[fr]=Système d'Aide
+Name[ga]=Coráis Cúnamh
+Name[gl]=Sistema de axuda
+Name[hu]=GNOME Súgó
+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]=Pomocník
+Name[sl]=Sistem pomoèi
+Name[sv]=Hjälpsystem
+Name[tr]=Yardým 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ý systém nápovìdy (Info, man, HTML)
+Comment[da]=Integreret hjælpesystem (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]=Système d'Aide Intégré (Info, man, HTML)
+Comment[ga]=Coráis Cúnamh Gnome (Info, man, HTML)
+Comment[gl]=Sistema integrado de axuda (Info, Man, HTML)
+Comment[hu]=GNOME Súgó-böngészõ
+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ý pomocník (Info, man, HTML)
+Comment[sl]=Integriran sistem pomoèi (Info, man, HTML)
+Comment[sv]=Integrerat hjälpsystem (Info, man HTML)
+Comment[tr]=Deðiþik þekil yardým dosyalarýný izlemeni saðlar
+Comment[uk]=óÉÓÔÅÍÁ ÐÅÒÅÇÌÑÄÕ ÄÏצÄËÏ×ϧ ¦ÎÆÏÒÍÁæ§ (Info, man, HTML)
+Comment[wa]=Sistinme intégré d' aidance (pådjes info, man, HTML)
+Comment[zh_CN.GB2312]=ÕûºÏ¸¨Öú˵Ã÷ϵͳ (Info, man, HTML)
+Comment[zh_TW.Big5]=¾ã¦X»²§U»¡©ú¨t²Î (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]