aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@src.gnome.org>2004-01-22 07:39:43 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-01-22 07:39:43 +0800
commit9435af9372734a2e9c7c3353b7ecad9cf3251a7b (patch)
treeb49f93972477210d5dbbb2acf4d5bbf262d0f91d /embed/mozilla
parentd94e466f932e902af29f000fcff7ec8e78b09b61 (diff)
downloadgsoc2013-epiphany-9435af9372734a2e9c7c3353b7ecad9cf3251a7b.tar
gsoc2013-epiphany-9435af9372734a2e9c7c3353b7ecad9cf3251a7b.tar.gz
gsoc2013-epiphany-9435af9372734a2e9c7c3353b7ecad9cf3251a7b.tar.bz2
gsoc2013-epiphany-9435af9372734a2e9c7c3353b7ecad9cf3251a7b.tar.lz
gsoc2013-epiphany-9435af9372734a2e9c7c3353b7ecad9cf3251a7b.tar.xz
gsoc2013-epiphany-9435af9372734a2e9c7c3353b7ecad9cf3251a7b.tar.zst
gsoc2013-epiphany-9435af9372734a2e9c7c3353b7ecad9cf3251a7b.zip
*** empty log message ***
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/ContentHandler.cpp12
-rw-r--r--embed/mozilla/ContentHandler.h2
2 files changed, 11 insertions, 3 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 0e5664019..a92f2ce02 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -89,6 +89,7 @@ NS_IMETHODIMP GContentHandler::Show(nsIHelperAppLauncher *aLauncher,
EphyEmbedSingle *single;
gboolean handled = FALSE;
+ mContext = aContext;
mLauncher = aLauncher;
rv = Init ();
NS_ENSURE_SUCCESS (rv, rv);
@@ -129,7 +130,10 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
_retval);
}
- dialog = ephy_file_chooser_new (_("Save"), NULL,
+ nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_QueryInterface (aWindowContext);
+ GtkWidget *parentWindow = GTK_WIDGET (MozillaFindGtkParent (parentDOMWindow));
+
+ dialog = ephy_file_chooser_new (_("Save"), parentWindow,
GTK_FILE_CHOOSER_ACTION_SAVE,
CONF_STATE_DOWNLOAD_DIR);
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog),
@@ -250,13 +254,17 @@ NS_METHOD GContentHandler::MIMEConfirmAction ()
char *text;
int response;
+ nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_QueryInterface (mContext);
+ GtkWindow *parentWindow = GTK_WINDOW (MozillaFindGtkParent(parentDOMWindow));
+
dialog = gtk_dialog_new_with_buttons
- ("", NULL, GTK_DIALOG_NO_SEPARATOR,
+ ("", parentWindow, GTK_DIALOG_NO_SEPARATOR,
_("_Save As..."), CONTENT_ACTION_SAVEAS,
GTK_STOCK_CANCEL, CONTENT_ACTION_NONE,
mAction == CONTENT_ACTION_OPEN ?
_("_Open") : _("_Download"), mAction,
NULL);
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), (guint)mAction);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
diff --git a/embed/mozilla/ContentHandler.h b/embed/mozilla/ContentHandler.h
index b692675f5..6aa39658d 100644
--- a/embed/mozilla/ContentHandler.h
+++ b/embed/mozilla/ContentHandler.h
@@ -77,9 +77,9 @@ class GContentHandler : public nsIHelperAppLauncherDialog
NS_METHOD CheckAppSupportScheme ();
nsCOMPtr<nsIHelperAppLauncher> mLauncher;
-
nsCOMPtr<nsIURI> mUri;
nsCOMPtr<nsIFile> mTempFile;
+ nsCOMPtr<nsISupports> mContext;
char *mMimeType;
PRBool mAppSupportScheme;