aboutsummaryrefslogtreecommitdiffstats
path: root/shell
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
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')
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/e-shell-window-commands.c15
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;