Skip to content

Commit

Permalink
Merge 017b9c4 into 70d8073
Browse files Browse the repository at this point in the history
  • Loading branch information
sirkrypt0 committed Aug 7, 2020
2 parents 70d8073 + 017b9c4 commit 573beef
Show file tree
Hide file tree
Showing 18 changed files with 79 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
structureKeymap: aString

structureKeymap := aString
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
instance creation
accessing
structureKeymap
"adjust this to your keyboard layout"
^ '!@#$%^&*()'
<preference: 'Structure keyboard shortcuts'
category: #SquidWord
description: 'Represents the keys to use with CTRL+SHIFT to toggle structures. Character at position 1 represents toggling structure 1. Leave as is if you use an american keyboard layout, otherwise change e.g. to pressing shift and all numbers 1 to 0 on your keyboard. Be aware that not all shortcuts might work as they might already be reserved by Squeak.'
type: #String>

^ structureKeymap ifNil: ['!@#$%^&*()']
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"class" : {
"initialize" : "AG 7/25/2019 13:10",
"initializeCmdKeyShortcuts" : "OS 5/6/2020 20:40",
"initializeShiftCmdKeyShortcuts" : "tok 5/18/2020 10:19",
"initializeShiftCmdKeyShortcuts" : "tok 8/7/2020 11:14",
"initializeShiftedYellowButtonMenu" : "AG 5/29/2019 18:39",
"initializeYellowButtonMenu" : "AG 5/29/2019 18:39",
"structureKeymap" : "tok 5/18/2020 10:18" },
"structureKeymap" : "tok 8/7/2020 11:13",
"structureKeymap:" : "frc 8/6/2020 19:39" },
"instance" : {
"URLRegex" : "kh 6/15/2020 10:42",
"clipboardContainsURL" : "kh 6/15/2020 13:32",
Expand All @@ -15,7 +16,7 @@
"isCtrlA:" : "lh 7/24/2019 16:59",
"isNewCharacter:" : "tok 6/13/2020 12:03",
"isSpecialCharacter:" : "OS 6/12/2020 12:03",
"isStructureShortcut:" : "OS 6/12/2020 12:09",
"isStructureShortcut:" : "tok 8/7/2020 11:14",
"isValidCharacter:" : "tok 6/13/2020 12:04",
"keyStroke:" : "OS 6/12/2020 12:09",
"makeTextURLFrom:" : "frc 7/16/2020 14:05",
Expand All @@ -27,5 +28,5 @@
"specialCharacters" : "tok 6/13/2020 12:14",
"storeSelectionInParagraph" : "lh 7/24/2019 21:51",
"textSize" : "lh 6/26/2019 22:16",
"toggleStructureSelectionAt:" : "tok 5/18/2020 13:40",
"toggleStructureSelectionAt:" : "tok 8/7/2020 11:14",
"wouldPasteURL" : "kh 6/15/2020 10:42" } }
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"category" : "RichTextEditing-Core",
"classinstvars" : [
],
"structureKeymap" ],
"classvars" : [
],
"commentStamp" : "ls 7/25/2019 13:49",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"selectOptionBold" : "tok 8/3/2020 14:48",
"setUp" : "MB 6/12/2019 18:01",
"simulateKeyboardEventWithButtons:andKeyValue:" : "frc 7/16/2020 12:55",
"simulateKeyboardShortcutForStructure1" : "tok 8/3/2020 14:49",
"simulateKeyboardShortcutForStructure1" : "tok 8/7/2020 11:20",
"tearDown" : "JEH 5/31/2020 12:45",
"textEditor" : "MB 5/22/2019 17:55",
"textHasNoStyle" : "tok 8/3/2020 14:56",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
utilities
changeStructureKeymap

self textEditor class structureKeymap: self newStructureKeymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
utilities
editorStructureKeymap

^ self textEditor class structureKeymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
constants
newStructureKeymap

^ '$=)(/&%§"!'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
running
setUp

super setUp.
self structureKeymap: self editorStructureKeymap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resources
running
setupBoldText

self enterStringOntoTextField: self text.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
structureKeymap: aString

structureKeymap := aString
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
structureKeymap

^ structureKeymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
constants
structureKeymapPreference

