diff options
author | David Trowbridge <trowbrds@cs.colorado.edu> | 2004-01-28 04:55:28 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-01-28 04:55:28 +0800 |
commit | 385d87f37dbb8a9b07ad93998a825025042bb998 (patch) | |
tree | 249923b71df76e0f970d2cd053442a1ef9df7598 /shell/e-shell-window-commands.c | |
parent | 2c3a4db54579cc72de29ece126d60a31b8ab9ea7 (diff) | |
download | gsoc2013-evolution-385d87f37dbb8a9b07ad93998a825025042bb998.tar.gz 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
Diffstat (limited to 'shell/e-shell-window-commands.c')
-rw-r--r-- | shell/e-shell-window-commands.c | 30 |
1 files changed, 30 insertions, 0 deletions
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), |