Skip to content

Commit

Permalink
Merge remote-tracking branch 'AlexisCnockaert/Pharo13' into ResizeWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Jan 13, 2025
2 parents ea08f63 + 8cd5479 commit 4431111
Show file tree
Hide file tree
Showing 11 changed files with 157 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
I'm a dialog for collecting data to accept a pull request.
"
Class {
#name : 'IceGitHubAcceptPullRequestModel',
#name : 'IceGitHubAcceptPullRequestPresenter',
#superclass : 'IceTipPresenter',
#instVars : [
'messageLabel',
Expand All @@ -21,30 +21,36 @@ IceGitHubAcceptPullRequestModel class >> defaultPreferredExtent [
^ (600 @ 300)
]

{ #category : 'class initialization' }
IceGitHubAcceptPullRequestPresenter class >> initialize [

self deprecatedAliases: { #IceGitHubAcceptPullRequestModel }
]

{ #category : 'actions' }
IceGitHubAcceptPullRequestModel >> accept [
IceGitHubAcceptPullRequestPresenter >> accept [

acceptBlock ifNotNil: [
acceptBlock cull: self ].
self closeWindow
]

{ #category : 'accessing' }
IceGitHubAcceptPullRequestModel >> availableTypes [
IceGitHubAcceptPullRequestPresenter >> availableTypes [

^ #( 'merge' 'squash' 'rebase' )
]

{ #category : 'initialization' }
IceGitHubAcceptPullRequestModel >> connectPresenters [
IceGitHubAcceptPullRequestPresenter >> connectPresenters [

self typeList
items: self availableTypes;
selectItem: self defaultType
]

{ #category : 'layout' }
IceGitHubAcceptPullRequestModel >> defaultLayout [
IceGitHubAcceptPullRequestPresenter >> defaultLayout [

^ SpGridLayout new
beColumnNotHomogeneous;
Expand All @@ -56,13 +62,13 @@ IceGitHubAcceptPullRequestModel >> defaultLayout [
]

{ #category : 'accessing' }
IceGitHubAcceptPullRequestModel >> defaultType [
IceGitHubAcceptPullRequestPresenter >> defaultType [

^ 'merge'
]

{ #category : 'initialization' }
IceGitHubAcceptPullRequestModel >> initializeDialogWindow: aDialogWindowPresenter [
IceGitHubAcceptPullRequestPresenter >> initializeDialogWindow: aDialogWindowPresenter [

aDialogWindowPresenter
addButton: 'Cancel' do: [ :presenter |
Expand All @@ -73,7 +79,7 @@ IceGitHubAcceptPullRequestModel >> initializeDialogWindow: aDialogWindowPresente
]

{ #category : 'initialization' }
IceGitHubAcceptPullRequestModel >> initializePresenters [
IceGitHubAcceptPullRequestPresenter >> initializePresenters [

messageLabel := self newLabel.
messageText := self newText.
Expand All @@ -87,56 +93,56 @@ IceGitHubAcceptPullRequestModel >> initializePresenters [
]

{ #category : 'accessing' }
IceGitHubAcceptPullRequestModel >> message [
IceGitHubAcceptPullRequestPresenter >> message [

^ self messageText text asString
]

{ #category : 'accessing' }
IceGitHubAcceptPullRequestModel >> messageGhostText [
IceGitHubAcceptPullRequestPresenter >> messageGhostText [

^ 'Commit title
Add an optional extented description'
]

{ #category : 'accessing - ui' }
IceGitHubAcceptPullRequestModel >> messageLabel [
IceGitHubAcceptPullRequestPresenter >> messageLabel [

^ messageLabel
]

{ #category : 'accessing - ui' }
IceGitHubAcceptPullRequestModel >> messageText [
IceGitHubAcceptPullRequestPresenter >> messageText [

^ messageText
]

{ #category : 'events' }
IceGitHubAcceptPullRequestModel >> onAccept: aBlock [
IceGitHubAcceptPullRequestPresenter >> onAccept: aBlock [
acceptBlock := aBlock
]

{ #category : 'specs' }
IceGitHubAcceptPullRequestModel >> titleForWindow [
IceGitHubAcceptPullRequestPresenter >> titleForWindow [

^ 'Accept pull request'
]

{ #category : 'accessing' }
IceGitHubAcceptPullRequestModel >> type [
IceGitHubAcceptPullRequestPresenter >> type [

^ self typeList selectedItem
]

{ #category : 'accessing - ui' }
IceGitHubAcceptPullRequestModel >> typeLabel [
IceGitHubAcceptPullRequestPresenter >> typeLabel [

^ typeLabel
]

{ #category : 'accessing - ui' }
IceGitHubAcceptPullRequestModel >> typeList [
IceGitHubAcceptPullRequestPresenter >> typeList [

^ typeList
]
Loading

0 comments on commit 4431111

Please sign in to comment.