#BUGFIX by cg draft
authorClaus Gittinger <cg@exept.de>
Fri, 31 Jan 2020 22:35:56 +0100
changeset 3849 20a999ca8246
parent 3848 cc4d71e73e5d
child 3850 91824773c619
#BUGFIX by cg class: FileVersionDiffBrowser added: #setupForFile:versionA:versionB: changed: #versionMenuCompareAgainstNextVersion #versionMenuCompareAgainstPreviousVersion
FileVersionDiffBrowser.st
--- a/FileVersionDiffBrowser.st	Fri Jan 31 04:27:39 2020 +0000
+++ b/FileVersionDiffBrowser.st	Fri Jan 31 22:35:56 2020 +0100
@@ -1485,8 +1485,9 @@
     nextVersion := self versionList at:(self selectedVersionIndex - 1).
     fn := fileHolder value.
     
-    self class 
-        openOnFile:fn versionA:selectedVersion versionB:nextVersion
+    self withWaitCursorDo:[
+        self class openOnFile:fn versionA:selectedVersion versionB:nextVersion
+    ]
 
     "Modified: / 08-07-2019 / 00:09:54 / Claus Gittinger"
 !
@@ -1501,8 +1502,9 @@
     prevVersion := self versionList at:(self selectedVersionIndex + 1).
     fn := fileHolder value.
     
-    self class 
-        openOnFile:fn versionA:prevVersion versionB:selectedVersion
+    self withWaitCursorDo:[
+        self class openOnFile:fn versionA:prevVersion versionB:selectedVersion
+    ].
 
     "Modified: / 08-07-2019 / 00:10:12 / Claus Gittinger"
 ! !
@@ -1648,6 +1650,22 @@
 
     "Created: / 07-07-2019 / 19:59:03 / Claus Gittinger"
     "Modified: / 08-07-2019 / 01:14:36 / Claus Gittinger"
+!
+
+setupForFile:aFilename versionA:aVersionA versionB:aVersionB
+    "compute the diffs for two versions of a file.
+     When setting the diffs, the labels, list etc. of the receiver are updated."
+
+    |text1 text2|
+
+    text1 := self getFile:aFilename version:aVersionA.
+    text2 := self getFile:aFilename version:aVersionB.
+
+    self diffTextView text1:text1 text2:text2.        
+    self diffTextLabelA value:aVersionA.
+    self diffTextLabelB value:aVersionB.
+
+    self addAcceptToTextViewMenus.
 ! !
 
 !FileVersionDiffBrowser class methodsFor:'documentation'!