Skip to content

Commit

Permalink
renamed ICDoNotCopyFilter
Browse files Browse the repository at this point in the history
add ICInputDialog
  • Loading branch information
Alorcus committed May 23, 2022
1 parent c327fe3 commit 3231960
Show file tree
Hide file tree
Showing 29 changed files with 150 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"commentStamp" : "",
"instvars" : [
],
"name" : "DoNotCopyFilter",
"name" : "ICDoNotCopyFilter",
"pools" : [
],
"super" : "Object",
Expand Down
Empty file.
10 changes: 10 additions & 0 deletions IMAPClient-Util.package/ICInputDialog.class/class/open.with..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
instance creation
open: aFolderDialogInstance with: aLabel
|instance |

"if dialog is opened with existing data, its in update mode"

instance := self new.
instance label: aLabel.

^ ToolBuilder default open: instance
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
acceptButtonLabel

^ 'Accept'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
toolbuilder
buildAcceptButton: builder

^ builder pluggableButtonSpec new
model: self;
label: #acceptButtonLabel;
action: #submit;
frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 2)
extent: self guiElementWidth @ (self guiElementHeight))
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
toolbuilder
buildInputField: builder

^ builder pluggableInputFieldSpec new
model: self;
askBeforeDiscardingEdits: false;
indicateUnacceptedChanges: false;
frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 1) extent: self guiElementWidth @ self guiElementHeight)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
toolbuilder
buildLabel: builder

^ builder pluggableInputFieldSpec new
model: self;
color: #checkBoxColor;
askBeforeDiscardingEdits: false;
indicateUnacceptedChanges: false;
readOnly: true;
getText: #label;
frame: (self guiElementXOffset @ (self guiElementYOffsetOf: 0) extent: self guiElementWidth @ self guiElementHeight)
16 changes: 16 additions & 0 deletions IMAPClient-Util.package/ICInputDialog.class/instance/buildWith..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
toolbuilder
buildWith: builder

| window|

window := (builder build: (builder pluggableWindowSpec new
model: self;
extent: 300 @ 200;
children: {
self buildAcceptButton: builder.
self buildInputField: builder.
self buildLabel: builder.
})).
self inputMorph: window.

^ window
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing - user interface
checkBoxColor

^ Color transparent
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing - user interface
guiElementHeight

^ 0.14
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing - user interface
guiElementWidth

^ 0.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing - user interface
guiElementXOffset

^ (1 - self guiElementWidth) / 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing - user interface
guiElementYOffset

^ 0.02
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing - user interface
guiElementYOffsetOf: aNumber

^ self guiElementYOffset + (aNumber * self guiElementYSpacing)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing - user interface
guiElementYSpacing

^ 0.14
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
inputMorph: aMorph

inputMorph := aMorph
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
inputMorph
^ inputMorph
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
label: String

label := String
3 changes: 3 additions & 0 deletions IMAPClient-Util.package/ICInputDialog.class/instance/label.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
label
^ label
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
action - button
submit

self inputMorph abandon.
21 changes: 21 additions & 0 deletions IMAPClient-Util.package/ICInputDialog.class/methodProperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"class" : {
"open:with:" : "RJPG 5/23/2022 10:39" },
"instance" : {
"acceptButtonLabel" : "RJPG 5/23/2022 10:35",
"buildAcceptButton:" : "RJPG 5/23/2022 10:48",
"buildInputField:" : "RJPG 5/23/2022 10:46",
"buildLabel:" : "RJPG 5/23/2022 10:46",
"buildWith:" : "RJPG 5/23/2022 10:48",
"checkBoxColor" : "RJPG 5/23/2022 10:44",
"guiElementHeight" : "RJPG 5/23/2022 10:41",
"guiElementWidth" : "RJPG 5/23/2022 10:41",
"guiElementXOffset" : "RJPG 5/23/2022 10:41",
"guiElementYOffset" : "RJPG 5/23/2022 10:41",
"guiElementYOffsetOf:" : "RJPG 5/23/2022 10:41",
"guiElementYSpacing" : "RJPG 5/23/2022 10:42",
"inputMorph" : "RJPG 5/23/2022 10:32",
"inputMorph:" : "RJPG 5/23/2022 10:32",
"label" : "RJPG 5/23/2022 10:24",
"label:" : "RJPG 5/23/2022 10:32",
"submit" : "RJPG 5/23/2022 10:43" } }
15 changes: 15 additions & 0 deletions IMAPClient-Util.package/ICInputDialog.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"category" : "IMAPClient-Util",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"label",
"inputMorph" ],
"name" : "ICInputDialog",
"pools" : [
],
"super" : "Model",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
action - emails
login: anEndpoint

| continueAsking |

ICInputDialog open: self with: 'Test text'.

"| continueAsking |
continueAsking := true.
[continueAsking] whileTrue: [
anEndpoint accountInfo password: (Project uiManager requestPassword: 'Please enter your password!').
anEndpoint accountInfo password ifEmpty: [^false].
continueAsking := (self passwordPromtCallback: anEndpoint) not].
^ true
^ true"
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"labelForMail:" : "sf 7/26/2021 14:47",
"loadOlderEmails" : "hg 6/4/2020 20:03",
"loadOlderEmailsProcess" : "JNG 6/3/2021 18:32",
"login:" : "EG 7/7/2021 11:06",
"login:" : "RJPG 5/23/2022 10:38",
"moveEmail:" : "NH 7/31/2020 09:25",
"numberOfFetchedFolders" : "C.G. 7/12/2018 08:14",
"numberOfFetchedFolders:" : "pm 6/9/2019 17:03",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildWith: builder
| window|

self inputCollection: OrderedCollection new.
self doNotCopyFilter: DoNotCopyFilter new.
self doNotCopyFilter: ICDoNotCopyFilter new.

window := (builder build: (builder pluggableWindowSpec new
model: self;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ submit

self insertDefaults.
accountInfo := self createAccountInfo.

self loginMorph abandon.
self addOrEditAccount: accountInfo
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"buildServerPortInputField:" : "pm 6/25/2019 16:43",
"buildSslCheckBox:" : "LW 5/6/2020 11:16",
"buildUserInputField:" : "pm 6/25/2019 16:43",
"buildWith:" : "RJPG 5/23/2022 10:06",
"buildWith:" : "RJPG 5/23/2022 10:23",
"buttonLabel" : "pm 6/3/2019 18:47",
"changeInputField:" : "tg 7/26/2019 16:45",
"checkBoxColor" : "ms 7/13/2016 17:34",
Expand Down Expand Up @@ -59,7 +59,7 @@
"ssl" : "ok 7/9/2019 18:58",
"ssl:" : "ms 7/13/2016 17:25",
"sslCheckBoxLabel" : "ms 7/12/2016 11:00",
"submit" : "EG 7/7/2021 11:07",
"submit" : "RJPG 5/23/2022 10:21",
"symbolArray" : "NH 6/14/2020 12:19",
"toggleSSL" : "ms 7/13/2016 17:37",
"updateMode" : "pm 6/9/2019 13:21",
Expand Down

0 comments on commit 3231960

Please sign in to comment.