improved autoquoting
This commit is contained in:
@@ -328,6 +328,7 @@ ttk::button .tabbar.p.addrframe.send -text "Send!" -command {
|
|||||||
set result [dict get $res result]
|
set result [dict get $res result]
|
||||||
if {$status} {
|
if {$status} {
|
||||||
set tiix_status "Posting success: $result"
|
set tiix_status "Posting success: $result"
|
||||||
|
.tabbar.p.content.text delete 1.0 end
|
||||||
} else {
|
} else {
|
||||||
set tiix_status "Posting error: $result"
|
set tiix_status "Posting error: $result"
|
||||||
}
|
}
|
||||||
@@ -404,6 +405,19 @@ proc updatefromreps {} {
|
|||||||
if {![string match "Re: *" $tiix_post_subj]} {
|
if {![string match "Re: *" $tiix_post_subj]} {
|
||||||
set tiix_post_subj "Re: $tiix_post_subj"
|
set tiix_post_subj "Re: $tiix_post_subj"
|
||||||
}
|
}
|
||||||
|
set textw .tabbar.p.content.text
|
||||||
|
# some nickname shortening heuristics
|
||||||
|
set shortnick $tiix_post_to
|
||||||
|
set parts [split $shortnick " "]
|
||||||
|
if {[llength $parts] > 1} {
|
||||||
|
set shortnick ""
|
||||||
|
foreach p $parts {
|
||||||
|
append shortnick [string index $p 0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if {![string match "$shortnick>*" [$textw get 1.0 1.end]]} {
|
||||||
|
$textw insert 1.0 "[string trimright [join [lmap s $msg(body) {string cat $shortnick {> } $s}] \n]]\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
msgdb close
|
msgdb close
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user