Skip to content

Commit

Permalink
Merge pull request #1874 from AlexisCnockaert/renameStColorPicker
Browse files Browse the repository at this point in the history
renamed all ice git hub classes from model to presenter ( not model anymore)
  • Loading branch information
Ducasse authored Jan 10, 2025
2 parents 071906a + b21379a commit 8cd5479
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 133 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 @@ -16,30 +16,36 @@ Class {
#tag : 'View'
}

{ #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 @@ -51,19 +57,19 @@ IceGitHubAcceptPullRequestModel >> defaultLayout [
]

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

^ 'merge'
]

{ #category : 'api' }
IceGitHubAcceptPullRequestModel >> initialExtentForWindow [
IceGitHubAcceptPullRequestPresenter >> initialExtentForWindow [

^ (600 @ 300) scaledByDisplayScaleFactor
]

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

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

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

messageLabel := self newLabel.
messageText := self newText.
Expand All @@ -88,56 +94,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 8cd5479

Please sign in to comment.