1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
### Copyright (C) 1996 Rasmus Ingemann Hansen
### This program is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public License as published by
### the Free Software Foundation; either version 2 of the License, or
### (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
### along with this program; if not, write to the Free Software
### Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
proc signature {} {
# Editing / Signature
Desc "Signatures and preceeding dashes above these"
ShortDesc "Signature"
### SIGNATURES ###
Header signatureHead1 \
-text "Have dashes above (if any) signature" \
-background gray
CheckBox signatureCheckBox1 \
-text "Dashes \"--\" above signatures (News 2.11 compatibility and convention)" \
-default 1
foreach widget { signatureHead1 signatureCheckBox1 } {
Help $widget "Selected to tell Elm that you wish to follow the convention of prefixing your signature with `newline dash dash blank newline'. This is placed in your message before your signature file. If OFF, the signature file, if any, is placed at the end of the message without any prefix. This way you could have the sigdashes \"--\" and optionally leave out the signature so as to shortly enter your name 'on the fly'. Default is to leave it selected."
}
###
Header signatureHead2 \
-text "Have a signature (right below your sigdash)" \
-background gray
CheckBox editorOptionsCheckBox33 \
-text "Have a signature at the bottom of your outgoing messages" \
-help "This way you could have your cute once made signature with name, address, phone number, graphics etc. inserted as the first thing in your document when you start editing new outgoing messages."
### local signature ###
Header editorOptionsHead2 \
-text "Your \".signature\" file(s) to append to appropriate outbound messages" \
-background gray \
-help "This defines the file that is automatically appended to all outbound mail before the editor is invoked."
File-Dir-Browser editorOptionsDir3 \
-text "Location of local \".signature\" file" \
-exist 1
foreach widget { editorOptionsDir3 } {
Help $widget "Location of the `local' (any address without an \"!\" or \"@\" in it) signature to the bottom of outgoing messages." \
}
TextBox signatureTextBox1 \
-height 3 \
-width 80 \
-help "This is how your \"~/.elm/localsignature\" file looked like when you started the current dotfile application. (In case of no such file this textbox isn't active)."
### remote ###
File-Dir-Browser editorOptionsDir4 \
-text "Location of remote \".signature\" file" \
-exist 0
foreach widget { editorOptionsDir4 } {
Help $widget "Location of the `remote' (any address with an \"!\" or \"@\" in it) signature to the bottom of outgoing messages." \
}
TextBox signatureTextBox2 \
-height 3 \
-width 80 \
-help "This is how your \"~/.elm/remotesignature\" file looked like when you started the current dotfile application. (In case of no such file this textbox isn't active)."
Line line3
CheckBox editorOptionsCheckBox22 \
-text "Instead, use same file for both local and remote" \
-default 0
File-Dir-Browser editorOptionsDir2 \
-text "Location of both local and remote \".signature\"" \
-exist 0
foreach widget { editorOptionsCheckBox22 editorOptionsDir2 } {
Help $widget "Location of common signature for both local and remote signatue to the bottom of outgoing messages. This eases you for entering same location twice (and it use another variable set too)."
}
TextBox signatureTextBox3 \
-height 3 \
-width 80 \
-help "This is how your \"~/.signature\" file looked like when you started the current dotfile application. (In case of no such file this textbox isn't active)."
################################ Change #################################
Change {
if {$editorOptionsCheckBox33==0} {
Disable editorOptionsCheckBox22
Disable editorOptionsDir2
Disable editorOptionsDir3
Disable editorOptionsDir4
Disable editorOptionsHead2
Disable signatureTextBox1
Disable signatureTextBox2
Disable signatureTextBox3
} else {
Enable editorOptionsCheckBox22
Enable editorOptionsDir2
Enable editorOptionsDir3
Enable editorOptionsDir4
Enable editorOptionsHead2
Enable signatureTextBox1
Enable signatureTextBox2
Enable signatureTextBox3
if {$editorOptionsCheckBox22==0} {
Enable editorOptionsDir3
Enable editorOptionsDir4
Disable editorOptionsDir2
Enable signatureTextBox1
Enable signatureTextBox1
Disable signatureTextBox3
} {
Disable editorOptionsDir3
Disable editorOptionsDir4
Enable editorOptionsDir2
Disable signatureTextBox1
Disable signatureTextBox2
Enable signatureTextBox3
}
}
}
############################## Init / Save ##############################
Init {
### Read default values from system ###
if {[file exists [glob ~]/.elm/localsignature]} {
set signatureTextBox1 [exec cat [glob ~]/.elm/localsignature]
}
if {[file exists [glob ~]/.elm/remotesignature]} {
set signatureTextBox2 [exec cat [glob ~]/.elm/remotesignature]
}
if {[file exists [glob ~]/.signature]} {
set signatureTextBox3 [exec cat [glob ~]/.signature]
}
}
Save {
print "\n# Dashes above signatures? (News 2.11 compatibility and convention)"
if {$signatureCheckBox1==0} {
print "sigdashes = OFF"
} else {
print "###sigdashes = ON"
}
if {$editorOptionsCheckBox22==0} {
print "\n# local \".signature\" file to append to appropriate messages"
if {$editorOptionsDir3=="./" || $editorOptionsDir3==""} {
print "###localsignature = "
} else {
print "localsignature = $editorOptionsDir3"
}
print "\n# remote \".signature\" file to append to appropriate messages"
if {$editorOptionsDir4=="./" || $editorOptionsDir4==""} {
print "###remotesignature = "
} else {
print "remotesignature = $editorOptionsDir4"
}
} else {
if {$editorOptionsDir2!="./" && $editorOptionsDir2!=""} {
print "\n# both remote and local \".signature\" file to append to appropriate messages"
print "signature = $editorOptionsDir2"
}
}
}
}
|