^ (self textEditor class asString , '>>', 'structureKeymap') asSymbol
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
running
tearDown

self textEditor class structureKeymap: self structureKeymap.
super tearDown
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
acceptance-tests
testUS183ChangeStructureKeymap

Preferences setFlag: self structureKeymapPreference
toValue: self newStructureKeymap
during: [self assert: self editorStructureKeymap = self newStructureKeymap]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
acceptance-tests
testUS183ChangedStructureKeymapAllowsNewShortcuts

self
changeStructureKeymap;
enterStringOntoTextField: self text.
self textEditor selectAll.
self
simulateKeyboardShortcutForStructure1;
assert: self textIsBold
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
"addStructure" : "ls 6/12/2019 17:54",
"anotherText" : "MB 7/25/2019 11:03",
"autocompletionPreference" : "kh 5/24/2020 18:57",
"changeStructureKeymap" : "tok 8/7/2020 10:15",
"clickRedoButton" : "tok 8/3/2020 15:04",
"clickUndoButton" : "tok 8/3/2020 15:03",
"crKeyCode" : "MB 5/15/2019 20:53",
"ctrlButtonCode" : "MB 5/15/2019 21:04",
"deselectOptionBold" : "tok 8/4/2020 16:55",
"editorSavesIncludeKey:" : "MB 5/22/2019 18:01",
"editorStructureKeymap" : "tok 8/7/2020 11:17",
"enterSaveNameInDialog:" : "tok 7/9/2020 21:57",
"exportAsButtonLabel" : "tok 7/8/2020 16:28",
"footerContainsColNumber" : "JEH 6/14/2020 12:43",
Expand All @@ -22,6 +24,7 @@
"loadDocumentFromSaver" : "tok 7/8/2020 16:09",
"manageStructuresLabel" : "frc 8/1/2020 11:36",
"newButtonLabel" : "MB 6/12/2019 19:18",
"newStructureKeymap" : "tok 8/7/2020 10:55",
"noActiveButtonCode" : "MB 5/15/2019 20:54",
"pressEnter" : "MB 5/15/2019 20:55",
"pressShiftEnter" : "MB 5/15/2019 20:54",
Expand All @@ -31,11 +34,15 @@
"removeStructure" : "ls 7/24/2019 17:24",
"richTextEditorOpenCommand" : "ls 6/22/2019 10:49",
"saveName" : "MB 7/25/2019 11:02",
"setUp" : "tok 8/7/2020 11:18",
"setupBoldText" : "tok 8/4/2020 17:30",
"shiftButtonCode" : "MB 5/15/2019 21:06",
"simulateRedoShortcut" : "tok 8/4/2020 15:23",
"simulateUndoShortcut" : "tok 8/3/2020 14:59",
"structureEditorLabel" : "frc 8/1/2020 11:31",
"structureKeymap:" : "tok 8/7/2020 11:24",
"structureKeymapPreference" : "tok 8/7/2020 10:04",
"tearDown" : "tok 8/7/2020 11:11",
"templateButtonLabel" : "frc 8/1/2020 11:55",
"testDocumentInfoContainsWordcount" : "7/16/2020 10:20:56",
"testInspectDocument" : "JEH 8/3/2020 15:03",
Expand Down Expand Up @@ -76,6 +83,8 @@
"testUS142UndoShortcutUndoesStructure" : "tok 8/4/2020 17:04",
"testUS142UndoStructureUnapplyReappliesStructure" : "tok 8/4/2020 17:20",
"testUS142UndoUndoesStructure" : "tok 8/4/2020 17:04",
"testUS183ChangeStructureKeymap" : "tok 8/7/2020 11:07",
"testUS183ChangedStructureKeymapAllowsNewShortcuts" : "tok 8/7/2020 11:25",
"testUS19ButtonInAppsMenuExists" : "MB 5/15/2019 21:29",
"testUS19WindowsOpensWithoutFailure" : "MB 5/15/2019 21:30",
"testUS24saveAsButtonChangesLabel" : "frc 6/18/2020 19:04",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"commentStamp" : "lh 7/25/2019 12:05",
"instvars" : [
],
"structureKeymap" ],
"name" : "RichTextEditorTests",
"pools" : [
],
Expand Down

0 comments on commit 573beef

Please sign in to comment.