aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/ContentHandler.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@src.gnome.org>2003-10-17 01:28:46 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-10-17 01:28:46 +0800
commit24fc218c90c70a06011a851df6991bf34b72d6c3 (patch)
tree6bb9ee7e434a3b10e636634cbaaa997e6ccebf1f /embed/mozilla/ContentHandler.cpp
parentb7a8e995fde6c3cf6ac82ea2390c3c4b510024c5 (diff)
downloadgsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar
gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.gz
gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.bz2
gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.lz
gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.xz
gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.tar.zst
gsoc2013-epiphany-24fc218c90c70a06011a851df6991bf34b72d6c3.zip
Merge new-downloader branch. We reworked the backend, the user
interface is still incomplete.
Diffstat (limited to 'embed/mozilla/ContentHandler.cpp')
-rw-r--r--embed/mozilla/ContentHandler.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 48809a099..519bff738 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -159,7 +159,6 @@ extern "C" {
#include "ephy-gui.h"
#include "ephy-embed-utils.h"
#include "ephy-file-helpers.h"
-#include "ProgressListener.h"
#include "ContentHandler.h"
#include <gtk/gtkentry.h>
@@ -189,9 +188,10 @@ extern "C" {
#include "nsIPrefService.h"
#include "nsIDOMWindow.h"
#include "nsIDOMWindowInternal.h"
+#include "nsIMIMEInfo.h"
class GContentHandler;
-class GDownloadProgressListener;
+//class GDownloadProgressListener;
struct MimeAskActionDialog;
struct HelperAppChooserDialog;
@@ -454,15 +454,20 @@ NS_METHOD GContentHandler::SetHelperApp(GnomeVFSMimeApplication *aHelperApp,
NS_METHOD GContentHandler::SynchroniseMIMEInfo (void)
{
nsresult rv;
+ char *command_with_path;
+
nsCOMPtr<nsIMIMEInfo> mimeInfo;
rv = mLauncher->GetMIMEInfo(getter_AddRefs(mimeInfo));
if(NS_FAILED(rv)) return NS_ERROR_FAILURE;
+ command_with_path = g_find_program_in_path (mHelperApp->command);
+ if (command_with_path == NULL) return NS_ERROR_FAILURE;
nsCOMPtr<nsILocalFile> helperFile;
- rv = NS_NewNativeLocalFile(nsDependentCString(mHelperApp->command),
+ rv = NS_NewNativeLocalFile(nsDependentCString(command_with_path),
PR_TRUE,
getter_AddRefs(helperFile));
if(NS_FAILED(rv)) return NS_ERROR_FAILURE;
+ g_free (command_with_path);
rv = mimeInfo->SetPreferredApplicationHandler(helperFile);
if(NS_FAILED(rv)) return NS_ERROR_FAILURE;