Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new folder button to file browser #704

Merged
merged 2 commits into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions src/NewTools-FileBrowser/StFileNavigationSystemPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Class {
'notebookPreviewer',
'fileReferenceTable',
'configButton',
'pathBreadcrumbPresenter'
'pathBreadcrumbPresenter',
'newFolderButton'
],
#category : 'NewTools-FileBrowser-UI',
#package : 'NewTools-FileBrowser',
Expand Down Expand Up @@ -126,6 +127,7 @@ StFileNavigationSystemPresenter >> connectPresenters [
self previousBeforeButtonAction.
self nextButtonAction.
self configButtonAction.
newFolderButton action: [ self createDirectory ]
]

{ #category : 'utilities' }
Expand Down Expand Up @@ -299,6 +301,11 @@ StFileNavigationSystemPresenter >> initializePresenters [
pathBreadcrumbPresenter := self instantiate: StPathBreadcrumbPresenter on: self model.
nameText := self newTextInput.
filtersDropList := self newDropList.
newFolderButton := self newButton
addStyle: 'small';
help: 'New Folder';
icon: (self iconNamed: #add);
yourself.
configButton := self newButton
addStyle: 'small';
help: 'Settings';
Expand Down Expand Up @@ -343,12 +350,13 @@ StFileNavigationSystemPresenter >> nameTextChanged: aText [
StFileNavigationSystemPresenter >> navigationLayout [

^ SpBoxLayout newLeftToRight
vAlignCenter;
add: previousButton expand: false;
add: nextButton expand: false;
add: pathBreadcrumbPresenter expand: false;
addLast: configButton;
yourself
vAlignCenter;
add: previousButton expand: false;
add: nextButton expand: false;
add: pathBreadcrumbPresenter expand: false;
addLast: newFolderButton;
addLast: configButton;
yourself
]

{ #category : 'accessing' }
Expand Down
Loading