common/SCMAbstractCommitDialog.st
changeset 514 7a1a8fa59edd
parent 509 f92210d4585b
child 535 cde846c99f0d
--- a/common/SCMAbstractCommitDialog.st	Fri Jan 16 10:40:29 2015 +0000
+++ b/common/SCMAbstractCommitDialog.st	Mon Jan 19 10:10:26 2015 +0000
@@ -18,6 +18,8 @@
 "
 "{ Package: 'stx:libscm/common' }"
 
+"{ NameSpace: Smalltalk }"
+
 SCMAbstractDialog subclass:#SCMAbstractCommitDialog
 	instanceVariableNames:'task messageView messageModifiedHolder fileSelectionHolder
 		fileListShowOnlyModifiedHolder fileListHolder fileListView
@@ -446,6 +448,17 @@
             label: 'Show differences (against newest)'
             itemValue: doShowDiffsForEntryAgainstHEAD
           )
+         (MenuItem
+            label: '-'
+          )
+         (MenuItem
+            label: 'Select All Files'
+            itemValue: doSelectAll
+          )
+         (MenuItem
+            label: 'Unselect all Files'
+            itemValue: doSelectNone
+          )
          )
         nil
         nil
@@ -794,6 +807,29 @@
     "Modified: / 03-03-2014 / 10:01:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!SCMAbstractCommitDialog methodsFor:'menu actions'!
+
+doSelectAll
+    self doSelectAllMatching: [ :file | true ]
+
+    "Modified: / 19-01-2015 / 10:01:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+doSelectAllMatching: block
+    (self fileListHolder value ? #()) do:[:each | 
+        each include: (block value: each entry)
+    ].
+    fileListView invalidate
+
+    "Created: / 19-01-2015 / 10:00:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+doSelectNone
+    self doSelectAllMatching: [ :file | false ]
+
+    "Created: / 19-01-2015 / 10:00:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !SCMAbstractCommitDialog methodsFor:'private'!
 
 doRunSanityChecks