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/GtkNSSKeyPairDialogs.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/GtkNSSKeyPairDialogs.cpp')
-rw-r--r-- | embed/mozilla/GtkNSSKeyPairDialogs.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/embed/mozilla/GtkNSSKeyPairDialogs.cpp b/embed/mozilla/GtkNSSKeyPairDialogs.cpp index 3b9e405cc..916cf5b7c 100644 --- a/embed/mozilla/GtkNSSKeyPairDialogs.cpp +++ b/embed/mozilla/GtkNSSKeyPairDialogs.cpp @@ -49,9 +49,7 @@ #include "ephy-gui.h" #include "ephy-stock-icons.h" -#include "AutoJSContextStack.h" -#include "AutoWindowModalState.h" -#include "EphyUtils.h" +#include "AutoModalDialog.h" #include "GtkNSSKeyPairDialogs.h" @@ -142,15 +140,12 @@ GtkNSSKeyPairDialogs::DisplayGeneratingKeypairInfo (nsIInterfaceRequestor *ctx, GtkWidget *dialog, *progress, *label, *vbox; gint timeout_id; - nsresult rv; - AutoJSContextStack stack; - rv = stack.Init (); - if (NS_FAILED (rv)) return rv; + nsCOMPtr<nsIDOMWindow> parent (do_GetInterface (ctx)); + AutoModalDialog modalDialog (parent, PR_FALSE); + if (!modalDialog.ShouldShow ()) + return NS_ERROR_ABORT; - nsCOMPtr<nsIDOMWindow> parent = do_GetInterface (ctx); - GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent)); - - AutoWindowModalState modalState (parent); + GtkWindow *gparent = modalDialog.GetParent (); dialog = gtk_dialog_new_with_buttons ("", gparent, GTK_DIALOG_DESTROY_WITH_PARENT, (char *) NULL); @@ -199,7 +194,7 @@ GtkNSSKeyPairDialogs::DisplayGeneratingKeypairInfo (nsIInterfaceRequestor *ctx, begin_busy (dialog); runnable->StartKeyGeneration (helper); - int res = gtk_dialog_run (GTK_DIALOG (dialog)); + int res = modalDialog.Run (GTK_DIALOG (dialog)); if (res != GTK_RESPONSE_OK && helper->close_called == FALSE) { /* Ignore the already_closed flag, our nsIDOMWindowInterna::Close |