The Trunk: PreferenceBrowser-ct.88.mcz

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

The Trunk: PreferenceBrowser-ct.88.mcz

commits-2
Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-ct.88.mcz

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

Name: PreferenceBrowser-ct.88
Author: ct
Time: 15 August 2019, 1:10:30.509584 am
UUID: dd2e726b-1ef0-774c-8b31-9ecc8910866c
Ancestors: PreferenceBrowser-mt.87

Add entries "browse implementation" and "inspect preference" to the Preference item menu

=============== Diff against PreferenceBrowser-mt.87 ===============

Item was changed:
  ----- Method: PBPreferenceView>>offerPreferenceNameMenu: (in category 'user interface') -----
  offerPreferenceNameMenu: aPreferenceBrowser
  "the user clicked on a preference name -- put up a menu"
 
  | aMenu |
  aMenu := MenuMorph new
  defaultTarget: self preference;
  addTitle: self preference name.
 
  (Preferences okayToChangeProjectLocalnessOf: self preference name) ifTrue:
+ [aMenu
+ addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness;
+ balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project.  If this item is checked, then this preference will be printed in bold and will have a separate value for each project'].
- [aMenu addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness.
- aMenu balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project.  If this item is checked, then this preference will be printed in bold and will have a separate value for each project'].
 
+ aMenu
+ add: 'browse senders' translated
+ target: self systemNavigation
+ selector: #browseAllSelect:name:autoSelect:
+ argumentList: {
+ [:m | self preference selectors anySatisfy: [:sel | m hasLiteral: sel]].
+ 'Preference senders: {1}' translated format: {self preference name}.
+ self preference selectors first };
+ balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference "'
+ , self preference name , '".'.
+ self preference provider ifNotNil: [
+ aMenu
+ add: 'browse implementation' translated
+ target: Browser
+ selector: #fullOnClass:selector:
+ argumentList: {
+ self preference provider class.
+ self preference selectors first };
+ balloonTextForLastItem: 'This will open a browser on the method that stores the preference "' , self preference name , '".'].
+ aMenu
+ add: 'inspect preference' translated
+ target: self preference
+ selector: #inspect;
+ balloonTextForLastItem: 'This will open an Inspector on the preference "' , self preference name , '".'.
+ aMenu
+ add: 'show category...'
+ target: aPreferenceBrowser
+ selector: #findCategoryFromPreference:
+ argument: self preference name;
+ balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.'.
- aMenu add: 'browse senders' translated target: self systemNavigation selector: #browseAllSelect:name:autoSelect: argumentList: {[:m | self preference selectors anySatisfy: [:sel | m hasLiteral: sel]]. 'Preference senders: {1}' translated format: {self preference name}. self preference selectors first}.
- aMenu balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference "', self preference name, '".'.
- aMenu add: 'show category...' target: aPreferenceBrowser selector: #findCategoryFromPreference: argument: self preference name.
- aMenu balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.'.
 
  Smalltalk isMorphic ifTrue:
+ [aMenu
+ add: 'hand me a button for this preference'
+ target: self
+ selector: #tearOffButton;
+ balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish'].
- [aMenu add: 'hand me a button for this preference' target: self selector: #tearOffButton.
- aMenu balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish'].
 
+ aMenu
+ add: 'copy this name to clipboard'
+ target: self preference
+ selector: #copyName;
+ balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere'.
- aMenu add: 'copy this name to clipboard' target: self preference selector: #copyName.
- aMenu balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere'.
 
  aMenu popUpInWorld!