Skip to content

Commit

Permalink
fix dialog button positions
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Dec 20, 2023
1 parent 46ab1c1 commit 4085d0b
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ IceGitHubAcceptPullRequestModel >> initialExtentForWindow [
IceGitHubAcceptPullRequestModel >> initializeDialogWindow: aDialogWindowPresenter [

aDialogWindowPresenter
addButton: 'Accept' do: [ :presenter |
self accept ];
addButton: 'Cancel' do: [ :presenter |
presenter triggerCancelAction.
presenter close ]
presenter close ];
addDefaultButton: 'Accept' do: [ :presenter |
self accept ]
]

{ #category : 'initialization' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ IceGitHubCreatePullRequestModel >> initialExtentForWindow [
IceGitHubCreatePullRequestModel >> initializeDialogWindow: aWindow [

aWindow
addButton: 'Create' do: [
self accept ];
addButton: 'Cancel' do: [ :presenter |
presenter triggerCancelAction.
presenter close ]
presenter close ];
addDefaultButton: 'Create' do: [
self accept ]

]

{ #category : 'initialization' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ IceGitHubRejectPullRequestModel >> initialExtentForWindow [
IceGitHubRejectPullRequestModel >> initializeDialogWindow: aDialogWindowPresenter [

aDialogWindowPresenter
addButton: 'Reject' do: [ :presenter |
presenter triggerOkAction.
presenter close ];
addButton: 'Cancel' do: [ :presenter |
presenter triggerCancelAction.
presenter close ];
addDefaultButton: 'Reject' do: [ :presenter |
presenter triggerOkAction.
presenter close ]
]

Expand Down
8 changes: 4 additions & 4 deletions Iceberg-Plugin-GitHub/IceGitHubRemoveBranchesModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ IceGitHubRemoveBranchesModel >> initialize [
IceGitHubRemoveBranchesModel >> initializeDialogWindow: aDialogWindowPresenter [

aDialogWindowPresenter
addButton: 'Remove' do: [ :presenter |
self triggerAcceptAction.
presenter close ];
addButton: 'Cancel' do: [ :presenter |
presenter triggerCancelAction.
presenter close ]
presenter close ];
addDefaultButton: 'Remove' do: [ :presenter |
self triggerAcceptAction.
presenter close ]
]

{ #category : 'initialization' }
Expand Down
6 changes: 3 additions & 3 deletions Iceberg-TipUI/IceTipAbstractCredentialsPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ IceTipAbstractCredentialsPresenter >> initialize [
accepted := false
]

{ #category : 'accessing' }
{ #category : 'initialization' }
IceTipAbstractCredentialsPresenter >> initializeDialogWindow: aDialogWindowPresenter [

super initializeDialogWindow: aDialogWindowPresenter.
self updateOkButton.

aDialogWindowPresenter whenClosedDo: [ accepted ifFalse: [ self cancelAskAction ] ]

aDialogWindowPresenter whenClosedDo: [
accepted ifFalse: [ self cancelAskAction ] ]
]

{ #category : 'initialization' }
Expand Down
4 changes: 2 additions & 2 deletions Iceberg-TipUI/IceTipCritiquesBeforeCommitBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ IceTipCritiquesBeforeCommitBrowser >> initializeDialogWindow: aWindow [
action: (MessageSend receiver: self selector: #updatePresenter);
yourself).

aWindow buttons second label: 'Cancel Commit'.
aWindow buttons third label: 'Force Commit'.
aWindow buttons second label: 'Cancel'.
aWindow buttons third label: 'Commit'.

aWindow
bindKeyCombination: Character cr asShortcut toAction: [ self accept].
Expand Down
7 changes: 3 additions & 4 deletions Iceberg-TipUI/IceTipDialogPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ IceTipDialogPresenter >> initializeDialogWindow: aWindow [
super initializeDialogWindow: aWindow.

aWindow
okAction: [ self accept ];
cancelAction: [ self cancel ];
bindKeyCombination: Character escape asShortcut toAction: [ self cancel ].

okAction: [ self accept ];
cancelAction: [ self cancel ];
bindKeyCombination: Character escape asShortcut toAction: [ self cancel ]
]
7 changes: 2 additions & 5 deletions Iceberg-TipUI/IceTipErrorDialogPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,8 @@ IceTipErrorDialogPresenter >> initialExtentForWindow [
IceTipErrorDialogPresenter >> initializeDialogWindow: aWindow [

aWindow
addButton: 'Debug'
do: [ :presenter | self accept. presenter close ].
aWindow
addButton: 'Ignore'
do: [ :presenter | presenter close ].
addButton: 'Ignore' do: [ :presenter | presenter close ];
addDefaultButton: 'Debug' do: [ :presenter | self accept. presenter close ]
]

{ #category : 'initialization' }
Expand Down
4 changes: 2 additions & 2 deletions Iceberg-TipUI/IceTipOptionDialogPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ IceTipOptionDialogPresenter >> initialExtentForWindow [
IceTipOptionDialogPresenter >> initializeDialogWindow: aWindowPresenter [

aWindowPresenter
addButton: 'Ok' do: [ :presenter | self accept ];
addButton: 'Cancel' do: [ :presenter | presenter close ].
addButton: 'Cancel' do: [ :presenter | presenter close ];
addDefaultButton: 'Ok' do: [ :presenter | self accept ].

aWindowPresenter whenOpenedDo: [ self typeList selectIndex: 1 ]
]
Expand Down

0 comments on commit 4085d0b

Please sign in to comment.