really make mandelbrot ready for add-on release
[mandelbrot.git] / xulapp / chrome / mandelbrot / content / mandelbrot.js
index e4c7d9a77de84f7dcae94470317f5f3ac5b86319..5533f22e7a88950b89b973b82ccb8da5307bb4d4 100644 (file)
@@ -45,6 +45,7 @@ var gCurrentImageData;
 
 function Startup() {
   updateIterMenu();
+  updateAlgoMenu();
   updatePaletteMenu();
   gMbrotBundle = document.getElementById("mbrotBundle");
   document.getElementById("statusLabel").value = gMbrotBundle.getString("statusEmpty");
@@ -484,6 +485,15 @@ function saveImage() {
   }
 }
 
+function exitMandelbrot() {
+  var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
+                          .getService(Components.interfaces.nsIXULAppInfo);
+  if (appInfo.ID == "mandelbrot@kairo.at")
+    quitApp(false);
+  else
+    window.close();
+}
+
 function updateBookmarkMenu(aParent) {
   document.getElementById("bookmarkSave").disabled =
     (!document.getElementById("drawButton").hidden || (gStartTime > 0));