diff --git a/byob.js b/byob.js index 08b02ba0..1cf22287 100644 --- a/byob.js +++ b/byob.js @@ -769,7 +769,7 @@ CustomCommandBlockMorph.prototype.userMenu = function () { var ide = this.parentThatIsA(IDE_Morph); ide.saveCanvasAs( this.topBlock().scriptPic(), - this.projectName + ' ' + localize('script pic'), + ide.projectName + ' ' + localize('script pic'), true // request opening a new window ); }, diff --git a/gui.js b/gui.js index c09f4a15..0f916fb3 100644 --- a/gui.js +++ b/gui.js @@ -3006,11 +3006,12 @@ IDE_Morph.prototype.rawSaveProject = function (name) { } }; -// Export project XML, newWindow opens a new tab if true -// This is used both for "Save to Disk" and "Export project..." + IDE_Morph.prototype.exportProject = function (name, newWindow, plain) { + // Export project XML, newWindow opens a new tab if true + // This is used both for "Save to Disk" and "Export project..." var menu, str, dataPrefix; - // saveXMLAs(x, x, true) tries to open a new tab. + if (name) { this.setProjectName(name); dataPrefix = 'data:text/' + plain ? 'plain,' : 'xml,'; @@ -3029,7 +3030,7 @@ IDE_Morph.prototype.exportProject = function (name, newWindow, plain) { menu = this.showMessage('Exporting'); str = this.serializer.serialize(this.stage) this.setURL('#open:' + dataPrefix + encodeURIComponent(str)); - this.saveXMLAs(str, name, true); + this.saveXMLAs(str, name, newWindow); menu.destroy(); this.showMessage('Exported!', 1); } diff --git a/locale.js b/locale.js index fedf386b..ca2d38b3 100644 --- a/locale.js +++ b/locale.js @@ -143,7 +143,7 @@ SnapTranslator.dict.en = { 'It has been saved to your browser\'s downloads folder.', 'unable to export text': 'This item could not be exported from Snap!.\n' + - 'It\'s like that your project may contain a lot of media ' + + 'It\'s like that your project may contain a lot of media ' + '(sounds and images) or that you are using an older browser.' + 'Please try using a recent version of Chrome, Firefox, or Safari.' };