aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Trowbridge <trowbrds@cs.colorado.edu>2004-01-28 04:55:28 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-01-28 04:55:28 +0800
commit385d87f37dbb8a9b07ad93998a825025042bb998 (patch)
tree249923b71df76e0f970d2cd053442a1ef9df7598
parent2c3a4db54579cc72de29ece126d60a31b8ab9ea7 (diff)
downloadgsoc2013-evolution-385d87f37dbb8a9b07ad93998a825025042bb998.tar
gsoc2013-evolution-385d87f37dbb8a9b07ad93998a825025042bb998.tar.gz
gsoc2013-evolution-385d87f37dbb8a9b07ad93998a825025042bb998.tar.bz2
gsoc2013-evolution-385d87f37dbb8a9b07ad93998a825025042bb998.tar.lz
gsoc2013-evolution-385d87f37dbb8a9b07ad93998a825025042bb998.tar.xz
gsoc2013-evolution-385d87f37dbb8a9b07ad93998a825025042bb998.tar.zst
gsoc2013-evolution-385d87f37dbb8a9b07ad93998a825025042bb998.zip
add definition for EVOLUTION_HELPDIR
2004-01-26 David Trowbridge <trowbrds@cs.colorado.edu> * Makefile.am: add definition for EVOLUTION_HELPDIR * e-shell-window-commands.c: add handling for new "Quick Reference" menu svn path=/trunk/; revision=24472
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/Makefile.am1
-rw-r--r--shell/e-shell-window-commands.c30
3 files changed, 39 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 1df03c9cd8..f389453ff8 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,4 +1,11 @@
-2004-01-21 Not Zed <NotZed@Ximian.com>
+2004-01-26 David Trowbridge <trowbrds@cs.colorado.edu>
+
+ * Makefile.am: add definition for EVOLUTION_HELPDIR
+
+ * e-shell-window-commands.c: add handling for new "Quick
+ Reference" menu
+
+2004-01-26 Not Zed <NotZed@Ximian.com>
* e-shell.c (attempt_upgrade, detect_version, e_shell_construct):
attempt the upgrade before trying to startup the wizard.
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 26203950ae..0150b27d93 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -9,6 +9,7 @@ INCLUDES = \
-DEVOLUTION_DATADIR=\""$(datadir)"\" \
-DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
+ -DEVOLUTION_HELPDIR=\""$(evolutionhelpdir)"\" \
-DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
-DEVOLUTION_TOOLSDIR=\""$(privlibexecdir)"\" \
-DPREFIX=\""$(prefix)"\" \
diff --git a/shell/e-shell-window-commands.c b/shell/e-shell-window-commands.c
index d9092c22a8..fa45f34fb0 100644
--- a/shell/e-shell-window-commands.c
+++ b/shell/e-shell-window-commands.c
@@ -181,6 +181,35 @@ command_help_faq (BonoboUIComponent *uih,
gnome_url_show ("http://www.ximian.com/apps/evolution-faq.html", NULL); /* FIXME use the error */
}
+static void
+command_quick_reference (BonoboUIComponent *uih,
+ EShellWindow *window,
+ const char *path)
+{
+ char *quickref;
+ char *uri;
+ const GList *lang_list = gnome_i18n_get_language_list ("LC_MESSAGES");
+ for (; lang_list != NULL; lang_list = lang_list->next) {
+ const char *lang = lang_list->data;
+
+ /* This has to be a valid language AND a language with
+ * no encoding postfix. The language will come up without
+ * encoding next */
+ if (lang == NULL || strchr (lang, '.') != NULL)
+ continue;
+
+ quickref = g_build_filename (EVOLUTION_HELPDIR, "quickref", lang, "quickref.pdf", NULL);
+ if (g_file_test (quickref, G_FILE_TEST_EXISTS)) {
+ uri = g_strconcat ("file://", quickref, NULL);
+ gnome_url_show (uri, NULL);
+ g_free (quickref);
+ g_free (uri);
+ return;
+ }
+ g_free (quickref);
+ }
+}
+
static void
command_work_offline (BonoboUIComponent *uih,
@@ -279,6 +308,7 @@ static BonoboUIVerb tools_verbs[] = {
static BonoboUIVerb help_verbs [] = {
BONOBO_UI_VERB ("HelpFAQ", (BonoboUIVerbFn) command_help_faq),
+ BONOBO_UI_VERB ("QuickReference", (BonoboUIVerbFn) command_quick_reference),
BONOBO_UI_VERB ("HelpSubmitBug", (BonoboUIVerbFn) command_submit_bug),
BONOBO_UI_VERB ("HelpAbout", (BonoboUIVerbFn) command_about_box),