aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/ContentHandler.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2008-02-18 21:40:59 +0800
committerChristian Persch <chpe@src.gnome.org>2008-02-18 21:40:59 +0800
commitb3924f2a5509596645492d232c9b3dcf1ad35965 (patch)
treec05f7f1fea2ddbf17d10a9e2edc05b043e537104 /embed/mozilla/ContentHandler.cpp
parent72305c8033e66e792bde1060b7d7377935cedfb4 (diff)
downloadgsoc2013-epiphany-b3924f2a5509596645492d232c9b3dcf1ad35965.tar
gsoc2013-epiphany-b3924f2a5509596645492d232c9b3dcf1ad35965.tar.gz
gsoc2013-epiphany-b3924f2a5509596645492d232c9b3dcf1ad35965.tar.bz2
gsoc2013-epiphany-b3924f2a5509596645492d232c9b3dcf1ad35965.tar.lz
gsoc2013-epiphany-b3924f2a5509596645492d232c9b3dcf1ad35965.tar.xz
gsoc2013-epiphany-b3924f2a5509596645492d232c9b3dcf1ad35965.tar.zst
gsoc2013-epiphany-b3924f2a5509596645492d232c9b3dcf1ad35965.zip
Fix prompt service for xr 1.9 wrt. DOM notifications. Bug #504445.
svn path=/trunk/; revision=7967
Diffstat (limited to 'embed/mozilla/ContentHandler.cpp')
-rw-r--r--embed/mozilla/ContentHandler.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 5b7a5ac0e..c70f460c2 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -56,8 +56,7 @@
#include "ephy-prefs.h"
#include "ephy-stock-icons.h"
-#include "AutoJSContextStack.h"
-#include "AutoWindowModalState.h"
+#include "AutoModalDialog.h"
#include "EphyUtils.h"
#include "MozDownload.h"
@@ -144,18 +143,15 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
{
return BuildDownloadPath (defaultFile.get(), _retval);
}
-
- nsresult rv;
- AutoJSContextStack stack;
- rv = stack.Init ();
- if (NS_FAILED (rv)) return rv;
-
nsCOMPtr<nsIDOMWindow> parentDOMWindow (do_GetInterface (aWindowContext));
- GtkWidget *parentWindow = GTK_WIDGET (EphyUtils::FindGtkParent (parentDOMWindow));
- AutoWindowModalState modalState (parentDOMWindow);
+ AutoModalDialog modalDialog (parentDOMWindow, PR_FALSE);
+ if (!modalDialog.ShouldShow ())
+ return NS_ERROR_FAILURE;
+
+ GtkWindow *parentWindow = modalDialog.GetParent ();
- dialog = ephy_file_chooser_new (_("Save"), parentWindow,
+ dialog = ephy_file_chooser_new (_("Save"), GTK_WIDGET (parentWindow),
GTK_FILE_CHOOSER_ACTION_SAVE,
CONF_STATE_SAVE_DIR,
EPHY_FILE_FILTER_ALL);
@@ -175,7 +171,7 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
do
{
g_free (filename);
- response = gtk_dialog_run (GTK_DIALOG (dialog));
+ response = modalDialog.Run (GTK_DIALOG (dialog));
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
} while (response == GTK_RESPONSE_ACCEPT
&& !ephy_gui_check_location_writable (GTK_WIDGET (dialog), filename));