home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)cccheckind.tcl /main/hindenburg/2
- # Author: <generated>
- # Description: VCM integration file
- #---------------------------------------------------------------------------
- # SccsId = @(#)cccheckind.tcl /main/hindenburg/2 18 Mar 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require_module_file "cccommentd.tcl" clearcase-vcm
-
- Class CCCheckInDialog : {CCCommentDialog} {
- constructor
- method destructor
- method createMultipleInterface
- method deleteMultipleInterface
- method popUp
-
- # Inidcates whether this check in dialog has the extra
- # elements for checking in multiple files.
- #
- attribute hasMultiplePart
- }
-
- constructor CCCheckInDialog {class this name} {
- set this [CCCommentDialog::constructor $class $this $name]
- $this hasMultiplePart 0
- # Start constructor user section
- $this createInterface
- # End constructor user section
- return $this
- }
-
- method CCCheckInDialog::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this CCCommentDialog::destructor
- }
-
-
- # Modify interface for multiple selected files.
- #
- method CCCheckInDialog::createMultipleInterface {this} {
- # check if the extra part does not yet exist
- if [$this hasMultiplePart] {
- return
- }
-
- # no comment if default comment is reused
- $this.col.comments sensitive 0
-
- interface CheckButton $this.col.reuse {
- label "Reuse checkout comments"
- state 1
- }
-
- $this.col.reuse stateChanged {
- if [%this state] {
- [%this parent].comments sensitive 0
- } else {
- [%this parent].comments sensitive 1
- }
- }
-
- $this hasMultiplePart 1
- }
-
-
- # Modify interface for one selected file.
- #
- method CCCheckInDialog::deleteMultipleInterface {this} {
- if { ![$this hasMultiplePart] } {
- return
- }
-
- # make sure comment part is enabled now
- $this.col.comments sensitive 1
-
- # delete reuse part
- $this.col.reuse delete
-
- $this hasMultiplePart 0
- }
-
-
- # Prepare interface and pop up.
- #
- method CCCheckInDialog::popUp {this} {
- $this selectedFiles [.main selectedObjSet]
- $this title "Checkin"
-
- # modify interface if more files are selected
- if { [llength [$this selectedFiles]] > 1 } {
- $this createMultipleInterface
- } else {
- $this deleteMultipleInterface
- }
-
- # set default comment
- $this setComment
-
- # make comment label
- $this.col.label text \
- "Checkin comments for [$this selectionDescription]:\n"
-
- # specify checkin action
- $this vsMethod {
- if { [llength [$this selectedFiles]] == 1 } {
- set noComment 0
- } else {
- set noComment [$this.col.reuse state]
- }
- $file checkIn $noComment [$this.col.comments text]
- }
-
- $this needsUpdate 1
- $this TemplateDialog::popUp
- }
-
- # Do not delete this line -- regeneration end marker
-
-