--- a/ChangeSetBrowser.st Thu Sep 27 09:58:07 2001 +0200
+++ b/ChangeSetBrowser.st Thu Sep 27 19:50:51 2001 +0200
@@ -91,43 +91,43 @@
#(#MenuItem
#label: 'Compress'
#translateLabel: true
- #isVisible: #notEditingClassSource
+ #isVisible: #notEditingClassSourceAndNotReadOnly
#value: #doCompress
)
#(#MenuItem
#label: 'Compress for Class'
#translateLabel: true
- #isVisible: #notEditingClassSource
+ #isVisible: #notEditingClassSourceAndNotReadOnly
#value: #doCompressClass
#enabled: #hasSelection
)
#(#MenuItem
#label: 'Compare and Compress'
#translateLabel: true
- #isVisible: #notEditingClassSource
+ #isVisible: #notEditingClassSourceAndNotReadOnly
#value: #doCompareAndCompress
)
#(#MenuItem
#label: '-'
- #isVisible: #notEditingClassSource
+ #isVisible: #notEditingClassSourceAndNotReadOnly
)
#(#MenuItem
#label: 'Fileout && Delete all Changes for Class'
#translateLabel: true
- #isVisible: #notEditingClassSource
+ #isVisible: #notEditingClassSourceAndNotReadOnly
#value: #doFileoutAndDeleteClassAll
#enabled: #hasSelection
)
#(#MenuItem
#label: 'CheckIn && Delete all Changes for Class'
#translateLabel: true
- #isVisible: #notEditingClassSource
+ #isVisible: #notEditingClassSourceAndNotReadOnly
#value: #doCheckinAndDeleteClassAll
#enabled: #hasSelection
)
#(#MenuItem
#label: '-'
- #isVisible: #notEditingClassSource
+ #isVisible: #notEditingClassSourceAndNotReadOnly
)
#(#MenuItem
#label: 'Save in...'
@@ -159,18 +159,22 @@
#(#MenuItem
#label: 'Saveback ChangeSet'
#translateLabel: true
+ #isVisible: #notReadOnly
#value: #doSaveBack
)
#(#MenuItem
+ #isVisible: #notReadOnly
#label: '-'
)
#(#MenuItem
#label: 'Update'
#translateLabel: true
#value: #doUpdate
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: '-'
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Exit'
@@ -247,18 +251,21 @@
)
#(#MenuItem
#label: '-'
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Previous Snapshot'
#translateLabel: true
#value: #findPreviousSnapshot
#enabled: #hasSelection
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Next Snapshot'
#translateLabel: true
#value: #findNextSnapshot
#enabled: #hasSelection
+ #isVisible: #notReadOnly
)
)
nil
@@ -302,39 +309,46 @@
#translateLabel: true
#value: #doDelete
#enabled: #hasSelection
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Delete to End'
#translateLabel: true
#value: #doDeleteRest
#enabled: #hasSelection
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Delete for Class to End'
#translateLabel: true
#value: #doDeleteClassRest
#enabled: #hasSelection
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Delete for Class from Begin'
#translateLabel: true
#value: #doDeleteClassFromBeginning
#enabled: #hasSelection
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Delete All for Class'
#translateLabel: true
#value: #doDeleteClassAll
#enabled: #hasSelection
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Delete All for Class && its Private Classes'
#translateLabel: true
#value: #doDeleteClassAndPrivateClassesAll
#enabled: #hasSelection
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: '-'
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Compare with Current'
@@ -365,6 +379,7 @@
#(#MenuItem
#label: 'Settings'
#translateLabel: true
+ #isVisible: #notReadOnly
#submenu:
#(#Menu
#(
@@ -372,19 +387,23 @@
#label: 'Auto Compare'
#translateLabel: true
#indication: #autoCompare
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Auto Update'
#translateLabel: true
#indication: #autoUpdate
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: '-'
+ #isVisible: #notReadOnly
)
#(#MenuItem
#label: 'Apply in Original NameSpace'
#translateLabel: true
#indication: #applyInOriginalNameSpace
+ #isVisible: #notReadOnly
)
)
nil
@@ -428,7 +447,7 @@
changeListMenu
<resource: #programMenu >
- |items|
+ |items m|
items := #(
('Apply' doApply)
@@ -451,9 +470,18 @@
('Update' doUpdate)
).
- ^ PopUpMenu
+ m := PopUpMenu
itemList:items
- resources:resources
+ resources:resources.
+
+ readOnly == true ifTrue:[
+ m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll
+ doDeleteClassAndPrivateClassesAll doCompress
+ doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll
+ doWriteBack doSaveBack doUpdate
+ doApplyAll doApplyRest)
+ ].
+ ^ m
"Created: 3.12.1995 / 18:06:35 / cg"
"Modified: 3.12.1995 / 18:13:06 / cg"
@@ -670,5 +698,5 @@
!ChangeSetBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/ChangeSetBrowser.st,v 1.17 2001-09-26 10:00:58 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/ChangeSetBrowser.st,v 1.18 2001-09-27 17:50:47 cg Exp $'
! !
--- a/ChangesBrowser.st Thu Sep 27 09:58:07 2001 +0200
+++ b/ChangesBrowser.st Thu Sep 27 19:50:51 2001 +0200
@@ -19,7 +19,8 @@
changeNrShown changeNrProcessed skipSignal autoCompare
changeFileSize changeFileTimestamp checkBlock changeTimeStamps
tabSpec autoUpdate editingClassSource lastSearchType
- lastSearchString applyInOriginalNameSpace lastSaveFileName'
+ lastSearchString applyInOriginalNameSpace lastSaveFileName
+ readOnly'
classVariableNames:'CompressSnapshotInfo NoColoring ShowWarningDialogs DefaultIcon'
poolDictionaries:''
category:'Interface-Browsers'
@@ -556,6 +557,18 @@
^ self editingClassSource not
!
+notEditingClassSourceAndNotReadOnly
+ ^ (self editingClassSource or:[readOnly == true]) not
+!
+
+notReadOnly
+ ^ (readOnly ~~ true)
+!
+
+readOnly:aBoolean
+ readOnly := aBoolean
+!
+
theSingleSelection
|sel|
@@ -900,6 +913,7 @@
doFileoutAndDeleteClassAll doCheckinAndDeleteClassAll
doWriteBack)
].
+
^ m
"Modified: / 6.9.1995 / 17:14:22 / claus"
@@ -4276,5 +4290,5 @@
!ChangesBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.224 2001-09-26 09:57:31 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.225 2001-09-27 17:50:51 cg Exp $'
! !