mercurial/HGSourceCodeManagementSettingsAppl.st
author vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
Sat, 17 Nov 2012 01:11:36 +0000
changeset 67 985488894699
parent 65 f693fc95ec17
child 80 8f300696b26b
permissions -rw-r--r--
HGCommitDialog: nicer icons, fix for file list HGWorkingCopyFile>>pathNameRelative fixed

"{ Package: 'stx:libscm/mercurial' }"

AbstractSourceCodeManagementSettingsAppl subclass:#HGSourceCodeManagementSettingsAppl
	instanceVariableNames:'defaultLogo'
	classVariableNames:''
	poolDictionaries:''
	category:'SCM-Mercurial-StX-Interface'
!


!HGSourceCodeManagementSettingsAppl class methodsFor:'image specs'!

defaultIcon
    ^ self defaultIcon3

    "Created: / 22-12-2011 / 13:47:11 / cg"
!

defaultIcon1
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self defaultIcon1 inspect
     ImageEditor openOnClass:self andSelector:#defaultIcon1
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
        constantNamed:'MercurialSourceCodeManagementSettingsAppl class defaultIcon1'
        ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PHCA@PEA D@@@@@@@@@@@@@@@@@@@@GA@ HB@ HB@$C
B @@@@@@@@@@@@@@@@,IB@ HB@ HB@ LA@4@@@@@@@@@@@@@C LLB@ HB@ HB@ HB@<P@@@@@@@@@@@@BPPHB@ HB@ HB@ HBADR@@@@@@@@@@@@D0$HB@ H
B@ HB@ HB@ SA@@@@@@@@@@@@APLB@ HB@ HB@ HB@ IEP@@@@@VA@LW@Q OC@ HB@ HB@ HB@ LFPD@@@DLBP\Q@@@ZF0 LB@ HB@ HB@ IF@X@@A0HA!!4^
@@@SF!!<_@@$HB@ HB@0FH@L@@BDI@AHC@@@@HP@O@BHIB@ HB@LFH0H@@@@ABQ0@@@@@@@@!!A@@DB@ HCA0OI@8@@@@@@@@@@A\@@@@@@@XDB@ HBP8%I D@
@@@@@@@BA@$D@P@@@@8IB@ LC P''C0@@@@@@@@DIB@ HBQ0@@@8LA@XA@Q<Y@0@@@@@@@@PLB@ DA@@@@@PCB" JC2T[@@@@@@@@@@PLB@PPBP@@@@P)JB$I
J!!HA@@@@@@@@@B,LBQXCKB,@A XACQP-F0L@@@@@@@@@@@(RK"T,D0@@BA,/LCD@L @@@@@@@@@@@@@@@ $!!@@@@@QTTC@ 3@@@@@@@@@@@@@@@@@@@@@@@@
@CP\L0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[143 136 136 208 208 208 192 192 184 176 176 176 175 168 168 176 168 168 191 184 184 191 176 176 159 152 144 160 160 160 239 232 224 192 184 184 159 152 160 207 192 200 207 200 200 144 144 144 224 224 224 160 152 160 127 120 120 144 144 136 128 128 128 111 104 104 207 200 208 239 232 240 95 88 88 96 96 96 79 72 80 112 112 120 192 192 200 223 208 208 111 104 96 80 80 80 64 64 64 223 216 216 128 120 128 31 24 24 32 32 24 79 72 64 64 56 56 47 40 40 240 240 240 239 224 224 63 48 48 191 184 176 112 112 104 64 64 56 63 56 56 48 48 48 48 40 48 127 112 120 160 160 168 208 200 208 224 224 216]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@G>@@O? @_?0@??8@??8@??<@??<O??>__?>_O?>_G?>NA?>@P_>A<_<C>_<C>_8C>_8C>?0C<? @8?@@@\@@@@@') ; yourself); yourself]
!

defaultIcon2
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self defaultIcon2 inspect
     ImageEditor openOnClass:self andSelector:#defaultIcon2
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
        constantNamed:'MercurialSourceCodeManagementSettingsAppl class defaultIcon2'
        ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PHCA@PEA D@@@@@@@@@@@@@@@@@@@@GA@ HB@ HB@$C
B @@@@@@@@@@@@@@@@,IB@ HB@ HB@ LA@4@@@@@@@@@@@@@C LLB@ HB@ HB@ HB@<P@@@@@@@@@@@@BPPHB@ HB@ HB@ HBADR@@@@@@@@@@@@D0$HB@ H
B@ HB@ HB@ SA@@@@@@@@@@@@APLB@ HB@ HB@ HB@ IEP@@@@@VA@LW@Q OC@ HB@ HB@ HB@ LFPD@@@DLBP\Q@@@ZF0 LB@ HB@ HB@ IF@X@@A0HA!!4^
@@@SF!!<_@@$HB@ HB@0FH@L@@BDI@AH:N#\7HP@O@BHIB@ HB@LFH0H@@@@ABS\:N#(:M0@!!A@@DB@ HCA0OI@8@@@@@M#(:@A\@@C\@@@XDB@ HBP8%I D@
@@@@M3 7A@$D@P@@@@8IB@ LC P''C0@@@C\7N#$:N0 HHA0@@@8LA@XA@Q<Y@0@@@@@7NS(7B@  HB@@@@PCB" JC2T[@@@@@@@@M34LBB@<OAP @@P)JB$I
J!!HA@@@@@@@@@B,LHB@YHB@ A XACQP-F0L@@@@@@@@ @@(RK"T H@@@BA,/LCD@L @@@@@@@@@@HB@ HB@ MP@@@QTTC@ 3@@@@@@@@@@@@@A$ HB@5@@@@
@CP\L0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[143 136 136 208 208 208 192 192 184 176 176 176 175 168 168 176 168 168 191 184 184 191 176 176 159 152 144 160 160 160 239 232 224 192 184 184 159 152 160 207 192 200 207 200 200 144 144 144 224 224 224 160 152 160 127 120 120 144 144 136 128 128 128 111 104 104 207 200 208 239 232 240 95 88 88 96 96 96 79 72 80 112 112 120 192 192 200 223 208 208 111 104 96 80 80 80 64 64 64 223 216 216 128 120 128 31 24 24 32 32 24 79 72 64 64 56 56 47 40 40 240 240 240 239 224 224 63 48 48 191 184 176 112 112 104 64 64 56 63 56 56 48 48 48 48 40 48 127 112 120 160 160 168 208 200 208 224 224 216 0 0 0 0 64 0 32 96 32 96 192 128 32 128 64 32 160 64 32 128 32 32 32 32 32 64 32]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@G>@@O? @_?0@??8@??8@??<@??<O??>__?>_O?>_??>O=?>GR_>G<_<_>_<O>_8G?_8C??0K<? G<?@C8\@@@@@') ; yourself); yourself]
!

defaultIcon3
    "This resource specification was automatically generated
     by the ImageEditor of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the ImageEditor may not be able to read the specification."

    "
     self defaultIcon3 inspect
     ImageEditor openOnClass:self andSelector:#defaultIcon3
     Icon flushCachedIcons
    "

    <resource: #image>

    ^Icon
        constantNamed:'HGSourceCodeManagementSettingsAppl defaultIcon3'
        ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PHCA@PEA D@@@@@@@@@@@@@@@@@@@@GA@ HB@ HB@$C
B @@@@@@@@@@@@@@@@,IB@ HB@ HB@ LA@4@@@@@@@@@@@@@C LLB@ HB@ HB@ HB@<N@@@@@@@@@@@@BPPHB@ HB@ HB@ HBADR@@@@@@@@@@@@D0$HB@ H
B@ HB@ HB@ SA@@@@@@@@@@@@APLB@ HB@ HB@ HB@ IEP@@@@@VA@LW@Q OC@ HB@ HB@ HB@ LFPD@@@DLBP\Q@@@ZF0 LB@ HB@ HB@ IF@X@@A0HA!!4^
@@@SF!!<_@@$HB@ HB@0FH@L@@BDI@AH:N#\7HP@O@BHIB@ HB@LFH0H@@@@ABS\:N#(:M0@!!A@@DB@ HCA0OI@8@@@@@M#(:@A\@@C\@@@XDB@ HBP8%I D@
@@@@M3 7A@$D@P@@@@8IB@ LDA@''C0@@@C\7N#$:N0 HOA0@@@8LA@XADA@Y@0@@@@@7NS(7B@ <OC0@@@PCB" JDA@[@@@@@@@@M4@LBC0?O38<@@P)DA@P
DA@PDA@@@@@@@B,LOC0=OC0<A XADA@PDA@PDA@@@@@<@@(RK"T<O@@@BA,/LCD@DA@@@@@@@@@@OC0<OC0<MP@@@QTTC@ 3DA@@@@@@@@@@@C4<OC05@@@@
@CP\L0@@DA@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[174 169 169 255 255 255 233 233 230 216 216 216 213 209 209 214 209 209 232 229 229 229 223 223 191 187 181 197 197 197 255 255 255 233 230 230 194 189 194 247 244 245 251 250 250 177 177 177 131 0 0 194 189 194 155 149 149 175 175 169 157 157 157 136 128 128 251 251 251 255 255 255 117 108 108 118 118 118 97 89 98 139 139 147 240 240 242 255 255 255 137 128 118 98 98 98 79 79 79 255 255 255 156 149 156 38 30 30 39 39 30 97 89 79 79 69 69 58 49 49 255 255 255 255 255 255 77 59 59 229 226 223 137 137 128 79 79 69 77 69 69 59 59 59 59 49 59 154 140 147 199 199 204 251 251 251 255 255 255 0 0 0 0 64 0 32 96 32 96 192 128 32 128 64 32 160 64 32 128 32 64 64 64 96 96 96 128 128 128 32 32 32 32 64 32]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@G>@@O? @_?0@??8@??8@??<@??<O??>__?>_O?>_??>O=?>GR_>G<_<_>_<O>_8G?_>C??>K<?0G<?0C8\0@@@@') ; yourself); yourself]
!

defaultLogo
    ^ HGIconLibrary hgLogo2

    "Created: / 04-10-2012 / 19:01:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 15-11-2012 / 23:12:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!HGSourceCodeManagementSettingsAppl class methodsFor:'interface specs'!

windowSpec
    "This resource specification was automatically generated
     by the UIPainter of ST/X."

    "Do not manually edit this!! If it is corrupted,
     the UIPainter may not be able to read the specification."

    "
     UIPainter new openOnClass:HGSourceCodeManagementSettingsAppl andSelector:#windowSpec
     HGSourceCodeManagementSettingsAppl new openInterface:#windowSpec
     HGSourceCodeManagementSettingsAppl open
    "

    <resource: #canvas>

    ^ 
     #(FullSpec
        name: windowSpec
        window: 
       (WindowSpec
          label: 'SubVersion Settings'
          name: 'SubVersion Settings'
          min: (Point 10 10)
          bounds: (Rectangle 0 0 695 627)
        )
        component: 
       (SpecCollection
          collection: (
           (LabelSpec
              label: ' Mercurial Settings'
              name: 'MercurialSettingsTitle'
              layout: (LayoutFrame 0 0 0 0 0 1 66 0)
              style: (FontDescription helvetica medium roman 18 #'iso10646-1')
              backgroundColor: (Color 100.0 100.0 100.0)
              translateLabel: true
              adjust: left
            )
           (LabelSpec
              label: 'Logo'
              name: 'MercurialLogo'
              layout: (LayoutFrame -71 1 -1 0 4 1 65 0)
              hasCharacterOrientedLabel: false
              backgroundColor: (Color 100.0 100.0 100.0)
              translateLabel: true
              labelChannel: defaultLogo
            )
           (CheckBoxSpec
              label: 'Show in Menus'
              name: 'CheckBox1'
              layout: (LayoutFrame 0 0 73 0 0 1 95 0)
              activeHelpKey: shownInBrowserMenus
              model: shownInBrowserMenusHolder
              translateLabel: true
            )
           )
         
        )
      )
! !

!HGSourceCodeManagementSettingsAppl class methodsFor:'queries'!

managerClass
    "backlink to my manager class (needed by the settings app)"

    ^ HGSourceCodeManager

    "Created: / 19-04-2011 / 12:46:52 / cg"
    "Modified: / 13-11-2012 / 22:15:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!HGSourceCodeManagementSettingsAppl methodsFor:'aspects'!

initialListOfModules
    "raise an error: must be redefined in concrete subclass(es)"

    ^ self shouldImplement
! !

!HGSourceCodeManagementSettingsAppl methodsFor:'protocol'!

basicReadSettings
    self shownInBrowserMenusHolder value:HGSourceCodeManager shownInBrowserMenus.

    "Modified: / 14-11-2012 / 19:22:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

basicSaveSettings
    HGSourceCodeManager shownInBrowserMenus:self shownInBrowserMenusHolder value

    "Modified: / 14-11-2012 / 19:22:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

helpFilename
    "subclasses must return the relative name of a helpFile
     in the doc/online/<language>/help directory.
     Or nil, if no help is available."

    ^ self shouldImplement
! !

!HGSourceCodeManagementSettingsAppl methodsFor:'queries'!

hasUnsavedChanges

    (HGSourceCodeManager shownInBrowserMenus ~= self shownInBrowserMenusHolder value)
        ifTrue:[^ true].

    ^ false

    "Modified: / 14-11-2012 / 19:23:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!HGSourceCodeManagementSettingsAppl class methodsFor:'documentation'!

version_HG
    "Never, ever change this method. Ask JV or CG why"
    ^thisContext method mclass theNonMetaclass instVarNamed: #revision
!

version_SVN
    ^ 'Id::                                                                                                                        '
! !