Skip to content

Commit

Permalink
Merge branch 'pharo-vcs:Pharo13' into ResizeWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisCnockaert authored Jan 9, 2025
2 parents d585efe + b4ca06c commit d97ccc7
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 60 deletions.
9 changes: 5 additions & 4 deletions Iceberg-TipUI/IceTipCheckoutNewBranchPanel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ IceTipCheckoutNewBranchPanel >> initializePresenters [

self initializeCurrentBranchLabel.
branchLabel := self newLabel
label: 'New branch';
yourself.
label: 'New branch';
yourself.
branchInputText := self newTextInput
placeholder: 'e.g., feature/what';
yourself
placeholder: 'e.g., feature/what';
whenSubmitDo: [ :branchName | self accept ];
yourself
]

{ #category : 'testing' }
Expand Down
72 changes: 39 additions & 33 deletions Iceberg-TipUI/IceTipCommentPanel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -79,59 +79,65 @@ IceTipCommentPanel >> fixesLabel [

{ #category : 'initialization' }
IceTipCommentPanel >> initializePresenters [
| fixesHelpString |

| fixesHelpString |
pushCheckbox := self newCheckBox.
optionsButton := self newToolbar
displayMode: self application toolbarDisplayMode;
add: (self newToolbarToggleButton
icon: (self application iconNamed: #smallSave);
label: 'Save image';
help: 'Save image when committing';
state: self isSaving;
whenChangedDo: [ :aBoolean | self saveOnCommit: aBoolean ];
yourself);
add: (self newToolbarToggleButton
icon: (self application iconNamed: #smallError);
label: 'Run critics';
help: 'Run critics when committing';
state: self isRunningCriticsOnCommit;
whenChangedDo: [ :aBoolean | self runCriticsOnCommit: aBoolean ];
yourself);
yourself.
displayMode: self application toolbarDisplayMode;
add: (self newToolbarToggleButton
icon: (self application iconNamed: #smallSave);
label: 'Save image';
help: 'Save image when committing';
state: self isSaving;
whenChangedDo: [ :aBoolean |
self saveOnCommit: aBoolean ];
yourself);
add: (self newToolbarToggleButton
icon: (self application iconNamed: #smallError);
label: 'Run critics';
help: 'Run critics when committing';
state: self isRunningCriticsOnCommit;
whenChangedDo: [ :aBoolean |
self runCriticsOnCommit: aBoolean ];
yourself);
yourself.

self repositoryModel branchModel hasUpstream
ifTrue: [
pushCheckbox
label: (('Push changes to {1}' format: {self repositoryRemoteName}));
label:
('Push changes to {1}' format: { self repositoryRemoteName });
state: self isPushing;
whenChangedDo: [ :state | self pushOnCommit: state ] ]
ifFalse: [
pushCheckbox
label: 'Cannot push new branch automatically. Use the `Push` option';
label:
'Cannot push new branch automatically. Use the `Push` option';
enabled: false ].

commentText := self newText
placeholder: 'A comment for your commit';
yourself.
commentText := self newText text:
'Branch: ' , repositoryModel branchName
, ', Fixes # ' yourself.

fixesHelpString := 'Enter the number of the issue that you fixed. Github will close it when it will be committed or merged in the default branch'.
fixesLabel := self newLabel
label: 'Fixes #';
help: fixesHelpString;
yourself.
label: 'Fixes #';
help: fixesHelpString;
yourself.
fixesField := self newNumberInput
help: fixesHelpString;
placeholder: 'issue number';
beInteger;
yourself.
help: fixesHelpString;
placeholder: 'issue number';
beInteger;
yourself.

actionButtonBar := self newButtonBar.
actionButtonBar add: (commitButton := self newButton
label: 'Commit';
icon: (self iconNamed: #smallOk);
help: ('Commit your changes to {1}' format: { self repositoryName });
yourself)
label: 'Commit';
icon: (self iconNamed: #smallOk);
help:
('Commit your changes to {1}' format:
{ self repositoryName });
yourself)
]

{ #category : 'testing' }
Expand Down
8 changes: 3 additions & 5 deletions Iceberg-TipUI/IceTipLocalRepositoryPanel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,9 @@ IceTipLocalRepositoryPanel >> validate [

self
assert: self location isNotNil
description: 'Project location must exist!'.
description: 'Please provide a project location!'.
self
assert: self location exists
description: 'Project location must exist!'.
self
assert: (IceRepositoryCreator isGitRoot: self location)
description: 'Project location does not seems to be a valid git repository.'
description: 'Project location must exist!'

]
18 changes: 12 additions & 6 deletions Iceberg-TipUI/IceTipOptionDialogPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ IceTipOptionDialogPresenter class >> defaultPreferredExtent [
{ #category : 'actions' }
IceTipOptionDialogPresenter >> accept [

[
self doAccept.
self closeWindow ]
on: IceError , IceWarning
do: [ :e |
e acceptError: (IceTipInteractiveErrorVisitor newContext: self) ]
[
(self selectedType class = IceTipLocalRepositoryPanel and: [
(IceRepositoryCreator isGitRoot: self selectedType location) not ])
ifTrue: [
self inform: ('"{1}" git repository not found' format:
{ self selectedType location fullName }) ]
ifFalse: [
self doAccept.
self closeWindow ] ]
on: IceError , IceWarning
do: [ :e |
e acceptError: (IceTipInteractiveErrorVisitor newContext: self) ]
]

{ #category : 'accessing' }
Expand Down
25 changes: 13 additions & 12 deletions Iceberg-TipUI/IceTipRepairRepositoryDialogPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ IceTipRepairRepositoryDialogPresenter >> detailPanel [
IceTipRepairRepositoryDialogPresenter >> initializeDialogWindow: aWindow [

super initializeDialogWindow: aWindow.

self refreshDialogButtons.

aWindow
addShortcutWith: [ :action | action
Expand All @@ -76,17 +74,20 @@ IceTipRepairRepositoryDialogPresenter >> initializeOptionsList [
optionsList
hideColumnHeaders;
addColumn: (SpCompositeTableColumn new
addColumn: (SpImageTableColumn new
evaluated: #icon;
beNotExpandable;
yourself);
addColumn: (SpStringTableColumn new
evaluated: #title;
yourself);
yourself);
addColumn: (SpImageTableColumn new
evaluated: #icon;
beNotExpandable;
yourself);
addColumn: (SpStringTableColumn new
evaluated: #title;
yourself);
yourself);
items: self model availableRepairOptions;
whenSelectionChangedDo: [ :selection | self selectionChanged: selection selectedItem ];
whenActivatedDo: [ :selection | selection ifNotNil: [ self accept ] ]
whenSelectionChangedDo: [ :selection |
self selectionChanged: selection selectedItem ];
whenActivatedDo: [ :selection | selection ifNotNil: [ self accept ] ].
optionsList items isEmpty ifFalse: [
optionsList selectItem: optionsList items first ]
]

{ #category : 'initialization' }
Expand Down

0 comments on commit d97ccc7

Please sign in to comment.