can anyone with svn access please review this ? I don't have time + I don't
feel like doing it + I'm fed up with
doing all that stuff anyway...
p.s.: "review this" means read the diff, review the changes, comment on them if
necessary and commit if it's all
good...
thanks.
KKRT
On Wed, Mar 28, 2007 at 05:08:00PM +0200, square87 wrote:
> Hi. This is my diff file. There are some fixes and some improvements.
>
> @@ -363,9 +363,6 @@ and @@ -378,12 +375,19 @@
> 1) I moved the instruction for OIM loging in an appropriate control flow.
> 2) I added an event for when we close a chatwindow. (it is useful to avoid
> that windbag plugin can create from 1 to number_of_contacts memory lacks)
>
> @@ -391,7 +395,7 @@
> I disabled this instruction, is it useful?
>
> @@ -544,12 +546,22 @@
> 1) I added support to log nudges (it works also in multichat)
> 2) This avoid the problem shown in screenshot (this problem is both for
> nudge and file transfer)
>
> @@ -277,21 +277,27 @@
> if we only want to log a msg we don't need a colon.
>
> @@ -277,21 +277,27 @@ , @@ -920,7 +925,12 @@
> This avoid the problem shown in screenshot.
>
> @@ -1367,7 +1377,7 @@
> It corrects a typos with logic operators
>
> @@ -5278,7 +5288,7 @@
> If we don't change the nick we do some instructions and calling uselessly.
> For example if we only change our psm, friendly name, or simply if we open
> "Change Nick" window and then we click on "ok".
>
> Sorry for my English.
> Thanks.
> Square87
> Index: chatwindow.tcl
> ===================================================================
> --- chatwindow.tcl (revision 8304)
> +++ chatwindow.tcl (working copy)
> @@ -363,9 +363,6 @@
>
>
> set chatid [::ChatWindow::Name $window]
> - if { [::OIM_GUI::IsOIM $chatid] == 1} {
> - ::log::StopLog $chatid
> - }
>
> #Only run when the parent window close event comes
> if { "$window" != "$path" } {
> @@ -378,12 +375,19 @@
> return 0
> }
> if {[::config::getKey keep_logs]} {
> - set user_list [::MSN::usersInChat $chatid]
> - foreach user_login $user_list {
> - ::log::StopLog $user_login
> + if { [::OIM_GUI::IsOIM $chatid] == 1} {
> + ::log::StopLog $chatid
> + } else {
> + set user_list [::MSN::usersInChat $chatid]
> + foreach user_login $user_list {
> + ::log::StopLog $user_login
> + }
> }
> }
>
> + set evPar(chatid) chatid
> + ::plugins::PostEvent closed_conversation evPar
> +
> ::ChatWindow::UnsetFor $chatid $window
> unset ::ChatWindow::titles(${window})
> unset ::ChatWindow::first_message(${window})
> @@ -391,7 +395,7 @@
>
> #Delete images if not in use
> catch {destroy $window.bottom.pic}
> - set user_list [::MSN::usersInChat $chatid]
> + # set user_list [::MSN::usersInChat $chatid]
>
> #Could be cleaner, but this works, destroying unused vars,
> saving mem
> catch {
> Index: plugins/Nudge/Nudge.tcl
> ===================================================================
> --- plugins/Nudge/Nudge.tcl (revision 8304)
> +++ plugins/Nudge/Nudge.tcl (working copy)
> @@ -544,12 +546,22 @@
> } else {
> SendMessageFIFO [list ::Nudge::winwriteWrapped $chatid
> $text $iconname $color] "::amsn::messages_stack($chatid)"
> "::amsn::messages_flushing($chatid)"
> }
> + #if loging system is enabled
> + if {[::config::getKey keep_logs]} {
> + ::log::PutLog $chatid $text ""
> + }
> }
>
> proc winwriteWrapped {chatid text iconname {color "green"} } {
> + set win_name [::ChatWindow::For $chatid]
> amsn::WinWrite $chatid "\n" $color
> amsn::WinWriteIcon $chatid greyline 3
> - amsn::WinWrite $chatid "\n" $color
> + #if this is the first line of chatwindow...
> + if { [[::ChatWindow::GetOutText ${win_name}] get 1.0 2.0] ==
> "\n" } {
> + amsn::WinWrite $chatid "\n \n" $color
> + } else {
> + amsn::WinWrite $chatid "\n" $color
> + }
> amsn::WinWriteIcon $chatid $iconname 3 2
> amsn::WinWrite $chatid "[timestamp] $text\n" $color
> amsn::WinWriteIcon $chatid greyline 3
> Index: loging.tcl
> ===================================================================
> --- loging.tcl (revision 8304)
> +++ loging.tcl (working copy)
> @@ -277,21 +277,27 @@
> set user [trans deliverfail]
> }
>
> + if { $msg == ""} {
> + set colon ""
> + } else {
> + set colon ":"
> + }
> +
> if {[::OIM_GUI::IsOIM $chatid] || $OIMStamp != 0 } {
> - ::log::WriteLog $chatid "\|\"LITA$user :\|\"L$color
> $msg\n" 0 $chatid $OIMStamp
> + ::log::WriteLog $chatid "\|\"LITA$user
> $colon\|\"L$color $msg\n" 0 $chatid $OIMStamp
> } else {
> set user_list [::MSN::usersInChat $chatid]
> foreach user_info $user_list {
> set user_login [lindex $user_info 0]
> if { [llength $user_list] > 1 } {
> - ::log::WriteLog $user_login
> "\|\"LITA$user :\|\"L$color $msg\n" 1 $user_list
> + ::log::WriteLog $user_login
> "\|\"LITA$user $colon\|\"L$color $msg\n" 1 $user_list
> } else {
> # for 2 windows (1 priv 1 conf)
> # if conf exists for current user &
> current chatid is not a conf
> if { [ConfArray $user_login get] == 1
> && $chatid == $user_login} {
> - ::log::WriteLog $user_login
> "\|\"LITA\[[trans linprivate]\] $user :\|\"L$color $msg\n" 2 $user_list
> + ::log::WriteLog $user_login
> "\|\"LITA\[[trans linprivate]\] $user $colon\|\"L$color $msg\n" 2 $user_list
> } else {
> - ::log::WriteLog $user_login
> "\|\"LITA$user :\|\"L$color $msg\n" 0 $user_list
> + ::log::WriteLog $user_login
> "\|\"LITA$user $colon\|\"L$color $msg\n" 0 $user_list
> }
> }
> }
> Index: gui.tcl
> ===================================================================
> --- gui.tcl (revision 8304)
> +++ gui.tcl (working copy)
> @@ -815,9 +814,15 @@
> }
>
> proc WinWriteFTSend { chatid txt cookie } {
> + set win_name [::ChatWindow::For $chatid]
> +
> WinWrite $chatid "\n" green
> WinWriteIcon $chatid greyline 3
> - WinWrite $chatid "\n" green
> + if { [[::ChatWindow::GetOutText ${win_name}] get 1.0 2.0] ==
> "\n" } {
> + WinWrite $chatid "\n \n" green
> + } else {
> + WinWrite $chatid "\n" green
> + }
> WinWriteIcon $chatid fticon 3 2
> WinWrite $chatid "$txt " green
> WinWriteClickable $chatid "[trans cancel]" \
> @@ -920,7 +925,12 @@
> set win_name [::ChatWindow::MakeFor $chatid $txt $dest]
> WinWrite $chatid "\n" green
> WinWriteIcon $chatid greyline 3
> - WinWrite $chatid "\n" green
> + #Check if this is first line in the text, add a \n at the
> beginning of the line
> + if { [[::ChatWindow::GetOutText ${win_name}] get 1.0 2.0] ==
> "\n" } {
> + WinWrite $chatid "\n \n" green
> + } else {
> + WinWrite $chatid "\n" green
> + }
>
> if { [::skin::loadPixmap "FT_preview_${sid}"] != "" } {
> WinWriteIcon $chatid FT_preview_${sid} 5 5
> @@ -1367,7 +1377,7 @@
>
>
> # Close the window if the filetransfer is finished
> - if {($mode == "fr" | $mode == "fs") & [::config::getKey
> ftautoclose]} {
> + if {($mode == "fr" || $mode == "fs") && [::config::getKey
> ftautoclose]} {
> destroy $w
> }
>
> @@ -5278,7 +5288,7 @@
> #///////////////////////////////////////////////////////////////////////
> proc change_name_ok {} {
> set new_name [.change_name.f.nick_entry get]
> - if {$new_name != ""} {
> + if {$new_name != "" && [::abook::getContactData myself MFN] !=
> $new_name} {
> if { [string length $new_name] > 130} {
> set answer [::amsn::messageBox [trans longnick] yesno
> question [trans confirm]]
> if { $answer == "no" } {
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Amsn-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/amsn-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Amsn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amsn-devel