Skip to content

Commit

Permalink
[Enh]: Daily Note Button in Gt Home
Browse files Browse the repository at this point in the history
  • Loading branch information
seandenigris committed Jan 23, 2024
1 parent bcdbaa9 commit 588c4ed
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
14 changes: 14 additions & 0 deletions src/Dynabook-GToolkit/DbGtHomeDomainSection.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ DbGtHomeDomainSection >> create [
addChild: self addressBookButton create;
addChild: self booksButton create;
addChild: self eventLogButton create;
addChild: self ppDailyNoteButton create;
addChild: self ppInventoryButton create;
addChild: self ppLocationListButton create;
addChild: self livingLibraryButton create;
Expand Down Expand Up @@ -82,6 +83,19 @@ DbGtHomeDomainSection >> livingLibraryButton [
inspecting: [ LlLibrary uniqueInstance ]
]

{ #category : #stencils }
DbGtHomeDomainSection >> ppDailyNoteButton [

^ self
buttonTitled: 'Daily Note'
iconFileNamed: ''
tooltip: 'Create a TPP note for today'
inspecting: [
| page |
page := LePage journalOn: Date today.
LeDatabasesRegistry defaultPrimaryDatabase addPage: page ]
]

{ #category : #stencils }
DbGtHomeDomainSection >> ppInventoryButton [
^ self
Expand Down
18 changes: 9 additions & 9 deletions src/Dynabook-GToolkit/DbSoup.extension.st
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
Extension { #name : #DbSoup }

{ #category : #'*Dynabook-GToolkit' }
DbSoup class >> addSourceForOlReferencedClass: aClass withBuilder: aBlock [
"Convenience message because usually one wants to add to both ObjectiveLepiter (to support per-instance pages) and DbSoup"

^ self uniqueInstance
addSourceForOlReferencedClass: aClass
withBuilder: aBlock
]

{ #category : #'*Dynabook-GToolkit' }
DbSoup >> addSourceForOlReferencedClass: aClass withBuilder: aBlock [

Expand All @@ -18,3 +9,12 @@ DbSoup >> addSourceForOlReferencedClass: aClass withBuilder: aBlock [

self sources add: aBlock value
]

{ #category : #'*Dynabook-GToolkit' }
DbSoup class >> addSourceForOlReferencedClass: aClass withBuilder: aBlock [
"Convenience message because usually one wants to add to both ObjectiveLepiter (to support per-instance pages) and DbSoup"

^ self uniqueInstance
addSourceForOlReferencedClass: aClass
withBuilder: aBlock
]

0 comments on commit 588c4ed

Please sign in to comment.