mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
parent
4692ed820c
commit
73b8757be8
@ -53,7 +53,6 @@
|
||||
{
|
||||
dump("Creating prefwindow object...");
|
||||
prefwindow = Components.classes['component://netscape/prefwindow'].createInstance(Components.interfaces.nsIPrefWindow);
|
||||
prefwindow.showWindow("navigator.js", window, url);
|
||||
dump("...created\n");
|
||||
}
|
||||
else
|
||||
|
@ -53,7 +53,6 @@
|
||||
{
|
||||
dump("Creating prefwindow object...");
|
||||
prefwindow = Components.classes['component://netscape/prefwindow'].createInstance(Components.interfaces.nsIPrefWindow);
|
||||
prefwindow.showWindow("navigator.js", window, url);
|
||||
dump("...created\n");
|
||||
}
|
||||
else
|
||||
|
@ -76,7 +76,6 @@ nsPrefWindow::nsPrefWindow()
|
||||
, mPanelFrame(nsnull)
|
||||
, mPrefs(nsnull)
|
||||
, mSubStrings(nsnull)
|
||||
, mWindow(nsnull)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
@ -156,7 +155,7 @@ NS_IMETHODIMP nsPrefWindow::showWindow(
|
||||
if (mPrefs)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
stream << "Existing pref object reused by "
|
||||
stream << "¥¥¥ showWindow called twice! Existing pref object reused by "
|
||||
<< nsString(id).ToCString(buf, sizeof(buf))
|
||||
<< nsEndl;
|
||||
#endif
|
||||
@ -179,8 +178,6 @@ NS_IMETHODIMP nsPrefWindow::showWindow(
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// (code adapted from nsToolkitCore::ShowModal. yeesh.)
|
||||
if (mWindow)
|
||||
return NS_OK;
|
||||
nsIWebShellWindow* window = nsnull;
|
||||
nsCOMPtr<nsIURL> urlObj;
|
||||
nsresult rv = NS_NewURL(getter_AddRefs(urlObj), "chrome://pref/content/");
|
||||
@ -198,7 +195,6 @@ NS_IMETHODIMP nsPrefWindow::showWindow(
|
||||
nsnull, cb, 504, 436);
|
||||
if (window)
|
||||
{
|
||||
mWindow = window;
|
||||
nsCOMPtr<nsIWidget> parentWindowWidgetThing;
|
||||
nsresult gotParent
|
||||
= parent ? parent->GetWidget(*getter_AddRefs(parentWindowWidgetThing)) :
|
||||
@ -719,7 +715,6 @@ NS_IMETHODIMP nsPrefWindow::savePrefs()
|
||||
mPrefs->SavePrefFile();
|
||||
}
|
||||
// Then close
|
||||
mWindow = nsnull;
|
||||
return Close(mPanelFrame);
|
||||
} // nsPrefWindow::SavePrefs
|
||||
|
||||
@ -732,7 +727,6 @@ NS_IMETHODIMP nsPrefWindow::cancelPrefs()
|
||||
mPrefs->DeleteBranch("temp_tree");
|
||||
|
||||
// Then close
|
||||
mWindow = nsnull;
|
||||
return Close(mPanelFrame);
|
||||
}
|
||||
|
||||
|
@ -26,9 +26,6 @@ class nsPrefWindow
|
||||
// This class implements the nsISupports interface functions.
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
// // This class implements the nsIAppShellComponent interface functions.
|
||||
// NS_DECL_IAPPSHELLCOMPONENT
|
||||
|
||||
// This class implements the nsIFindComponent interface functions.
|
||||
NS_IMETHOD showWindow(
|
||||
const PRUnichar *id,
|
||||
@ -77,9 +74,7 @@ class nsPrefWindow
|
||||
static nsPrefWindow* sPrefWindow;
|
||||
static PRUint32 sInstanceCount;
|
||||
|
||||
|
||||
nsIWebShellWindow* mWindow;
|
||||
nsString mTreeScript;
|
||||
nsString mTreeScript;
|
||||
nsString mPanelScript;
|
||||
|
||||
nsIDOMWindow* mTreeFrame;
|
||||
|
Loading…
Reference in New Issue
Block a user