From: <kak...@us...> - 2007-10-16 06:41:54
|
Revision: 9069 http://amsn.svn.sourceforge.net/amsn/?rev=9069&view=rev Author: kakaroto Date: 2007-10-15 23:41:57 -0700 (Mon, 15 Oct 2007) Log Message: ----------- As requested by 'phantom' at http://www.amsn-project.net/forums/viewtopic.php?t=4180 New option (I know!) to disable closing the chat window with the escape key.. I accepted that because I think it is a necessary option, for a customizable application, I think that kind of behavior should really be customizable by the user. It might be 'advanced' but it still is 'basic'... whatever.. Modified Paths: -------------- trunk/amsn/chatwindow.tcl trunk/amsn/config.tcl trunk/amsn/lang/langen Modified: trunk/amsn/chatwindow.tcl =================================================================== --- trunk/amsn/chatwindow.tcl 2007-10-15 20:17:15 UTC (rev 9068) +++ trunk/amsn/chatwindow.tcl 2007-10-16 06:41:57 UTC (rev 9069) @@ -1046,7 +1046,9 @@ #set current [GetCurrentWindow $container] #set currenttab [set win2tab($current)] #bind $container <<Escape>> "::ChatWindow::CloseTab \[set ::ChatWindow::win2tab(\[::ChatWindow::GetCurrentWindow $container\])\]" - bind $container <<Escape>> [list ::ChatWindow::CloseTabInContainer $container] + if {[::config::getKey escape_close_cw 1] == 1} { + bind $container <<Escape>> [list ::ChatWindow::CloseTabInContainer $container] + } #Send a postevent for the creation of menu set evPar(window_name) "$container" @@ -1162,7 +1164,9 @@ $w.search hide $w.search bindwindow $w - bind $w <<Escape>> "::ChatWindow::ContainerClose $w; break" + if {[::config::getKey escape_close_cw 1] == 1} { + bind $w <<Escape>> "::ChatWindow::ContainerClose $w; break" + } bind $w <Destroy> "::ChatWindow::DetachAll %W" # These bindings are handlers for closing the window (Leave the SB, store settings...) @@ -1264,7 +1268,9 @@ "::amsn::ShowChatList \"[trans history]\" $w ::log::OpenLogWin" } - bind $w <<Escape>> "::ChatWindow::Close $w; break" + if {[::config::getKey escape_close_cw 1] == 1} { + bind $w <<Escape>> "::ChatWindow::Close $w; break" + } bind $w <Destroy> "window_history clear %W; ::ChatWindow::Closed $w %W" #Different shortcuts on Mac OS X Modified: trunk/amsn/config.tcl =================================================================== --- trunk/amsn/config.tcl 2007-10-15 20:17:15 UTC (rev 9068) +++ trunk/amsn/config.tcl 2007-10-16 06:41:57 UTC (rev 9069) @@ -288,6 +288,9 @@ ::config::setKey big_incoming_smileys 0 ;# Whether to resize or not the incoming smileys to the standard 50x50 size. + ::config::setKey escape_close_cw 1 ;# Whether the escape key closes the chat windows or not + + #Advanced options, not in preferences window # Create the entry in the list and then, set # the variable at bottom @@ -355,6 +358,7 @@ [list local autocheckver bool autocheckver] \ [list local storename bool storenickname] \ [list local globaloverride bool globaloverride ] \ + [list local escape_close_cw bool escapeclosescw ] \ [list global disableprofiles bool disableprofiles] \ ] Modified: trunk/amsn/lang/langen =================================================================== --- trunk/amsn/lang/langen 2007-10-15 20:17:15 UTC (rev 9068) +++ trunk/amsn/lang/langen 2007-10-16 06:41:57 UTC (rev 9069) @@ -332,6 +332,7 @@ enterfilename Please enter a filename enternick Enter your nick enterpsm Your Personal Message +escapeclosescw Escape key closes chat windows error Error errortls Error installing TLS module: eventhistory View Events History This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |