aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyPromptService.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-07-06 21:22:35 +0800
committerChristian Persch <chpe@src.gnome.org>2006-07-06 21:22:35 +0800
commitd86cac67a766a04b93c94365ff162f64a1954644 (patch)
treef37e82765868a2343b94dd4574c826ad05780e9f /embed/mozilla/EphyPromptService.cpp
parent942d6ff58714449de8ad005313811db0b3177a4d (diff)
downloadgsoc2013-epiphany-d86cac67a766a04b93c94365ff162f64a1954644.tar
gsoc2013-epiphany-d86cac67a766a04b93c94365ff162f64a1954644.tar.gz
gsoc2013-epiphany-d86cac67a766a04b93c94365ff162f64a1954644.tar.bz2
gsoc2013-epiphany-d86cac67a766a04b93c94365ff162f64a1954644.tar.lz
gsoc2013-epiphany-d86cac67a766a04b93c94365ff162f64a1954644.tar.xz
gsoc2013-epiphany-d86cac67a766a04b93c94365ff162f64a1954644.tar.zst
gsoc2013-epiphany-d86cac67a766a04b93c94365ff162f64a1954644.zip
A embed/mozilla/AutoWindowModalState.cpp: A
2006-07-06 Christian Persch <chpe@cvs.gnome.org> A embed/mozilla/AutoWindowModalState.cpp: A embed/mozilla/AutoWindowModalState.h: * embed/mozilla/ContentHandler.cpp: * embed/mozilla/EphyPromptService.cpp: * embed/mozilla/FilePicker.cpp: * embed/mozilla/FilePicker.h: * embed/mozilla/GtkNSSClientAuthDialogs.cpp: * embed/mozilla/GtkNSSDialogs.cpp: * embed/mozilla/GtkNSSKeyPairDialogs.cpp: * embed/mozilla/GtkNSSSecurityWarningDialogs.cpp: * embed/mozilla/Makefile.am: Prevent DOM window closure while we display a modal dialogue on it.
Diffstat (limited to 'embed/mozilla/EphyPromptService.cpp')
-rw-r--r--embed/mozilla/EphyPromptService.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/embed/mozilla/EphyPromptService.cpp b/embed/mozilla/EphyPromptService.cpp
index ceed6e0ab..4d934f23a 100644
--- a/embed/mozilla/EphyPromptService.cpp
+++ b/embed/mozilla/EphyPromptService.cpp
@@ -37,6 +37,7 @@
#include "ephy-debug.h"
#include "AutoJSContextStack.h"
+#include "AutoWindowModalState.h"
#include "EphyUtils.h"
#include "EphyPromptService.h"
@@ -79,6 +80,7 @@ public:
char* ConvertAndEscapeButtonText (const PRUnichar *, PRInt32 = -1);
private:
+ nsCOMPtr<nsIDOMWindow> mWindow;
GtkDialog *mDialog;
GtkWidget *mVBox;
GtkWidget *mCheck;
@@ -98,7 +100,8 @@ Prompter::Prompter (const char *aStock,
nsIDOMWindow *aParent,
const PRUnichar *aTitle,
const PRUnichar *aText)
- : mDialog(nsnull)
+ : mWindow (aParent)
+ , mDialog(nsnull)
, mVBox(nsnull)
, mCheck(nsnull)
, mSizeGroup(nsnull)
@@ -470,6 +473,8 @@ Prompter::Run (PRBool *aSuccess)
rv = stack.Init ();
if (NS_FAILED (rv)) return rv;
+ AutoWindowModalState modalState (mWindow);
+
if (mDelay)
{
guint timeout = g_timeout_add (TIMEOUT,
@@ -515,6 +520,9 @@ DeletePrompter (gpointer aPromptPtr,
void
Prompter::Show ()
{
+ /* We don't need it anymore */
+ mWindow = nsnull;
+
gtk_window_set_modal (GTK_WINDOW (mDialog), FALSE);
g_signal_connect (mDialog, "response",