diff options
-rw-r--r-- | shell/ChangeLog | 9 | ||||
-rw-r--r-- | shell/e-shell-window-commands.c | 15 |
2 files changed, 23 insertions, 1 deletions
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 <dobey@ximian.com> + + * 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 <jpr@ximian.com> * 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 <libgnome/gnome-url.h> #include <libgnome/gnome-i18n.h> +#include <libgnomevfs/gnome-vfs-mime-handlers.h> +#include <libgnomevfs/gnome-vfs-mime-utils.h> + #include <bonobo/bonobo-ui-component.h> @@ -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; |