From fdd316cd244fd667ac4c4620ae028668e87a3097 Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Thu, 5 Feb 2004 23:18:27 +0000 Subject: Use gnome-vfs directly, instead of relying on gnome_url_show (), to launch 2004-02-05 Rodney Dawes * e-shell-window-commands.c (command_quick_reference): Use gnome-vfs directly, instead of relying on gnome_url_show (), to launch the application for the quick reference, since we can run on gnome 2.2 mostly, and gnome_url_show () only handles the uri method there Fixes #53566 svn path=/trunk/; revision=24640 --- shell/ChangeLog | 9 +++++++++ shell/e-shell-window-commands.c | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 846b59b589..11106149f9 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,12 @@ +2004-02-05 Rodney Dawes + + * e-shell-window-commands.c (command_quick_reference): Use gnome-vfs + directly, instead of relying on gnome_url_show (), to launch the + application for the quick reference, since we can run on gnome 2.2 + mostly, and gnome_url_show () only handles the uri method there + + Fixes #53566 + 2004-02-04 JP Rosevear * e-shell-importer.c (start_import): pass in a parent for the diff --git a/shell/e-shell-window-commands.c b/shell/e-shell-window-commands.c index 2154fc387b..15676de2f7 100644 --- a/shell/e-shell-window-commands.c +++ b/shell/e-shell-window-commands.c @@ -39,6 +39,9 @@ #include #include +#include +#include + #include @@ -185,7 +188,11 @@ command_quick_reference (BonoboUIComponent *uih, { char *quickref; char *uri; + char *mimetype; + GnomeVFSMimeApplication *app; + GList * uri_list; 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; @@ -198,7 +205,13 @@ command_quick_reference (BonoboUIComponent *uih, 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); + mimetype = gnome_vfs_get_mime_type (uri); + app = gnome_vfs_mime_get_default_application (mimetype); + uri_list = g_list_append (NULL, uri); + gnome_vfs_mime_application_launch (app, uri_list); + g_list_free (uri_list); + gnome_vfs_mime_application_free (app); + g_free (mimetype); g_free (quickref); g_free (uri); return; -- cgit