зеркало из https://github.com/mozilla/pjs.git
Bug 113936; tailor WinXP start menu so Mozilla's Preferences are used instead of opening IE's; r=ben, sr=hyatt
This commit is contained in:
Родитель
deddb160fc
Коммит
b68e56cb8a
|
@ -31,6 +31,19 @@
|
|||
**/
|
||||
function Startup()
|
||||
{
|
||||
// Check for an existing pref window.
|
||||
const kWindowMediatorContractID = "@mozilla.org/rdf/datasource;1?name=window-mediator";
|
||||
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
|
||||
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
|
||||
var windows = kWindowMediator.getEnumerator("mozilla:preferences");
|
||||
var prefWindow;
|
||||
while ((prefWindow = windows.getNext().QueryInterface(Components.interfaces.nsIDOMWindow)) &&
|
||||
prefWindow != window) {
|
||||
// Prefs already open, activate it and close this one.
|
||||
prefWindow.focus();
|
||||
window.close();
|
||||
}
|
||||
|
||||
hPrefWindow = new nsPrefWindow('panelFrame');
|
||||
|
||||
if( !hPrefWindow )
|
||||
|
|
Загрузка…
Ссылка в новой задаче