Tools__ChangeSetBrowser2.st
branchjv
changeset 18222 7b2b8ae7a123
parent 17533 d3a2cc2bb3f8
child 18223 920de32128c2
equal deleted inserted replaced
18221:adda804955e2 18222:7b2b8ae7a123
  1880             activeHelpKey: fileLoad
  1880             activeHelpKey: fileLoad
  1881             enabled: isWorkingNotHolder
  1881             enabled: isWorkingNotHolder
  1882             label: 'Load'
  1882             label: 'Load'
  1883             itemValue: doOpen
  1883             itemValue: doOpen
  1884             isButton: true
  1884             isButton: true
       
  1885             isVisible: isStandalone
  1885             labelImage: (ResourceRetriever XPToolbarIconLibrary loadFromFileIcon)
  1886             labelImage: (ResourceRetriever XPToolbarIconLibrary loadFromFileIcon)
  1886           )
  1887           )
  1887          (MenuItem
  1888          (MenuItem
  1888             activeHelpKey: fileSave
  1889             activeHelpKey: fileSave
  1889             enabled: isWorkingNotHolder
  1890             enabled: isWorkingNotHolder
  1890             label: 'Save'
  1891             label: 'Save'
  1891             itemValue: doSave
  1892             itemValue: doSave
  1892             isButton: true
  1893             isButton: true
       
  1894             isVisible: true
  1893             labelImage: (ResourceRetriever XPToolbarIconLibrary saveToFileIcon)
  1895             labelImage: (ResourceRetriever XPToolbarIconLibrary saveToFileIcon)
  1894           )
  1896           )
  1895          (MenuItem
  1897          (MenuItem
  1896             label: '-'
  1898             label: '-'
       
  1899             isVisible: true
  1897           )
  1900           )
  1898          (MenuItem
  1901          (MenuItem
  1899             activeHelpKey: applyLine
  1902             activeHelpKey: applyLine
  1900             enabled: hasSelectionHolder
  1903             enabled: hasSelectionHolder
  1901             label: 'Apply'
  1904             label: 'Apply'
  1902             itemValue: doApply
  1905             itemValue: doApply
  1903             isButton: true
  1906             isButton: true
       
  1907             isVisible: true
  1904             labelImage: (ResourceRetriever nil applyIcon)
  1908             labelImage: (ResourceRetriever nil applyIcon)
  1905           )
  1909           )
  1906          (MenuItem
  1910          (MenuItem
  1907             activeHelpKey: applyToEnd
  1911             activeHelpKey: applyToEnd
  1908             enabled: hasSelectionHolder
  1912             enabled: hasSelectionHolder
  1909             label: 'Apply To End'
  1913             label: 'Apply To End'
  1910             itemValue: doApplyToEnd
  1914             itemValue: doApplyToEnd
  1911             isButton: true
  1915             isButton: true
       
  1916             isVisible: true
  1912             labelImage: (ResourceRetriever nil applyToEndIcon)
  1917             labelImage: (ResourceRetriever nil applyToEndIcon)
  1913           )
  1918           )
  1914          (MenuItem
  1919          (MenuItem
  1915             activeHelpKey: applyFromLastSnapshot
  1920             activeHelpKey: applyFromLastSnapshot
  1916             enabled: hasSelectionHolder
  1921             enabled: hasSelectionHolder
  1917             label: 'Apply From Last Snapshot'
  1922             label: 'Apply From Last Snapshot'
  1918             itemValue: doApplyFromLastSnapshot
  1923             itemValue: doApplyFromLastSnapshot
  1919             isButton: true
  1924             isButton: true
       
  1925             isVisible: true
  1920             labelImage: (ResourceRetriever nil applyFromLastSnapshotIcon)
  1926             labelImage: (ResourceRetriever nil applyFromLastSnapshotIcon)
  1921           )
  1927           )
  1922          (MenuItem
  1928          (MenuItem
  1923             label: '-'
  1929             label: '-'
       
  1930             isVisible: true
  1924           )
  1931           )
  1925          (MenuItem
  1932          (MenuItem
  1926             activeHelpKey: deleteLine
  1933             activeHelpKey: deleteLine
  1927             enabled: hasSelectionHolder
  1934             enabled: hasSelectionHolder
  1928             label: 'Delete'
  1935             label: 'Delete'
  3122 !
  3129 !
  3123 
  3130 
  3124 doSaveAs
  3131 doSaveAs
  3125     | file |
  3132     | file |
  3126     Dialog aboutToOpenBoxNotificationSignal handle:[:ex|
  3133     Dialog aboutToOpenBoxNotificationSignal handle:[:ex|
  3127 "/        OOPS, not supported!!!!!!!!
  3134 "/        | dialog |
  3128 
  3135 "/        dialog := ex box application.
  3129 "/        | box |
  3136 "/        dialog addComponent:(CheckBox label:'x'
  3130 "/        box := ex box.
       
  3131 "/        box verticalPanel
       
  3132 "/                add:(CheckBox label:'x'
       
  3133 "/                              model:true asValue).
  3137 "/                              model:true asValue).
  3134         ex pass.
  3138 "/        ex pass.
  3135     ] do:[
  3139     ] do:[
  3136         file := Dialog requestFileName:'Select File for Save' default: (changesetFile ? 'somechanges.chg') pattern:('*.chg').
  3140         file := Dialog requestFileName:'Select File for Save' default: (changesetFile ? 'somechanges.chg') pattern:('*.chg').
  3137     ].
  3141     ].
  3138     file isNil ifTrue:[^self].
  3142     file isNil ifTrue:[^self].
  3139     self doSaveAs: file.
  3143     self doSaveAs: file.
  3140 
  3144 
  3141     "Modified: / 27-12-2011 / 10:39:52 / cg"
  3145     "Modified: / 27-12-2011 / 10:39:52 / cg"
  3142     "Modified: / 20-03-2012 / 13:52:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  3146     "Modified: / 05-03-2018 / 10:09:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  3143 !
  3147 !
  3144 
  3148 
  3145 doSaveAs: newFile
  3149 doSaveAs: newFile
  3146     | changesetToSave |
  3150     | changesetToSave |
  3147 
  3151 
  3166     | changeList |
  3170     | changeList |
  3167     changeList := self list.
  3171     changeList := self list.
  3168     changeList selection: { changeList list last }
  3172     changeList selection: { changeList list last }
  3169 
  3173 
  3170     "Created: / 30-03-2012 / 16:56:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  3174     "Created: / 30-03-2012 / 16:56:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  3175 !
       
  3176 
       
  3177 isStandalone
       
  3178     ^ self window isApplicationSubView not
       
  3179 
       
  3180     "Modified: / 05-03-2018 / 09:38:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  3171 !
  3181 !
  3172 
  3182 
  3173 loadChangeSet: aChangeSet
  3183 loadChangeSet: aChangeSet
  3174     self changesetHolder value: aChangeSet.
  3184     self changesetHolder value: aChangeSet.
  3175     self infoPanel hide.
  3185     self infoPanel hide.