aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window-commands.c
diff options
context:
space:
mode:
authorRodney Dawes <dobey@ximian.com>2004-02-06 07:18:27 +0800
committerRodney Dawes <dobey@src.gnome.org>2004-02-06 07:18:27 +0800
commitfdd316cd244fd667ac4c4620ae028668e87a3097 (patch)
tree7222c9cfb47791afcd189a8ca35723ec265410a6 /shell/e-shell-window-commands.c
parentb05d91a1e7eb51a7848e1fc16607fa549fd61d08 (diff)
downloadgsoc2013-evolution-fdd316cd244fd667ac4c4620ae028668e87a3097.tar.gz
gsoc2013-evolution-fdd316cd244fd667ac4c4620ae028668e87a3097.tar.zst
gsoc2013-evolution-fdd316cd244fd667ac4c4620ae028668e87a3097.zip
Use gnome-vfs directly, instead of relying on gnome_url_show (), to launch
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 svn path=/trunk/; revision=24640
Diffstat (limited to 'shell/e-shell-window-commands.c')
-rw-r--r--shell/e-shell-window-commands.c15
1 files changed, 14 insertions, 1 deletions
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;