Skip to content

Commit

Permalink
Fixes: pharo-project#4986 now message list title can be changed by us…
Browse files Browse the repository at this point in the history
…ers.
  • Loading branch information
Ducasse committed Oct 25, 2019
1 parent 64c9a9c commit 5a425cf
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/Spec2-Tools/MessageBrowser.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Class {
#superclass : #AbstractMessageCentricBrowser,
#instVars : [
'textModel',
'refreshingBlock'
'refreshingBlock',
'title'
],
#category : #'Spec2-Tools-Senders'
}
Expand Down Expand Up @@ -176,6 +177,11 @@ MessageBrowser >> connectPresenters [
textModel acceptBlock: [ :text :notifyer | (self accept: text notifying: notifyer) notNil ]
]

{ #category : #private }
MessageBrowser >> defaultTitle [
^ self class title , ' [' , messageList numberOfElements printString , ']'
]

{ #category : #'text selection' }
MessageBrowser >> findFirstOccurrenceOf: searchedString in: textToSearchIn [
"Return the first index of aString in textToSearchIn "
Expand Down Expand Up @@ -544,7 +550,14 @@ MessageBrowser >> textModel: aModel [

{ #category : #private }
MessageBrowser >> title [
^ self class title , ' [' , messageList numberOfElements printString , ']'
^ title ifNil: [ title := self defaultTitle ]

]

{ #category : #private }
MessageBrowser >> title: aString [
title := aString.
self updateTitle
]

{ #category : #accessing }
Expand Down

0 comments on commit 5a425cf

Please sign in to comment.