Comment 5 for bug 173051

Revision history for this message
Mats (matsben) wrote :

I have kept the Return action as before and added same behaviour on FocusOut:

    # Special bindings for setting subject.
    bind $wsubject <FocusIn> [list ::Chat::OnFocusInSubject $chattoken]
    bind $wsubject <Return> [list ::Chat::SetSubject $chattoken]

    switch -- $config(chat,set-subject) {
 "return" {
     bind $wsubject <FocusOut> [list ::Chat::RevokeSubject $chattoken]
 }
 "focusout" {
     bind $wsubject <FocusOut> [list ::Chat::SetSubject $chattoken]
 }
    }

It is config()urable:

    # Set subject on Return or when focus out?
    set ::config(chat,set-subject) "focusout" ;# return|focusout

The mechanism you are suggesting is identical to an old one I had which I rejected for the OnReturn one. I still think it is less straightforward than the OnReturn one.