*** app-defaults.orig Thu Nov 20 10:57:00 1997 --- app-defaults Tue Dec 23 15:07:16 1997 *************** *** 766,772 **** *Sedit.Menubar.quit.command: SeditQuit $draft $t *Sedit.Menubar.send.text: Send *Sedit.Menubar.send.padX: 15 ! *Sedit.Menubar.send.command: SeditSend $draft $t ! ! The sign button turns into a menu with one entry for ! each file that matches the glob pattern ~/.signature* --- 766,772 ---- *Sedit.Menubar.quit.command: SeditQuit $draft $t *Sedit.Menubar.send.text: Send *Sedit.Menubar.send.padX: 15 ! *Sedit.Menubar.send.command: SeditSend $draft $t 0 ! ! The sign button turns into a menu with one entry for ! each file that matches the glob pattern ~/.signature* *************** *** 776,782 **** ! ! buttons is standard buttons ! ubuttons is for extra user-specific buttons ! *Sedit.Menubar.buttonlist: help repl abort save *Sedit.Menubar.ubuttonlist: *Sedit.Menubar.help.text: Help *Sedit.Menubar.help.command: SeditHelp --- 776,782 ---- ! ! buttons is standard buttons ! ubuttons is for extra user-specific buttons ! *Sedit.Menubar.buttonlist: help repl abort save post *Sedit.Menubar.ubuttonlist: *Sedit.Menubar.help.text: Help *Sedit.Menubar.help.command: SeditHelp *************** *** 784,789 **** --- 784,792 ---- *Sedit.Menubar.abort.command: SeditAbort $draft $t *Sedit.Menubar.save.text: Save&Quit *Sedit.Menubar.save.command: SeditSave $draft $t SeditNuke + *Sedit.Menubar.post.text: Post + *Sedit.Menubar.post.padX: 10 + *Sedit.Menubar.post.command: SeditSend $draft $t 1 ! The repl button is well-known. It is disabled except when replying. *Sedit.Menubar.repl.text: Quote *** post.tcl.ok Tue Dec 23 09:58:33 1997 --- post.tcl Tue Dec 23 14:58:12 1997 *************** *** 23,28 **** --- 23,31 ---- {NNTP(port) nntpPort {119} {NNTP port} "Port on which the news server listens for nntp connections. 119 unless your site is weird"} + {NNTP(emailaddr) nntpEmailAddr {} {My address when posting} + "E-mail address to use when posting to newsgroups. + Typically: First Last "} {NNTP(moderated) nntpModerated {} {Groups you moderate} "A list of groups which you moderate separated by whitespace. If one of these is in the Newsgroups header then an Approved *************** *** 59,65 **** # and CNews which get upset when they can't do it set header_throwAway \ {{return-path:} {received:} {path:} {date:} {message-id:} {to:} \ ! {lines:} {x-exmh-isig-}} # Headers INN wants to add itself get X-original- shoved in front # if we want to keep them --- 62,68 ---- # and CNews which get upset when they can't do it set header_throwAway \ {{return-path:} {received:} {path:} {date:} {message-id:} {to:} \ ! {lines:} {x-exmh-isig-} {cc:}} # Headers INN wants to add itself get X-original- shoved in front # if we want to keep them *************** *** 70,83 **** # split header from body set sp [string first "\n\n" $text] - set hdr [string range $text 0 [incr sp -1]] - set NNTP(body) [string range $text [incr sp 3] end] - set headerin [split $hdr \n] set NNTP(headers) {} set flag 0 set NNTP(post_groups) $NNTP(groups) set organization 0 # parse headers and dispose of as necessary --- 73,93 ---- # split header from body set sp [string first "\n\n" $text] + set spmh [string first "\n--------\n" $text] + if {$sp < 0 || ($spmh > 0 && $spmh < $sp)} { + set sp $spmh + set hdr [string range $text 0 [incr sp -1]] + set NNTP(body) [string range $text [incr sp 11] end] + } else { + set hdr [string range $text 0 [incr sp -1]] + set NNTP(body) [string range $text [incr sp 3] end] + } set headerin [split $hdr \n] set NNTP(headers) {} set flag 0 set NNTP(post_groups) $NNTP(groups) + set NNTP(sender) $NNTP(emailaddr) set organization 0 # parse headers and dispose of as necessary *** sedit.tcl.ok Tue Dec 23 07:21:27 1997 --- sedit.tcl Tue Dec 23 14:54:24 1997 *************** *** 300,306 **** Widget_Frame $f f Dialog $f.f configure -bd 10 Widget_AddBut $f.f ok "Abort" [list SeditAbortDirect $draft $t] ! Widget_AddBut $f.f send "Send\n(Ctrl-c)" [list SeditSend $draft $t] Widget_AddBut $f.f save "Save\n(Ctrl-s)" \ [list SeditSave $draft $t SeditNuke] Widget_AddBut $f.f no "Do nothing\n(Return)" [list destroy $f] --- 300,306 ---- Widget_Frame $f f Dialog $f.f configure -bd 10 Widget_AddBut $f.f ok "Abort" [list SeditAbortDirect $draft $t] ! Widget_AddBut $f.f send "Send\n(Ctrl-c)" [list SeditSend $draft $t 0] Widget_AddBut $f.f save "Save\n(Ctrl-s)" \ [list SeditSave $draft $t SeditNuke] Widget_AddBut $f.f no "Do nothing\n(Return)" [list destroy $f] *************** *** 376,383 **** update idletasks } ! proc SeditSend { draft t } { global sedit exmh intelligentSign editor set id [SeditId $draft] SeditCheckForIsigHeaders $t Exmh_Debug SeditSend id=$id action=$exmh($id,action) --- 376,384 ---- update idletasks } ! proc SeditSendCommon { draft t {post 0} } { global sedit exmh intelligentSign editor + set id [SeditId $draft] SeditCheckForIsigHeaders $t Exmh_Debug SeditSend id=$id action=$exmh($id,action) *************** *** 408,414 **** } if [SeditSave $draft $t {} 0] { global env sedit ! $sedit($t,toplevel).but.send config -state disabled # Decide if this file needs to go through mhn if {$sedit($t,mhn) && ![catch {exec grep -l ^# $draft}]} { set env(mhdraft) $draft --- 409,419 ---- } if [SeditSave $draft $t {} 0] { global env sedit ! if {$post==0} { ! $sedit($t,toplevel).but.send config -state disabled ! } else { ! $sedit($t,toplevel).but.post config -state disabled ! } # Decide if this file needs to go through mhn if {$sedit($t,mhn) && ![catch {exec grep -l ^# $draft}]} { set env(mhdraft) $draft *************** *** 415,421 **** SeditMsg $t "Running mhn..." if [catch {exec $editor(mhn) $draft} err] { SeditMsg $t $err ! $sedit($t,toplevel).but.send config -state normal return } } --- 420,430 ---- SeditMsg $t "Running mhn..." if [catch {exec $editor(mhn) $draft} err] { SeditMsg $t $err ! if {$post==0} { ! $sedit($t,toplevel).but.send config -state normal ! } else { ! $sedit($t,toplevel).but.post config -state normal ! } return } } *************** *** 429,434 **** --- 438,453 ---- # Insert content-transfer-encoding headers SeditFixupEncoding $draft $t [expr ($sedit($t,quote) > 0)] } + return 1 + } else { + return 0 + } + } + + proc SeditSendOnly { draft t } { + global sedit exmh + + set id [SeditId $draft] foreach cmd [info commands Hook_SeditSend*] { if [catch {$cmd $draft $t} err] { SeditMsg $t "$cmd $err" *************** *** 461,466 **** --- 480,500 ---- } SeditMsg $t "Message saved and sent $time" } + } + + proc SeditSend { draft t {post 0} } { + global sedit exmh intelligentSign editor msg + + set common [SeditSendCommon $draft $t $post] + + if {$common==1} { + if {$post==0} { + SeditSendOnly $draft $t + } else { + set msg(path) $draft + Post + $sedit($t,toplevel).but.post config -state normal + } } } *** seditBind.tcl.orig Fri Aug 29 14:35:59 1997 --- seditBind.tcl Tue Dec 23 13:13:30 1997 *************** *** 89,95 **** # toplevel - not used # all - not used because it has focus-change bindings on bindtags $t [list $t SeditText TSelect TScroll [winfo toplevel $t]] ! SeditBind $t sendMsg "SeditSend $draft $t ; break" SeditBind Entry sendMsg { } SeditBind $t abortMsg "SeditAbort $draft $t ; break" SeditBind Entry abortMsg { } --- 89,95 ---- # toplevel - not used # all - not used because it has focus-change bindings on bindtags $t [list $t SeditText TSelect TScroll [winfo toplevel $t]] ! SeditBind $t sendMsg "SeditSend $draft $t 0 ; break" SeditBind Entry sendMsg { } SeditBind $t abortMsg "SeditAbort $draft $t ; break" SeditBind Entry abortMsg { }