diff options
author | Christian Persch <chpe@src.gnome.org> | 2008-02-18 21:40:59 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-02-18 21:40:59 +0800 |
commit | b3924f2a5509596645492d232c9b3dcf1ad35965 (patch) | |
tree | c05f7f1fea2ddbf17d10a9e2edc05b043e537104 /embed/mozilla/GeckoFormSigningDialog.cpp | |
parent | 72305c8033e66e792bde1060b7d7377935cedfb4 (diff) | |
download | gsoc2013-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/GeckoFormSigningDialog.cpp')
-rw-r--r-- | embed/mozilla/GeckoFormSigningDialog.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/embed/mozilla/GeckoFormSigningDialog.cpp b/embed/mozilla/GeckoFormSigningDialog.cpp index 309b3c11e..cf538c145 100644 --- a/embed/mozilla/GeckoFormSigningDialog.cpp +++ b/embed/mozilla/GeckoFormSigningDialog.cpp @@ -39,8 +39,7 @@ #include "ephy-file-helpers.h" #include "ephy-prefs.h" -#include "AutoJSContextStack.h" -#include "AutoWindowModalState.h" +#include "AutoModalDialog.h" #include "EphyUtils.h" #include "GeckoFormSigningDialog.h" @@ -83,11 +82,6 @@ GeckoFormSigningDialog::ConfirmSignText (nsIInterfaceRequestor *ctx, { /* FIXME: limit |signText| to a sensitlbe length (maybe 100k)? */ - nsresult rv; - AutoJSContextStack stack; - rv = stack.Init (); - if (NS_FAILED (rv)) return rv; - nsCOMPtr<nsIDOMWindow> parent (do_GetInterface (ctx)); if (!parent) { parent = EphyJSUtils::GetDOMWindowFromCallContext (); @@ -95,7 +89,11 @@ GeckoFormSigningDialog::ConfirmSignText (nsIInterfaceRequestor *ctx, } GtkWidget *gparent = EphyUtils::FindGtkParent (parent); - AutoWindowModalState modalState (parent); + AutoModalDialog modalDialog (parent, PR_TRUE); + if (!modalDialog.ShouldShow ()) { + *_cancelled = PR_TRUE; + return NS_OK; + } GladeXML *gxml = glade_xml_new (ephy_file ("form-signing-dialog.glade"), "form_signing_dialog", NULL); @@ -143,7 +141,7 @@ GeckoFormSigningDialog::ConfirmSignText (nsIInterfaceRequestor *ctx, g_object_unref (gxml); - int response = gtk_dialog_run (GTK_DIALOG (dialog)); + int response = modalDialog.Run (GTK_DIALOG (dialog)); *_cancelled = response != GTK_RESPONSE_ACCEPT; |