Better ergonomy for saving notebooks: Now saving notebooks opens by default the location where the notebook was saved last time or the user documents location, if the previous one was empty.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2017-03-27 17:19:27 +00:00 committed by SantiagoBragagnolo
parent a638a7d5b1
commit c0aa86ee5e
5 changed files with 233 additions and 196 deletions

View File

@ -7,7 +7,7 @@ and its components and the help menu.
"
Class {
#name : #GrafoscopioGUI,
#name : #GrafoscopioDockingBar,
#superclass : #DynamicComposableModel,
#instVars : [
'windowMainMenu',
@ -27,7 +27,7 @@ Class {
}
{ #category : #specs }
GrafoscopioGUI class >> defaultSpec [
GrafoscopioDockingBar class >> defaultSpec [
<spec: #default>
^ SpecLayout composed
@ -53,7 +53,7 @@ GrafoscopioGUI class >> defaultSpec [
]
{ #category : #updating }
GrafoscopioGUI class >> docDataManual [
GrafoscopioDockingBar class >> docDataManual [
"I define some metadata associated to the manual document.
Language is provided according to the ISO 639-1 code convention."
@ -69,7 +69,7 @@ GrafoscopioGUI class >> docDataManual [
]
{ #category : #updating }
GrafoscopioGUI class >> docDataTutorial [
GrafoscopioDockingBar class >> docDataTutorial [
"I define some metadata associated to the tutorial document.
Language is provided according to the ISO 639-1 code convention."
@ -86,17 +86,17 @@ GrafoscopioGUI class >> docDataTutorial [
]
{ #category : #accessing }
GrafoscopioGUI class >> dockingBar [
GrafoscopioDockingBar class >> dockingBar [
^ dockingBar
]
{ #category : #accessing }
GrafoscopioGUI class >> dockingBar: anObject [
GrafoscopioDockingBar class >> dockingBar: anObject [
dockingBar := anObject
]
{ #category : #'graphical interface' }
GrafoscopioGUI class >> downloadingFrom: downloadUrl withMessage: aString into: location [
GrafoscopioDockingBar class >> downloadingFrom: downloadUrl withMessage: aString into: location [
| fileName |
fileName := (downloadUrl splitOn: $/) last.
(location / fileName) exists ifTrue: [ (location / fileName) ensureDelete ].
@ -116,7 +116,7 @@ GrafoscopioGUI class >> downloadingFrom: downloadUrl withMessage: aString into:
]
{ #category : #examples }
GrafoscopioGUI class >> exampleBootstrapDynamicUI1 [
GrafoscopioDockingBar class >> exampleBootstrapDynamicUI1 [
"Starting from an example UI from the Spec-Glamour, to customize towards the grafoscopio
UI and get some ideas"
@ -186,7 +186,7 @@ GrafoscopioGUI class >> exampleBootstrapDynamicUI1 [
]
{ #category : #examples }
GrafoscopioGUI class >> exampleBootstrapDynamicUI2 [
GrafoscopioDockingBar class >> exampleBootstrapDynamicUI2 [
"Starting from an example UI from the Spec-Glamour, to customize towards the grafoscopio
UI and get some ideas"
@ -262,7 +262,7 @@ GrafoscopioGUI class >> exampleBootstrapDynamicUI2 [
]
{ #category : #examples }
GrafoscopioGUI class >> exampleBootstrapUI [
GrafoscopioDockingBar class >> exampleBootstrapUI [
"Starting from an example UI from the Spec-Glamour, to customize towards the grafoscopio
UI and get some ideas"
@ -297,12 +297,12 @@ GrafoscopioGUI class >> exampleBootstrapUI [
]
{ #category : #'class initialization' }
GrafoscopioGUI class >> initialize [
self startDockingBar.
GrafoscopioDockingBar class >> initialize [
self start.
]
{ #category : #'graphical interface' }
GrafoscopioGUI class >> messageAbout [
GrafoscopioDockingBar class >> messageAbout [
"Shows the author, license, sponsors and main contributors to the project and point to further documentation on the web"
LongMessageDialogWindow new
@ -347,7 +347,7 @@ GrafoscopioGUI class >> messageAbout [
]
{ #category : #'graphical interface' }
GrafoscopioGUI class >> messageNoRecentDocuments [
GrafoscopioDockingBar class >> messageNoRecentDocuments [
"Shows that a feature is not implemeted and point to further documentation on the web"
UIManager default abort:
@ -363,7 +363,7 @@ GrafoscopioGUI class >> messageNoRecentDocuments [
]
{ #category : #'graphical interface' }
GrafoscopioGUI class >> messageNotImplementedYet [
GrafoscopioDockingBar class >> messageNotImplementedYet [
"Shows that a feature is not implemeted and point to further documentation on the web"
UIManager default abort:
@ -379,12 +379,12 @@ GrafoscopioGUI class >> messageNotImplementedYet [
]
{ #category : #'graphical interface' }
GrafoscopioGUI class >> open [
GrafoscopioDockingBar class >> open [
^ self new open
]
{ #category : #'graphical interface' }
GrafoscopioGUI class >> openFromRecentlyUsed [
GrafoscopioDockingBar class >> openFromRecentlyUsed [
"Opens a recent notebooks list"
| selection |
@ -402,17 +402,17 @@ GrafoscopioGUI class >> openFromRecentlyUsed [
]
{ #category : #accessing }
GrafoscopioGUI class >> recentNotebooks [
GrafoscopioDockingBar class >> recentNotebooks [
^ recentNotebooks ifNil: [recentNotebooks := OrderedCollection new ]
]
{ #category : #accessing }
GrafoscopioGUI class >> recentNotebooks: anOrderedCollection [
GrafoscopioDockingBar class >> recentNotebooks: anOrderedCollection [
recentNotebooks := anOrderedCollection
]
{ #category : #configuration }
GrafoscopioGUI class >> showSettings [
GrafoscopioDockingBar class >> showSettings [
"Shows the settings in a Transcript. This should return a dictionary for better management of the settings. For the moment
is a quick a dirty hack"
@ -421,9 +421,9 @@ GrafoscopioGUI class >> showSettings [
]
{ #category : #'graphical interface' }
GrafoscopioGUI class >> startDockingBar [
"Creates a custom docking bar for grafoscopio on top, with shorcuts for most used actions,
and a fixed place for asking for help, external tools and grafoscopio updates and about"
GrafoscopioDockingBar class >> start [
"Creates a custom docking bar for grafoscopio on top, for shorcuts to the most used actions,
and as a fixed place for asking for help, external tools and grafoscopio updates and about"
| launchMenu helpMenu updateMenu |
@ -453,7 +453,7 @@ GrafoscopioGUI class >> startDockingBar [
helpMenu
add: 'Tutorial (Spanish)' target: (GrafoscopioNotebook new) selector: #openTutorial;
add: 'Manual' target: (GrafoscopioNotebook new) selector: #openManual;
add: 'Manual (PDF)' target: (self new) selector: #openPDFManual;
add: 'Manual (PDF)' target: GrafoscopioDocumentation selector: #openPDFManual;
add: 'Dev''s notes' target: (GrafoscopioNotebook new) selector: #openDevNotes;
add: 'About Grafoscopio' target: self selector: #messageAbout.
@ -468,7 +468,7 @@ GrafoscopioGUI class >> startDockingBar [
]
{ #category : #updating }
GrafoscopioGUI class >> updateDataviz [
GrafoscopioDockingBar class >> updateDataviz [
"I'm update the Dataviz package with new versions of itself take from the source code repository.
DataViz contains Data visualization helpers"
Gofer it
@ -479,7 +479,7 @@ GrafoscopioGUI class >> updateDataviz [
]
{ #category : #updating }
GrafoscopioGUI class >> updateDatavizUI [
GrafoscopioDockingBar class >> updateDatavizUI [
"I'm the User Interface for updating the Dataviz package with new versions of itself take from the source code repository"
| update |
@ -493,7 +493,7 @@ GrafoscopioGUI class >> updateDatavizUI [
]
{ #category : #updating }
GrafoscopioGUI class >> updateDocumentationUI [
GrafoscopioDockingBar class >> updateDocumentationUI [
"Updates documentation (manual, tutorials) from official repository"
| update |
@ -505,7 +505,7 @@ GrafoscopioGUI class >> updateDocumentationUI [
]
{ #category : #updating }
GrafoscopioGUI class >> updateGrafoscopio [
GrafoscopioDockingBar class >> updateGrafoscopio [
"Updates Grafoscopio with new versions of itself take from the source code repository and
the User Interface"
Gofer new
@ -516,7 +516,7 @@ GrafoscopioGUI class >> updateGrafoscopio [
]
{ #category : #updating }
GrafoscopioGUI class >> updateGrafoscopioUI [
GrafoscopioDockingBar class >> updateGrafoscopioUI [
"Updates Grafoscopio with new versions of itself take from the source code repository and
the User Interface"
| update |
@ -533,7 +533,7 @@ GrafoscopioGUI class >> updateGrafoscopioUI [
]
{ #category : #updating }
GrafoscopioGUI class >> updatePrerrequisitesScript [
GrafoscopioDockingBar class >> updatePrerrequisitesScript [
"Updates the system prerequisites with new versions of itself take from the source code repository"
"Visualization library (which also makes main menu loadable)"
@ -609,43 +609,39 @@ GrafoscopioGUI class >> updatePrerrequisitesScript [
]
{ #category : #updating }
GrafoscopioGUI class >> updateRecentNotebooksWith: aFileReference [
GrafoscopioDockingBar class >> updateRecentNotebooksWith: aFileReference [
(self recentNotebooks includes: aFileReference)
ifFalse: [self recentNotebooks add: aFileReference].
]
{ #category : #updating }
GrafoscopioGUI class >> updateSystem [
"Updates the system with new versions of itself take from the source code repository"
| update |
update := (UIManager default
question: '¿Desea actualizar grafoscopio?'
title: 'Actualizar grafoscopio').
update ifNotNil: [
update
ifFalse: [ self inform: 'Actualización de todo el sistema NO realizada.' ]
ifTrue: [
self
updateGrafoscopio;
updateDataviz.
GrafoscopioDocumentation update.
ExternalApp installSQLite32Bits.
self inform: 'Actualización de todo el sistema terminada.']
]
GrafoscopioDockingBar class >> updateSystem [
| tmp1 tmp2 |
tmp1 := UIManager default
question: 'Do you wish to update all Grafoscopio and its co-dependencies ?'
title: 'Actualizar grafoscopio'.
tmp1
ifNotNil: [ tmp1
ifTrue: [ tmp2 := self.
tmp2
updateGrafoscopio;
updateDataviz.
GrafoscopioDocumentation update.
self inform: 'Actualización de todo el sistema terminada.' ]
ifFalse: [ self inform: 'Actualización de todo el sistema NO realizada.' ] ]
]
{ #category : #updating }
GrafoscopioGUI class >> updateUI [
GrafoscopioDockingBar class >> updateUI [
"I update the User Interface (UI) with new versions of the docking bar or logos where available.
I'm helpful while testing new functionality that should be expossed to the user via the UI"
self startDockingBar.
self start.
(World submorphs select: [ :each | each class = DockingBarMorph ]) allButFirstDo: [ :bar | bar delete ].
]
{ #category : #'ui-building' }
GrafoscopioGUI >> proyectSubMenu [
GrafoscopioDockingBar >> proyectSubMenu [
"This should be integrated with the GrafoscopioNotebook same messages.
Was originally wrote in Spanish, and something is lost in translation, but Grafoscopio
should be available in several languages..."

View File

@ -25,7 +25,22 @@ GrafoscopioDocumentation class >> current [
gfcDocumentation documents
add: 'Docs/Es/Tutoriales/tutorial.ston';
add: 'Docs/En/Books/Manual/manual.ston';
add: 'Docs/En/dev-notes.ston'.
add: 'Docs/En/dev-notes.ston';
add: 'Docs/En/Books/Manual/manual.pdf'.
gfcDocumentation localPlace.
^ gfcDocumentation
]
{ #category : #operation }
GrafoscopioDocumentation class >> dataviz [
"I model the important documents that belong to the Grafoscopio documentation.
When more documents become more mature and usable, I will include them."
| gfcDocumentation |
gfcDocumentation := self new.
gfcDocumentation repository: (FossilRepo new url: 'http://mutabit.com/repos.fossil/grafoscopio').
gfcDocumentation documents
add: 'Packages/Dataviz/dataviz.ston'.
gfcDocumentation localPlace.
^ gfcDocumentation
]
@ -39,7 +54,7 @@ GrafoscopioDocumentation class >> download: fileNameWithRelativePath [
relativePathFolders do: [ :folder | newPath := newPath / folder ].
parentFolder := newPath asFileReference.
parentFolder exists ifFalse: [ parentFolder ensureCreateDirectory ].
GrafoscopioGUI
GrafoscopioDockingBar
downloadingFrom: self current repository url asString, '/doc/tip/', fileNameWithRelativePath
withMessage: 'Downloading ', fileName
into: parentFolder
@ -51,12 +66,7 @@ GrafoscopioDocumentation class >> initialize [
]
{ #category : #updating }
GrafoscopioDocumentation class >> isUpdated [
^ (self listOutdated size > 0) ifTrue: [ ^ false ] ifFalse: [ ^ true ]
]
{ #category : #updating }
GrafoscopioDocumentation class >> isUpdatedFor: relativeFilePath [
GrafoscopioDocumentation class >> isFileUpdatedFor: relativeFilePath [
"I compare if the local and remote copies of a relativeFilePath are updated for the current
documentation and return true if they are and false in any other case"
| localFile |
@ -66,10 +76,36 @@ GrafoscopioDocumentation class >> isUpdatedFor: relativeFilePath [
ifTrue: [ ^ ExternalApp compareHashFor: localFile with: (self current repository lastHashNumberFor: relativeFilePath) ]
]
{ #category : #updating }
GrafoscopioDocumentation class >> isUpdated [
^ (self listOutdated isEmpty) ifTrue: [ ^ false ] ifFalse: [ ^ true ]
]
{ #category : #updating }
GrafoscopioDocumentation class >> listOutdated [
"I return the list of all documentent where the local copy and the remote copy doesn't match"
^ self current documents select: [ :doc | (self isUpdatedFor: doc) = false ]
self listOutdatedDocsIn: self current documents
]
{ #category : #updating }
GrafoscopioDocumentation class >> listOutdatedDocsIn: aDocumentsCollection [
"I return the list of all documentent where the local copy and the remote copy doesn't match"
^ aDocumentsCollection select: [ :doc | (self isFileUpdatedFor: doc) = false ]
]
{ #category : #'as yet unclassified' }
GrafoscopioDocumentation class >> openDatavizIntro [
self shouldBeImplemented.
]
{ #category : #operation }
GrafoscopioDocumentation class >> openPDFManual [
"I open the documentation in PDF format. I only work on Unix right now, but in the future my creator hopes to be able
to have truly multiplatform support"
| pdfManual docs |
docs := self current.
pdfManual := docs documents at: 4.
UnixProcess command: 'xdg-open ', (docs localPlace / pdfManual) fullName.
]
{ #category : #updating }

View File

@ -24,7 +24,8 @@ Class {
'level',
'nodesInPreorder',
'metadata',
'links'
'links',
'output'
],
#classInstVars : [
'clipboard'
@ -260,7 +261,7 @@ GrafoscopioNode >> bodyAsCode [
| codeBody |
codeBody := '' writeStream.
codeBody
nextPutAll: ('~~~'); lf;
nextPutAll: ('~~~{.numberLines}'); lf;
nextPutAll: (self body contents asString withInternetLineEndings); lf;
nextPutAll: ('~~~'); lf; lf.
^ codeBody contents
@ -270,7 +271,7 @@ GrafoscopioNode >> bodyAsCode [
GrafoscopioNode >> bodyAsMarkdownInto: aStream [
"I export the header as markdown using the level inside the tree to determine hierarchy
and replacing all line endings to make them Internet friendly".
self embeddedNodes ifNotNil: [ aStream nextPutAll: (self embedNodes contents withInternetLineEndings); crlf; crlf].
self embeddedNodes ifNotNil: [ aStream nextPutAll: (self embedNodes contents asString withInternetLineEndings); crlf; crlf].
]
{ #category : #accessing }
@ -371,7 +372,7 @@ GrafoscopioNode >> embeddedNodes [
GrafoscopioNode >> exportCodeBlockTo: aStream [
"I convert the content of a node taged as 'código' (code) as pandoc markdown and put it
into aStream."
aStream nextPutAll: ('~~~'); lf.
aStream nextPutAll: ('~~~{.numberLines}'); lf.
aStream nextPutAll: (self body contents asString withInternetLineEndings); lf.
aStream nextPutAll: ('~~~'); lf;lf.
^aStream contents
@ -679,9 +680,13 @@ GrafoscopioNode >> parent: aNode [
]
{ #category : #'add/remove nodes' }
GrafoscopioNode >> pasteFromClipboard [
GrafoscopioNode >> pasteFromClipboard [
| clipchild |
self class clipboard
ifNotNil: [ self addNode: self class clipboard ]
ifNotNil: [
clipchild := self class clipboard.
self addNode: clipchild.
clipchild ]
ifNil: [ self inform: 'Cache is emtpy. Pleas cut/copy a node before pasting' ]
]

View File

@ -127,11 +127,10 @@ GrafoscopioNotebook >> exportAsMarkdown [
workingFile
ifNil: [ self inform: 'File NOT exported. Please save the notebook on hard drive first' ]
ifNotNil: [
self markdownFile exists ifTrue: [ self markdownFile delete ].
self markdownFile ensureCreateFile.
self markdownFile writeStreamDo: [:stream | stream nextPutAll: self notebook asMarkdown].
"[ self exportAsMarkdown: self notebook on: ( markdownFile writeStream )]
ensure: [ (markdownFile writeStream) ifNotNil: #close ]."
self markdownFile
exists ifTrue: [ self markdownFile delete ];
ensureCreateFile;
writeStreamDo: [:stream | stream nextPutAll: self notebook asMarkdown].
self inform: ('File exported as: ', String cr, self markdownFile fullName)]
]
@ -195,8 +194,9 @@ GrafoscopioNotebook >> initializePresenter [
{ #category : #initialization }
GrafoscopioNotebook >> initializeWidgets [
windowMainMenu := self newWindowMainMenu.
windowMainMenu := self topBar.
header := self newTextInput.
header autoAccept: true.
body := self newText.
body disable.
body text: '<- Select a node'.
@ -247,121 +247,6 @@ GrafoscopioNotebook >> moveNodeBefore [
self notebookContent: notebook
]
{ #category : #initialization }
GrafoscopioNotebook >> newWindowMainMenu [
^MenuModel new
addGroup: [ :group |
group addItem: [ :item |
item
name: 'Notebook';
icon: Smalltalk ui icons smallObjectsIcon;
subMenu: self notebookSubMenu ].
group addItem: [ :item |
item
name: 'Project';
icon: Smalltalk ui icons catalogIcon;
subMenu: self projectSubMenu ] ];
addGroup: [ :group |
group addItem: [ :item |
item
name: nil;
description: 'Save notebook';
icon: Smalltalk ui icons smallSaveIcon;
action: [ self saveWorkingNotebook ] ].
group addItem: [ :item |
item
name: nil;
description: 'Cut';
icon: Smalltalk ui icons smallCutIcon;
action: [ self cutNodeToClipboard ] ].
group addItem: [ :item |
item
name: nil;
description: 'Copy';
icon: Smalltalk ui icons smallCopyIcon;
action: [ self copyNodeToClipboard ] ].
group addItem: [ :item |
item
name: nil;
description: 'Paste';
icon: Smalltalk ui icons smallPasteIcon;
action: [ self pasteNodeFromClipboard ] ]];
addGroup: [ :group |
group addItem: [ :item |
item
name: nil;
description: 'Add node';
icon: MendaIcons new plusIcon;
action: [ self addNode ] ].
group addItem: [ :item |
item
name: nil;
description: 'Delete node';
icon: MendaIcons new minusIcon;
action: [ self removeNode ] ].
group addItem: [ :item |
item
name: nil;
description: 'Move node up';
icon: MendaIcons new arrowUpIcon;
action: [ self moveNodeBefore ] ].
group addItem: [ :item |
item
name: nil;
description: 'Move node down';
icon: MendaIcons new arrowDownIcon;
action: [ self moveNodeAfter ] ].
group addItem: [ :item |
item
name: nil;
description: 'Move node left';
icon: MendaIcons new arrowLeftIcon;
action: [ self promoteNode ] ].
group addItem: [ :item |
item
name: nil;
description: 'Move node right';
icon: MendaIcons new arrowRightIcon;
action: [ self demoteNode ] ]];
addGroup: [ :group |
group addItem: [ :item |
item
name: nil;
description: 'Togle: code <--> text';
icon: MendaIcons new smalltalkCodeIcon;
action: [ self toggleCodeNode ] ].
group addItem: [ :item |
item
name: nil;
description: 'Visit link';
icon: Smalltalk ui icons glamorousRight;
action: [ self visitNodeLink ] ].
group addItem: [ :item |
item
name: nil;
description: 'Load link';
icon: Smalltalk ui icons glamorousRefresh;
action: [ self updateForSpecialLinks ] ].
group addItem: [ :item |
item
name: nil;
description: 'Tag as...';
icon: MendaIcons new tagAddIcon;
action: [ self inform: 'To be implemented...' ] ].
group addItem: [ :item |
item
name: nil;
description: 'Untag ....';
icon: MendaIcons new tagMinusIcon;
action: [ self inform: 'To be implemented...' ] ].
group addItem: [ :item |
item
name: nil;
description: 'Edit tags...';
icon: FontAwesomeIcons new tagsIcon;
action: [ self inform: 'To be implemented...' ] ]].
]
{ #category : #accessing }
GrafoscopioNotebook >> notebook [
^ notebook
@ -468,7 +353,7 @@ GrafoscopioNotebook >> openDocumentationNotebookAt: index [
notebookTemp := (gfcDocs localPlace fullName, '/', (gfcDocs documents at: index)) asFileReference.
notebookTemp exists
ifTrue: [self class new openFromFile: notebookTemp]
ifFalse: [ GrafoscopioGUI updateDocumentationUI ]]
ifFalse: [ GrafoscopioDockingBar updateDocumentationUI ]]
]
{ #category : #persistence }
@ -495,7 +380,7 @@ GrafoscopioNotebook >> openFromFileSelector [
self workingFile: fileStream name asFileReference.
nb := self class new.
nb openFromFile: self workingFile.
GrafoscopioGUI updateRecentNotebooksWith: workingFile
GrafoscopioDockingBar updateRecentNotebooksWith: workingFile
]
{ #category : #persistence }
@ -504,7 +389,7 @@ GrafoscopioNotebook >> openFromUrl: anUrl [
| fileName |
fileName := (anUrl splitOn: '/') last.
GrafoscopioGUI
GrafoscopioDockingBar
downloadingFrom: anUrl
withMessage: 'Downloading document...'
into: FileLocator temp.
@ -614,7 +499,7 @@ GrafoscopioNotebook >> saveToFile: aFileReference [
ensure: [ (self workingFile writeStream) ifNotNil: #close ].
self title: self workingFile basenameWithIndicator, ' | Grafoscopio notebook'.
self inform: ('File saved at: ', String cr, self workingFile fullName).
GrafoscopioGUI updateRecentNotebooksWith: aFileReference.
GrafoscopioDockingBar updateRecentNotebooksWith: aFileReference.
]
@ -626,7 +511,7 @@ GrafoscopioNotebook >> saveToFileUI [
file := UIManager default
fileSave: 'Export notebook to file as...'
extensions: #('ston')
path: nil.
path: (workingFile ifNotNil: [ workingFile parent ] ifNil: [ FileLocator documents ] ).
file
ifNil: [ self inform: 'Export cancelled'. ^ self ]
ifNotNil:[self saveToFile: file].
@ -638,7 +523,7 @@ GrafoscopioNotebook >> saveWorkingNotebook [
self workingFile
ifNil: [ self saveToFileUI ]
ifNotNil: [ self saveToFile: workingFile ].
GrafoscopioGUI updateRecentNotebooksWith: workingFile
GrafoscopioDockingBar updateRecentNotebooksWith: workingFile
]
@ -653,6 +538,121 @@ GrafoscopioNotebook >> toggleCodeNode [
self updateBodyFor: currentNode.
]
{ #category : #initialization }
GrafoscopioNotebook >> topBar [
^MenuModel new
addGroup: [ :group |
group addItem: [ :item |
item
name: 'Notebook';
icon: Smalltalk ui icons smallObjects;
subMenu: self notebookSubMenu ].
group addItem: [ :item |
item
name: 'Project';
icon: Smalltalk ui icons catalog;
subMenu: self projectSubMenu ] ];
addGroup: [ :group |
group addItem: [ :item |
item
name: nil;
description: 'Save notebook';
icon: Smalltalk ui icons glamorousSave;
action: [ self saveWorkingNotebook ] ].
group addItem: [ :item |
item
name: nil;
description: 'Cut';
icon: Smalltalk ui icons smallCut;
action: [ self cutNodeToClipboard ] ].
group addItem: [ :item |
item
name: nil;
description: 'Copy';
icon: Smalltalk ui icons smallCopy;
action: [ self copyNodeToClipboard ] ].
group addItem: [ :item |
item
name: nil;
description: 'Paste';
icon: Smalltalk ui icons smallPaste;
action: [ self pasteNodeFromClipboard ] ]];
addGroup: [ :group |
group addItem: [ :item |
item
name: nil;
description: 'Add node';
icon: MendaIcons new plusIcon;
action: [ self addNode ] ].
group addItem: [ :item |
item
name: nil;
description: 'Delete node';
icon: MendaIcons new minusIcon;
action: [ self removeNode ] ].
group addItem: [ :item |
item
name: nil;
description: 'Move node up';
icon: MendaIcons new arrowUpIcon;
action: [ self moveNodeBefore ] ].
group addItem: [ :item |
item
name: nil;
description: 'Move node down';
icon: MendaIcons new arrowDownIcon;
action: [ self moveNodeAfter ] ].
group addItem: [ :item |
item
name: nil;
description: 'Move node left';
icon: MendaIcons new arrowLeftIcon;
action: [ self promoteNode ] ].
group addItem: [ :item |
item
name: nil;
description: 'Move node right';
icon: MendaIcons new arrowRightIcon;
action: [ self demoteNode ] ]];
addGroup: [ :group |
group addItem: [ :item |
item
name: nil;
description: 'Togle: code <--> text';
icon: MendaIcons new smalltalkCodeIcon;
action: [ self toggleCodeNode ] ].
group addItem: [ :item |
item
name: nil;
description: 'Visit link';
icon: Smalltalk ui icons glamorousRight;
action: [ self visitNodeLink ] ].
group addItem: [ :item |
item
name: nil;
description: 'Load link';
icon: Smalltalk ui icons glamorousRefresh;
action: [ self updateForSpecialLinks ] ].
group addItem: [ :item |
item
name: nil;
description: 'Tag as...';
icon: MendaIcons new tagAddIcon;
action: [ self inform: 'To be implemented...' ] ].
group addItem: [ :item |
item
name: nil;
description: 'Untag ....';
icon: MendaIcons new tagMinusIcon;
action: [ self inform: 'To be implemented...' ] ].
group addItem: [ :item |
item
name: nil;
description: 'Edit tags...';
icon: FontAwesomeIcons new tagsIcon;
action: [ self inform: 'To be implemented...' ] ]].
]
{ #category : #accessing }
GrafoscopioNotebook >> tree [
^ tree

View File

@ -24,12 +24,12 @@ ManifestGrafoscopio class >> ruleRBEqualsTrueRuleV1FalsePositive [
{ #category : #'code-critics' }
ManifestGrafoscopio class >> ruleRBLongMethodsRuleV1FalsePositive [
^ #(#(#(#RGMethodDefinition #(#GrafoscopioNotebook #newWindowMainMenu #false)) #'2016-12-17T18:51:33.99062-05:00') #(#(#RGMethodDefinition #(#GrafoscopioNotebook #notebookSubMenu #false)) #'2017-02-02T11:43:53.106456-05:00') )
^ #(#(#(#RGMethodDefinition #(#GrafoscopioNotebook #topBar #false)) #'2016-12-17T18:51:33.99062-05:00') #(#(#RGMethodDefinition #(#GrafoscopioNotebook #notebookSubMenu #false)) #'2017-02-02T11:43:53.106456-05:00') )
]
{ #category : #'code-critics' }
ManifestGrafoscopio class >> ruleRBSentNotImplementedRuleV1FalsePositive [
^ #(#(#(#RGMetaclassDefinition #(#'GrafoscopioGUI class' #GrafoscopioGUI)) #'2015-12-23T10:38:16.706667-05:00') #(#(#RGClassDefinition #(#GrafoscopioGUI)) #'2016-01-06T18:53:45.844051-05:00') #(#(#RGMethodDefinition #(#GrafoscopioNotebook #newWindowMainMenu #false)) #'2016-12-17T18:51:40.617924-05:00') )
^ #(#(#(#RGMetaclassDefinition #(#'GrafoscopioGUI class' #GrafoscopioDockingBar)) #'2015-12-23T10:38:16.706667-05:00') #(#(#RGClassDefinition #(#GrafoscopioDockingBar)) #'2016-01-06T18:53:45.844051-05:00') #(#(#RGMethodDefinition #(#GrafoscopioNotebook #topBar #false)) #'2016-12-17T18:51:40.617924-05:00') )
]
{ #category : #'code-critics' }