can set userName for history line
authorsr
Wed, 04 Aug 2010 18:36:56 +0200
changeset 9531 fe82d3894f11
parent 9530 18dc01dc5779
child 9532 89db91810bf2
can set userName for history line
AbstractSettingsApplication.st
--- a/AbstractSettingsApplication.st	Mon Jul 26 11:59:12 2010 +0200
+++ b/AbstractSettingsApplication.st	Wed Aug 04 18:36:56 2010 +0200
@@ -107,7 +107,8 @@
 	instanceVariableNames:'st80EditingMode tabsIs4 st80DoubleClickSelectMode
 		searchDialogIsModal startTextDragWithControl catchClassRedefs
 		fullHistoryUpdate historyLines keepSourceSelection keepSource
-		hasHistoryManager canLoadBinaries loadBinaries catchMethodRedefs'
+		hasHistoryManager canLoadBinaries loadBinaries catchMethodRedefs
+		userNameInHistoryHolder'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:AbstractSettingsApplication
@@ -4160,7 +4161,7 @@
           label: 'General Compiler Settings'
           name: 'General Compiler Settings'
           min: (Point 10 10)
-          bounds: (Rectangle 14 46 614 366)
+          bounds: (Rectangle 0 0 600 320)
         )
         component: 
        (SpecCollection
@@ -4189,6 +4190,10 @@
                     translateLabel: true
                     extent: (Point 600 25)
                   )
+                 (DividerSpec
+                    name: 'Separator2'
+                    extent: (Point 600 3)
+                  )
                  (CheckBoxSpec
                     label: 'Keep History Line in Methods'
                     name: 'KeepHistoryLineinMethods'
@@ -4205,26 +4210,64 @@
                     extent: (Point 600 25)
                   )
                  (ViewSpec
+                    name: 'Box2'
+                    component: 
+                   (SpecCollection
+                      collection: (
+                       (LabelSpec
+                          label: 'Username in History:'
+                          name: 'Label1'
+                          layout: (LayoutFrame 0 0 5 0 200 0 27 0)
+                          translateLabel: true
+                          adjust: right
+                        )
+                       (InputFieldSpec
+                          name: 'EntryField1'
+                          layout: (LayoutFrame 200 0 5 0 347 0 27 0)
+                          model: userNameInHistoryHolder
+                          immediateAccept: true
+                          acceptOnReturn: true
+                          acceptOnTab: true
+                          acceptOnLostFocus: false
+                          acceptOnPointerLeave: true
+                        )
+                       (LabelSpec
+                          label: '(leave empty for login-name)'
+                          name: 'Label2'
+                          layout: (LayoutFrame 354 0 5 0 554 0 27 0)
+                          translateLabel: true
+                          adjust: left
+                        )
+                       )
+                     
+                    )
+                    extent: (Point 600 29)
+                  )
+                 (DividerSpec
+                    name: 'Separator3'
+                    extent: (Point 600 3)
+                  )
+                 (ViewSpec
                     name: 'Box1'
                     component: 
                    (SpecCollection
                       collection: (
+                       (LabelSpec
+                          label: 'FileIn Source Mode:'
+                          name: 'FileInSourceModeLabel'
+                          layout: (LayoutFrame 0 0 5 0 200 0 27 0)
+                          translateLabel: true
+                          adjust: right
+                        )
                        (PopUpListSpec
                           label: 'PopUp List'
                           name: 'KeepSourceSelection'
-                          layout: (LayoutFrame 200 0 0 0 -5 1 22 0)
+                          layout: (LayoutFrame 200 0 5 0 -5 1 27 0)
                           tabable: true
                           model: keepSourceSelection
                           menu: keepSource
                           useIndex: true
                         )
-                       (LabelSpec
-                          label: 'FileIn Source Mode:'
-                          name: 'FileInSourceModeLabel'
-                          layout: (LayoutFrame 0 0 0 0 200 0 22 0)
-                          translateLabel: true
-                          adjust: right
-                        )
                        )
                      
                     )
@@ -4260,7 +4303,7 @@
                 ifAbsent:1).
     self catchClassRedefs value:(Class catchClassRedefinitions ? false).
     self catchMethodRedefs value:(Class catchMethodRedefinitions ? false).
-    self canLoadBinaries ifTrue:[
+    self canLoadBinaries value ifTrue:[
         self loadBinaries value:Smalltalk loadBinaries
     ] ifFalse:[
         self loadBinaries value:false
@@ -4271,9 +4314,13 @@
         self fullHistoryUpdate value:false
     ].
     self historyLines value:self hasHistoryManager.
+    self userNameInHistoryHolder value:(HistoryManager enforcedUserName).
+
+    "Modified: / 04-08-2010 / 18:34:15 / cg"
 !
 
 basicSaveSettings
+    |nm|
 
     ClassCategoryReader sourceMode:(self class keepSourceOptions at:self keepSourceSelection value).
     Class catchClassRedefinitions:self catchClassRedefs value.
@@ -4285,8 +4332,13 @@
         ] ifFalse:[
             HistoryManager deactivate
         ].
+        nm := self userNameInHistoryHolder value withoutSeparators.
+        nm isEmpty ifTrue:[ nm := nil ].
+        HistoryManager enforcedUserName:nm.
     ].
     Smalltalk loadBinaries:self loadBinaries value.
+
+    "Modified: / 04-08-2010 / 18:33:20 / cg"
 ! !
 
 !AbstractSettingsApplication::GeneralCompilerSettingsAppl methodsFor:'aspects'!
@@ -4364,7 +4416,7 @@
 loadBinaries
 
     loadBinaries isNil ifTrue:[
-        self canLoadBinaries ifTrue:[ 
+        self canLoadBinaries value ifTrue:[ 
             loadBinaries:=  Smalltalk loadBinaries asValue
         ] ifFalse:[
             loadBinaries:=  false asValue
@@ -4372,6 +4424,19 @@
         loadBinaries onChangeSend:#updateModifiedChannel to:self.
     ].
     ^ loadBinaries.
+
+    "Modified: / 04-08-2010 / 18:34:56 / cg"
+!
+
+userNameInHistoryHolder
+
+    userNameInHistoryHolder isNil ifTrue:[
+        userNameInHistoryHolder := '' asValue.
+        userNameInHistoryHolder onChangeSend:#updateModifiedChannel to:self.
+    ].
+    ^ userNameInHistoryHolder.
+
+    "Modified: / 04-08-2010 / 18:37:53 / cg"
 ! !
 
 !AbstractSettingsApplication::GeneralCompilerSettingsAppl methodsFor:'help'!
@@ -4389,7 +4454,10 @@
     ((Class catchClassRedefinitions ? false) ~= self catchClassRedefs value) ifTrue:[^ true].
     ((Smalltalk loadBinaries ? false) ~= self loadBinaries value) ifTrue:[^ true].
     ((self hasHistoryManager) ~= self historyLines value) ifTrue:[^ true].
+    (HistoryManager enforcedUserName ~= self userNameInHistoryHolder value) ifTrue:[^ true].
     ^ false.
+
+    "Modified: / 04-08-2010 / 18:31:55 / cg"
 ! !
 
 !AbstractSettingsApplication::HTTPStartServerSettingsApplication class methodsFor:'image specs'!
@@ -16281,9 +16349,9 @@
 !AbstractSettingsApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.362 2010-07-17 12:51:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.363 2010-08-04 16:36:56 sr Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.362 2010-07-17 12:51:06 cg Exp $'
-! !
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.363 2010-08-04 16:36:56 sr Exp $'
+! !