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/GtkNSSClientAuthDialogs.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/GtkNSSClientAuthDialogs.cpp')
-rw-r--r-- | embed/mozilla/GtkNSSClientAuthDialogs.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/embed/mozilla/GtkNSSClientAuthDialogs.cpp b/embed/mozilla/GtkNSSClientAuthDialogs.cpp index 410827166..ee699a23d 100644 --- a/embed/mozilla/GtkNSSClientAuthDialogs.cpp +++ b/embed/mozilla/GtkNSSClientAuthDialogs.cpp @@ -57,8 +57,7 @@ #include "ephy-state.h" #include "ephy-stock-icons.h" -#include "AutoJSContextStack.h" -#include "AutoWindowModalState.h" +#include "AutoModalDialog.h" #include "EphyUtils.h" #include "GtkNSSClientAuthDialogs.h" @@ -146,18 +145,19 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx, char *msg, *markup_text; PRUint32 i; - nsresult rv; - AutoJSContextStack stack; - rv = stack.Init (); - if (NS_FAILED (rv)) return rv; - nsCOMPtr<nsIDOMWindow> parent (do_GetInterface (ctx)); - GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent)); - AutoWindowModalState modalState (parent); + AutoModalDialog modalDialog (parent, PR_FALSE); + if (!modalDialog.ShouldShow ()) + { + *canceled = PR_TRUE; + return NS_OK; + } + + GtkWindow *gparent = modalDialog.GetParent (); dialog = gtk_dialog_new_with_buttons ("", - GTK_WINDOW (gparent), + gparent, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -268,7 +268,7 @@ GtkNSSClientAuthDialogs::ChooseCertificate (nsIInterfaceRequestor *ctx, gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); /* run the dialog */ - int res = gtk_dialog_run (GTK_DIALOG (dialog)); + int res = modalDialog.Run (GTK_DIALOG (dialog)); if (res == GTK_RESPONSE_OK) { *canceled = PR_FALSE; |