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/GeckoPrintService.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/GeckoPrintService.cpp')
-rw-r--r-- | embed/mozilla/GeckoPrintService.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/embed/mozilla/GeckoPrintService.cpp b/embed/mozilla/GeckoPrintService.cpp index 4d3de3fb8..de2020397 100644 --- a/embed/mozilla/GeckoPrintService.cpp +++ b/embed/mozilla/GeckoPrintService.cpp @@ -46,8 +46,7 @@ #include "ephy-prefs.h" #include "ephy-stock-icons.h" -#include "AutoJSContextStack.h" -#include "AutoWindowModalState.h" +#include "AutoModalDialog.h" #include "EphyUtils.h" #include "GeckoPrintSession.h" @@ -121,16 +120,12 @@ GeckoPrintService::ShowPrintDialog (nsIDOMWindow *aParent, rv = aSettings->GetHowToEnableFrameUI (&frameUI); NS_ENSURE_SUCCESS (rv, rv); - GtkWidget *parent = EphyUtils::FindGtkParent (aParent); - NS_ENSURE_TRUE(parent, NS_ERROR_INVALID_POINTER); - - AutoJSContextStack stack; - rv = stack.Init (); - if (NS_FAILED (rv)) { - return rv; - } + AutoModalDialog modalDialog (aParent, PR_TRUE); + if (!modalDialog.ShouldShow ()) + return NS_ERROR_ABORT; - AutoWindowModalState modalState (aParent); + GtkWindow *parent = modalDialog.GetParent (); + NS_ENSURE_TRUE(parent, NS_ERROR_INVALID_POINTER); EphyEmbedShell *shell = ephy_embed_shell_get_default (); @@ -200,7 +195,7 @@ GeckoPrintService::ShowPrintDialog (nsIDOMWindow *aParent, gtk_window_set_icon_name (GTK_WINDOW (dialog), EPHY_STOCK_EPHY); - int response = gtk_dialog_run (GTK_DIALOG (dialog)); + int response = modalDialog.Run (GTK_DIALOG (dialog)); gtk_widget_hide (dialog); GtkPrinter *printer = gtk_print_unix_dialog_get_selected_printer (print_dialog); |