The Inbox: HelpSystem-Core-ct.134.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: HelpSystem-Core-ct.134.mcz

commits-2
Christoph Thiede uploaded a new version of HelpSystem-Core to project The Inbox:
http://source.squeak.org/inbox/HelpSystem-Core-ct.134.mcz

==================== Summary ====================

Name: HelpSystem-Core-ct.134
Author: ct
Time: 2 March 2021, 3:45:09.69417 pm
UUID: 427affe2-8ef9-464d-9f35-3b42e41eecc9
Ancestors: HelpSystem-Core-ct.124

Refactors removal of selectors. Complements System-ct.1221. Depends indeed on HelpSystem-Core-ct.124 (inbox).

=============== Diff against HelpSystem-Core-ct.124 ===============

Item was changed:
  ----- Method: ClassBasedHelpTopic>>removeSubtopic: (in category 'editing') -----
  removeSubtopic: aTopic
 
+ | needsToStorePages oldPages |
+ aTopic isClassBasedHelpTopic ifTrue: [
+ | result |
+ result := aTopic removeTopicClass.
+ result ifTrue: [self refresh].
+ ^ result].
- | needsToStorePages confirmation oldPages |
- aTopic isClassBasedHelpTopic
- ifTrue: [
- | result |
- result := aTopic removeTopicClass.
- result ifTrue: [self refresh].
- ^ result].
 
  aTopic key ifNil: [
  self inform: 'Could not find topic' translated.
  ^ false].
+
  (self confirm: ('Are you sure you want to REMOVE the topic "{1}" from "{2}"?' translated format: {aTopic title. self title}))
  ifFalse: [^ false].
+
  needsToStorePages := self needsToStorePages.
  needsToStorePages ifTrue: [
  (self okToWriteSelector: #pages)
  ifFalse: [^ false].
  oldPages := self helpClass pages].
+
+ (self systemNavigation
+ confirmAndRemoveSelector: aTopic key
+ class: self helpClass theMetaClass)
+ ifFalse: [^ false].
+
- confirmation := self systemNavigation
- confirmRemovalOf: aTopic key
- on: self helpClass theMetaClass.
- confirmation = 3 ifTrue: [^ false].
- self helpClass theMetaClass removeSelector: aTopic key.
  needsToStorePages ifTrue: [
  self storePages: (oldPages copyWithout: aTopic key)].
-
  self refresh.
- confirmation = 2 ifTrue: [
- self systemNavigation browseAllCallsOn: aTopic key].
  ^ true!