merge julian's changes in
authorKevin Dangoor <kdangoor@mozilla.com>
Sat, 19 Sep 2009 14:48:45 -0400
changeset 2695 8a36103d832d54d284d18957e46f87b05674e124
parent 2694 00364d50cf25bf281b1bbf6500b420dbb7979015 (current diff)
parent 2693 396bde5cc3004f6eae085d19e51ab65911e77854 (diff)
child 2696 81bec9c03b978fa0267d9beedf91078b004150c1
push id1133
push userkdangoor@mozilla.com
push dateSat, 19 Sep 2009 18:51:48 +0000
merge julian's changes in
frontend/js/bespin/editor/actions.js
--- a/frontend/js/bespin/editor/actions.js
+++ b/frontend/js/bespin/editor/actions.js
@@ -839,23 +839,23 @@ dojo.declare("bespin.editor.Actions", nu
     //     var filesearch = bespin.get('filesearch');
     //     if (filesearch) {
     //         filesearch.toggle();
     //     }
     // },
 
     focusCommandline: function() {
         bespin.getComponent("popup", function(popup) {
-            popup.show("output");
+            popup.show("output", "Command Line");
         });
     },
 
     focusFileBrowser: function() {
         bespin.getComponent("popup", function(popup) {
-            popup.show("files");
+            popup.show("files", "File Explorer");
         });
     },
 
     repaint: function() {
         if (!this.ignoreRepaints) {
             this.editor.ui.ensureCursorVisible();
             this.editor.paint();
         }
--- a/frontend/js/bespin/editor/filepopup.js
+++ b/frontend/js/bespin/editor/filepopup.js
@@ -552,19 +552,28 @@ members: {
             this.firstdisplay = false;
             var session = bespin.get("editSession");
             var project = session.project;
             this.currentProject = project;
             this.projects.selectItemByText(project);
             var path = session.path;
             this.restorePath(path);
         }
+        
+        bespin.getComponent('popup', function(popup)
+        { 
+            popup.setTitle("File Explorer");
+        });
     },
 
     hide: function() {
+        bespin.getComponent('popup', function(popup)
+        { 
+            popup.setTitle("Command Line");
+        });
         this.canvas.style.display = "none";
     },
 
     // TODO: this isnt called in this file
     sizeCanvas: function(canvas) {
         if (!this.heightDiff) {
             this.heightDiff = dojo.byId("header").clientHeight + dojo.byId("subheader").clientHeight + dojo.byId("footer").clientHeight;
         }
--- a/frontend/js/bespin/editor/popup.js
+++ b/frontend/js/bespin/editor/popup.js
@@ -108,18 +108,26 @@ members: {
         // How far from the top of the window does the pie go
         canvasTop: 0,
         // How much space do we leave around the opened slices?
         topMargin: 60,
         bottomMargin: 100,
         leftMargin: 60,
         rightMargin: 60
     },
+    
+    setTitle: function(title) {
+        this.title = title;
+        var d = this.calculatePosition();
+        this.renderPopout(d);
+        this.renderToolbar(d);
+    },
 
-    show: function(panel) {
+    show: function(panel, title) {
+        if (title !== undefined) this.title = title;
         var d = this.calculatePosition();
         this.renderPopout(d);
         this.renderToolbar(d);
         bespin.getComponent("commandLine", function(commandline) {
             commandline.showOutput(panel, d.centerPanel);
             this.canvas.style.display = 'block';
             this.visible = true;
             this.resize(true /* manually requested */); // ask to resize in case dirty