aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/ContentHandler.cpp
diff options
context:
space:
mode:
authorWouter Bolsterlee <wbolster@gnome.org>2006-10-15 22:05:40 +0800
committerWouter Bolsterlee <wbolster@src.gnome.org>2006-10-15 22:05:40 +0800
commitc1e9da9eed75fc314c113000d7fe01e7de1ae913 (patch)
tree8fe52c695808de3066e5a3652035b0406463f0fe /embed/mozilla/ContentHandler.cpp
parentccb73eb4348e4fb957fe4a2f8ed5ca7eac6835d9 (diff)
downloadgsoc2013-epiphany-c1e9da9eed75fc314c113000d7fe01e7de1ae913.tar
gsoc2013-epiphany-c1e9da9eed75fc314c113000d7fe01e7de1ae913.tar.gz
gsoc2013-epiphany-c1e9da9eed75fc314c113000d7fe01e7de1ae913.tar.bz2
gsoc2013-epiphany-c1e9da9eed75fc314c113000d7fe01e7de1ae913.tar.lz
gsoc2013-epiphany-c1e9da9eed75fc314c113000d7fe01e7de1ae913.tar.xz
gsoc2013-epiphany-c1e9da9eed75fc314c113000d7fe01e7de1ae913.tar.zst
gsoc2013-epiphany-c1e9da9eed75fc314c113000d7fe01e7de1ae913.zip
Automatically open a Nautilus window after downloading has finished. Fixes
2006-10-15 Wouter Bolsterlee <wbolster@gnome.org> * embed/mozilla/ContentHandler.cpp: * embed/mozilla/MozDownload.cpp: * lib/ephy-file-helpers.c: (ephy_file_browse_to): * lib/ephy-file-helpers.h: * src/popup-commands.c: (save_property_url_completed_cb), (save_property_url): Automatically open a Nautilus window after downloading has finished. Fixes bug #138876, patch by Ed Catmur.
Diffstat (limited to 'embed/mozilla/ContentHandler.cpp')
-rw-r--r--embed/mozilla/ContentHandler.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index d6403eb90..2948514eb 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -406,6 +406,8 @@ NS_METHOD GContentHandler::MIMEDoAction (void)
mLauncher->GetMIMEInfo(getter_AddRefs(mimeInfo));
NS_ENSURE_TRUE (mimeInfo, NS_ERROR_FAILURE);
+ char *info = NULL;
+
if (mAction == CONTENT_ACTION_OPEN)
{
g_return_val_if_fail (mHelperApp, NS_ERROR_FAILURE);
@@ -416,9 +418,15 @@ NS_METHOD GContentHandler::MIMEDoAction (void)
/* The current time is fine here as the user has just clicked
* a button (it is used as the time for the application opening)
*/
- char *info;
info = g_strdup_printf ("gnome-default:%d:%s", gtk_get_current_event_time(), id);
+ }
+ else if (mAction == CONTENT_ACTION_DOWNLOAD)
+ {
+ info = g_strdup_printf ("gnome-browse-to-file:%d", gtk_get_current_event_time());
+ }
+ if (info != NULL)
+ {
nsString desc;
NS_CStringToUTF16 (nsCString (info),
NS_CSTRING_ENCODING_UTF8, desc);