remove prompt for zooming
authorRobert Kaiser <kairo@kairo.at>
Sun, 16 Jan 2011 16:31:40 +0000 (17:31 +0100)
committerRobert Kaiser <kairo@kairo.at>
Sun, 16 Jan 2011 16:31:40 +0000 (17:31 +0100)
xulapp/chrome/mandelbrot/content/mandelbrot.js

index 24f9a0c36cc5c1461b462de3eaabbef7f6eb5595..0a4a31aeeb64a771a9ea20466ccb6ffe07f481a9 100644 (file)
@@ -442,24 +442,17 @@ function mouseevent(etype, event) {
         if (zoomend.y < zoomstart.y)
           [zoomend.y, zoomstart.y] = [zoomstart.y, zoomend.y];
 
-        let prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
-                                .getService(Components.interfaces.nsIPromptService);
-        let ok = prompts.confirm(null, gMbrotBundle.getString("zoomConfirmTitle"),
-                                 gMbrotBundle.getString("zoomConfirmLabel"));
-        // ok is now true if OK was clicked, and false if cancel was clicked
-        if (ok) {
-          // determine new "coordinates"
-          let CWidth = gCurrentImageData.C_max.r - gCurrentImageData.C_min.r;
-          let CHeight = gCurrentImageData.C_max.i - gCurrentImageData.C_min.i;
-          let newC_min = new complex(
-              gCurrentImageData.C_min.r + zoomstart.x / gCurrentImageData.iWidth * CWidth,
-              gCurrentImageData.C_min.i + zoomstart.y / gCurrentImageData.iHeight * CHeight);
-          let newC_max = new complex(
-              gCurrentImageData.C_min.r + zoomend.x / gCurrentImageData.iWidth * CWidth,
-              gCurrentImageData.C_min.i + zoomend.y / gCurrentImageData.iHeight * CHeight);
-
-          adjustCoordsAndDraw(newC_min, newC_max);
-        }
+        // determine new "coordinates"
+        let CWidth = gCurrentImageData.C_max.r - gCurrentImageData.C_min.r;
+        let CHeight = gCurrentImageData.C_max.i - gCurrentImageData.C_min.i;
+        let newC_min = new complex(
+            gCurrentImageData.C_min.r + zoomstart.x / gCurrentImageData.iWidth * CWidth,
+            gCurrentImageData.C_min.i + zoomstart.y / gCurrentImageData.iHeight * CHeight);
+        let newC_max = new complex(
+            gCurrentImageData.C_min.r + zoomend.x / gCurrentImageData.iWidth * CWidth,
+            gCurrentImageData.C_min.i + zoomend.y / gCurrentImageData.iHeight * CHeight);
+
+        adjustCoordsAndDraw(newC_min, newC_max);
       }
       zoomstart = undefined;
       break;