From d5d55626c5c7131d8ea2bd2604dde8ded5d16128 Mon Sep 17 00:00:00 2001 From: Sven Van Caekenberghe Date: Tue, 7 Nov 2023 14:16:10 +0100 Subject: [PATCH] Add a Set button to ZTimezone>>#gtViewCurrentTimezoneIn: --- .../ZTimestamp-GT/ZTimezone.extension.st | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/repository/ZTimestamp-GT/ZTimezone.extension.st b/repository/ZTimestamp-GT/ZTimezone.extension.st index ed9f9e9..fd748ad 100644 --- a/repository/ZTimestamp-GT/ZTimezone.extension.st +++ b/repository/ZTimestamp-GT/ZTimezone.extension.st @@ -80,10 +80,25 @@ ZTimezone class >> gtViewCurrentTimezoneIn: composite [ ^ composite columnedList title: 'Current'; priority: 11; - items: [ {('image default' -> self current id)} ]; + items: [ { ('image default' -> self current id) } ]; column: 'Key' text: #key; column: 'Value' text: #value; - send: [ self current ] + send: [ self current ]; + actionDropdownButtonLabel: 'Set' + tooltip: 'Set the defult image timezone' + content: [ :aButton :aTab | + BrSimpleList new + items: ZTimezone timezoneIdentifiers sorted; + stencil: [ :aString | + BrLabel new + aptitude: BrGlamorousLabelAptitude new + + BrGlamorousListItemAptitude; + text: aString; + when: BlClickEvent do: [ :anEvent | + ZTimezone current: (ZTimezone id: aString). + self inform: ('image timezone set to {1}' format: { aString }). + aTab viewContentElement phlow update. + anEvent target fireEvent: BrDropdownHideWish new] ] ] ] { #category : #'*ZTimestamp-GT' }