Checked in patch for bug 322395: Preferences not working for firefox extension r=mvl

This commit is contained in:
mostafah%oeone.com 2006-01-06 16:13:55 +00:00
parent 40ef8793a1
commit 8e0a0ab829

View File

@ -187,8 +187,13 @@ function calendarFinish()
function launchPreferences()
{
var applicationName = navigator.vendor;
if (applicationName == "Mozilla" || applicationName == "Firebird" || applicationName == "")
var applicationName="";
if (Components.classes["@mozilla.org/xre/app-info;1"]) {
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULAppInfo);
applicationName = appInfo.name;
}
if (applicationName == "SeaMonkey" || applicationName == "")
goPreferences( "calendarPanel", "chrome://calendar/content/pref/calendarPref.xul", "calendarPanel" );
else
window.openDialog("chrome://calendar/content/pref/prefBird.xul", "PrefWindow", "chrome,titlebar,resizable,modal");