From aefe023f30a5db3476b0d3b5d93059a7ec7d3756 Mon Sep 17 00:00:00 2001 From: Michael Aschauer Date: Sun, 15 Oct 2017 05:34:36 +0200 Subject: [PATCH] remove deprecated buildcontents --- stitchcode/gui.js | 140 ---------------------------------------------- 1 file changed, 140 deletions(-) diff --git a/stitchcode/gui.js b/stitchcode/gui.js index 6c26873e..00fea049 100644 --- a/stitchcode/gui.js +++ b/stitchcode/gui.js @@ -1690,146 +1690,6 @@ IDE_Morph.prototype.selectSprite = function (sprite) { this.currentSprite.scripts.fixMultiArgs(); }; -// turtlestitch project dialog (removin cloud) -/* - -ProjectDialogMorph.prototype.buildContents = function () { - var thumbnail, notification; - - this.addBody(new Morph()); - this.body.color = this.color; - - this.srcBar = new AlignmentMorph('column', this.padding / 2); - - if (this.ide.cloudMsg) { - notification = new TextMorph( - this.ide.cloudMsg, - 10, - null, // style - false, // bold - null, // italic - null, // alignment - null, // width - null, // font name - new Point(1, 1), // shadow offset - new Color(255, 255, 255) // shadowColor - ); - notification.refresh = nop; - this.srcBar.add(notification); - } - - //disable cloud for now - // this.addSourceButton('cloud', localize('Cloud'), 'cloud'); - this.addSourceButton('local', localize('Browser'), 'storage'); - if (this.task === 'open') { - this.addSourceButton('examples', localize('Examples'), 'poster'); - } - this.srcBar.fixLayout(); - this.body.add(this.srcBar); - - if (this.task === 'save') { - this.nameField = new InputFieldMorph(this.ide.projectName); - this.body.add(this.nameField); - } - - this.listField = new ListMorph([]); - this.fixListFieldItemColors(); - this.listField.fixLayout = nop; - this.listField.edge = InputFieldMorph.prototype.edge; - this.listField.fontSize = InputFieldMorph.prototype.fontSize; - this.listField.typeInPadding = InputFieldMorph.prototype.typeInPadding; - this.listField.contrast = InputFieldMorph.prototype.contrast; - this.listField.drawNew = InputFieldMorph.prototype.drawNew; - this.listField.drawRectBorder = InputFieldMorph.prototype.drawRectBorder; - - this.body.add(this.listField); - - this.preview = new Morph(); - this.preview.fixLayout = nop; - this.preview.edge = InputFieldMorph.prototype.edge; - this.preview.fontSize = InputFieldMorph.prototype.fontSize; - this.preview.typeInPadding = InputFieldMorph.prototype.typeInPadding; - this.preview.contrast = InputFieldMorph.prototype.contrast; - this.preview.drawNew = function () { - InputFieldMorph.prototype.drawNew.call(this); - if (this.texture) { - this.drawTexture(this.texture); - } - }; - this.preview.drawCachedTexture = function () { - var context = this.image.getContext('2d'); - context.drawImage(this.cachedTexture, this.edge, this.edge); - this.changed(); - }; - this.preview.drawRectBorder = InputFieldMorph.prototype.drawRectBorder; - this.preview.setExtent( - this.ide.serializer.thumbnailSize.add(this.preview.edge * 2) - ); - - this.body.add(this.preview); - this.preview.drawNew(); - if (this.task === 'save') { - thumbnail = this.ide.stage.thumbnail( - SnapSerializer.prototype.thumbnailSize - ); - this.preview.texture = null; - this.preview.cachedTexture = thumbnail; - this.preview.drawCachedTexture(); - } - - this.notesField = new ScrollFrameMorph(); - this.notesField.fixLayout = nop; - - this.notesField.edge = InputFieldMorph.prototype.edge; - this.notesField.fontSize = InputFieldMorph.prototype.fontSize; - this.notesField.typeInPadding = InputFieldMorph.prototype.typeInPadding; - this.notesField.contrast = InputFieldMorph.prototype.contrast; - this.notesField.drawNew = InputFieldMorph.prototype.drawNew; - this.notesField.drawRectBorder = InputFieldMorph.prototype.drawRectBorder; - - this.notesField.acceptsDrops = false; - this.notesField.contents.acceptsDrops = false; - - if (this.task === 'open') { - this.notesText = new TextMorph(''); - } else { // 'save' - this.notesText = new TextMorph(this.ide.projectNotes); - this.notesText.isEditable = true; - this.notesText.enableSelecting(); - } - - this.notesField.isTextLineWrapping = true; - this.notesField.padding = 3; - this.notesField.setContents(this.notesText); - this.notesField.setWidth(this.preview.width()); - - this.body.add(this.notesField); - - if (this.task === 'open') { - this.addButton('openProject', 'Open'); - this.action = 'openProject'; - } else { // 'save' - this.addButton('saveProject', 'Save'); - this.action = 'saveProject'; - } - this.shareButton = this.addButton('shareProject', 'Share'); - this.unshareButton = this.addButton('unshareProject', 'Unshare'); - this.shareButton.hide(); - this.unshareButton.hide(); - this.deleteButton = this.addButton('deleteProject', 'Delete'); - this.addButton('cancel', 'Cancel'); - - if (notification) { - this.setExtent(new Point(455, 335).add(notification.extent())); - } else { - this.setExtent(new Point(455, 335)); - } - this.fixLayout(); - -}; -*/ - - // Addressing #54: Stage occasionally goes blank IDE_Morph.prototype.originalRefreshPalette = IDE_Morph.prototype.refreshPalette; IDE_Morph.prototype.refreshPalette = function (shouldIgnorePosition) {