b=93617 r=dcone sr=attinasi a=asa

Fixing print dialog focus problem on Unix
This commit is contained in:
kaie%netscape.com 2001-08-23 05:04:06 +00:00
Родитель 096a196a7d
Коммит ec52006f36
4 изменённых файлов: 38 добавлений и 4 удалений

Просмотреть файл

@ -33,6 +33,7 @@
#include "nsIDialogParamBlock.h"
#include "nsISupportsPrimitives.h"
#include "nsIWindowWatcher.h"
#include "nsIDOMWindowInternal.h"
//#include "prmem.h"
//#include "plstr.h"
@ -129,8 +130,16 @@ NS_IMETHODIMP nsDeviceContextSpecBeOS :: Init(PRBool aQuiet)
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
if (wwatch) {
nsCOMPtr<nsIDOMWindowInternal> parent;
nsCOMPtr<nsIDOMWindow> active;
wwatch->GetActiveWindow(getter_AddRefs(active));
if (active) {
active->QueryInterface(NS_GET_IID(nsIDOMWindowInternal), getter_AddRefs(parent));
}
nsCOMPtr<nsIDOMWindow> newWindow;
rv = wwatch->OpenWindow(0, "chrome://global/content/printdialog.xul",
rv = wwatch->OpenWindow(parent, "chrome://global/content/printdialog.xul",
"_blank", "chrome,modal", paramBlockWrapper,
getter_AddRefs(newWindow));
}

Просмотреть файл

@ -37,6 +37,7 @@
#include "nsIDialogParamBlock.h"
#include "nsISupportsPrimitives.h"
#include "nsIWindowWatcher.h"
#include "nsIDOMWindowInternal.h"
static NS_DEFINE_CID(kPrintOptionsCID, NS_PRINTOPTIONS_CID);
@ -181,8 +182,16 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::Init(PRBool aQuiet)
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
if (wwatch) {
nsCOMPtr<nsIDOMWindowInternal> parent;
nsCOMPtr<nsIDOMWindow> active;
wwatch->GetActiveWindow(getter_AddRefs(active));
if (active) {
active->QueryInterface(NS_GET_IID(nsIDOMWindowInternal), getter_AddRefs(parent));
}
nsCOMPtr<nsIDOMWindow> newWindow;
rv = wwatch->OpenWindow(0, "chrome://global/content/printdialog.xul",
rv = wwatch->OpenWindow(parent, "chrome://global/content/printdialog.xul",
"_blank", "chrome,modal", paramBlockWrapper,
getter_AddRefs(newWindow));
}

Просмотреть файл

@ -162,8 +162,16 @@ NS_IMETHODIMP nsDeviceContextSpecQT::Init(PRBool aQuiet)
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
if (wwatch) {
nsCOMPtr<nsIDOMWindowInternal> parent;
nsCOMPtr<nsIDOMWindow> active;
wwatch->GetActiveWindow(getter_AddRefs(active));
if (active) {
active->QueryInterface(NS_GET_IID(nsIDOMWindowInternal), getter_AddRefs(parent));
}
nsCOMPtr<nsIDOMWindow> newWindow;
rv = wwatch->OpenWindow(0, "chrome://global/content/printdialog.xul",
rv = wwatch->OpenWindow(parent, "chrome://global/content/printdialog.xul",
"_blank", "chrome,modal", paramBlockWrapper,
getter_AddRefs(newWindow));
}

Просмотреть файл

@ -169,8 +169,16 @@ NS_IMETHODIMP nsDeviceContextSpecXlib::Init(PRBool aQuiet)
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
if (wwatch) {
nsCOMPtr<nsIDOMWindowInternal> parent;
nsCOMPtr<nsIDOMWindow> active;
wwatch->GetActiveWindow(getter_AddRefs(active));
if (active) {
active->QueryInterface(NS_GET_IID(nsIDOMWindowInternal), getter_AddRefs(parent));
}
nsCOMPtr<nsIDOMWindow> newWindow;
rv = wwatch->OpenWindow(0, "chrome://global/content/printdialog.xul",
rv = wwatch->OpenWindow(parent, "chrome://global/content/printdialog.xul",
"_blank", "chrome,modal", paramBlockWrapper,
getter_AddRefs(newWindow));
}