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:
law%netscape.com 2006-05-17 02:34:17 +00:00
Родитель deddb160fc
Коммит b68e56cb8a
1 изменённых файлов: 13 добавлений и 0 удалений

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

@ -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 )