The Inbox: Tools-cao.230.mcz

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

The Inbox: Tools-cao.230.mcz

commits-2
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-cao.230.mcz

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

Name: Tools-cao.230
Author: cao
Time: 26 April 2010, 9:02:46.118 pm
UUID: 6402c39f-7ff1-49a6-ba26-1afbf95af3f6
Ancestors: Tools-cao.229

Fixes for the following:

Shift+menu not respected in browser class panes.

                Browser>>buildClassListWith: and
                Browser>>buildClassListSingletonWith:

        use the older (non-shift key sending)
       
                Browser>>classListMenu:
               
        rather than:
                       
                Browser>>classListMenu:shifted:

       
Shift+menu produces DNU in contents pane of file list.

        MenuMorph>>addAllFrom: expects morphs, but
        the argument passed is an array of string-selector
        pairs.  Use MenuMorph>>addList: instead.


=============== Diff against Tools-ar.228 ===============

Item was changed:
  ----- Method: Browser>>buildClassListWith: (in category 'toolbuilder') -----
  buildClassListWith: builder
  | listSpec |
  listSpec := builder pluggableListSpec new.
  listSpec
  model: self;
  list: #classList;
  getIndex: #classListIndex;
  setIndex: #classListIndex:;
+ menu: #classListMenu:shifted:;
- menu: #classListMenu:;
  keyPress: #classListKey:from:.
  Preferences browseWithDragNDrop
  ifTrue:[listSpec dragItem: #dragFromClassList:].
 
  ^listSpec
  !

Item was changed:
  ----- Method: FileList>>fileContentsMenu:shifted: (in category 'file list menu') -----
  fileContentsMenu: aMenu shifted: shifted
  "Construct aMenu to have items appropriate for the file browser's code pane, given the shift state provided"
 
+ | services maybeLine extraLines |
- | shiftMenu services maybeLine extraLines |
  shifted ifTrue:
+ [^ aMenu addList: StringHolder shiftedYellowButtonMenuItems].
- [shiftMenu := SelectionMenu fromArray: StringHolder shiftedYellowButtonMenuItems.
- ^ aMenu addAllFrom: shiftMenu].
  fileName ifNotNil:
  [services := OrderedCollection new.
  (#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue:
  [services add: self serviceGet].
  (#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse:
  [services add: self serviceGetHex].
  (#(needToGetShiftJIS needToGetEUCJP needToGetCNGB needToGetEUCKR needToGetUTF8) includes: brevityState) ifFalse:
  [services add: self serviceGetEncodedText].
  maybeLine := services size.
  (FileStream sourceFileSuffixes includes: self suffixOfSelectedFile) ifTrue:
  [services addAll:
  (self servicesFromSelectorSpecs:
  #(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))].
 
  extraLines := OrderedCollection new.
  maybeLine > 0 ifTrue: [extraLines add: maybeLine].
  services size > maybeLine ifTrue: [extraLines add: services size].
  aMenu
  addServices: services
  for: self fullName
  extraLines: extraLines].
 
  aMenu addList: {
  {'find...(f)' translated. #find}.
  {'find again (g)' translated. #findAgain}.
  {'set search string (h)' translated. #setSearchString}.
  #-.
  {'do again (j)' translated. #again}.
  {'undo (z)' translated. #undo}.
  #-.
  {'copy (c)' translated. #copySelection}.
  {'cut (x)' translated. #cut}.
  {'paste (v)' translated. #paste}.
  {'paste...' translated. #pasteRecent}.
  #-.
  {'do it (d)' translated. #doIt}.
  {'print it (p)' translated. #printIt}.
  {'inspect it (i)' translated. #inspectIt}.
  {'fileIn selection (G)' translated. #fileItIn}.
  #-.
  {'accept (s)' translated. #accept}.
  {'cancel (l)' translated. #cancel}.
  #-.
  {'more...' translated. #shiftedYellowButtonActivity}}.
 
 
  ^ aMenu
  !

Item was changed:
  ----- Method: Browser>>buildClassListSingletonWith: (in category 'toolbuilder') -----
  buildClassListSingletonWith: builder
  | listSpec |
  listSpec := builder pluggableListSpec new.
  listSpec
  model: self;
  list: #classListSingleton;
  getIndex: #indexIsOne;
  setIndex: #indexIsOne:;
+ menu: #classListMenu:shifted;
- menu: #classListMenu:;
  keyPress: #classListKey:from:.
  ^listSpec
  !