Hello.
This patch should fix this errors:

1) if we receive a voiceclip and the window is not open, we receive an error
(i reported it, Id number is: 230718. I reported it twice sorry :-S)
2) sometimes if we receive/send a voiceclip we see the first greenline and
voiceicone pic on the same line.

Thanks
Square87
Index: chatwindow.tcl
===================================================================
--- chatwindow.tcl      (revision 8504)
+++ chatwindow.tcl      (working copy)
@@ -2530,24 +2530,29 @@
        }
 
        proc ReceivedVoiceClip {chatid filename } {
+
                set filename_decoded "[filenoext $filename]_decoded.wav"
                
                # This proc should be uncommented once tcl_siren implements the 
decoder
                if { [DecodeWave $filename $filename_decoded] == -1 } {
                        amsn::WinWrite $chatid "\n" red
                        amsn::WinWriteIcon $chatid greyline 3
-                       amsn::WinWrite $chatid "\n" red
+                       amsn::WinWrite $chatid " \n" red
                        amsn::WinWriteIcon $chatid voice_icon 3 2
                        amsn::WinWrite $chatid "[timestamp] [trans 
snackneeded]\n" red
                        amsn::WinWriteIcon $chatid greyline 3
                        return
                } else {
                        set uid [getUniqueValue]
+                       
+                       if {![info exists ::ChatWindow::msg_windows($chatid)]} {
+                               ::ChatWindow::MakeFor $chatid
+                       }
                        set w [::ChatWindow::For $chatid]
-                       
+
                        amsn::WinWrite $chatid "\n" red
                        amsn::WinWriteIcon $chatid greyline 3
-                       amsn::WinWrite $chatid "\n" red
+                       amsn::WinWrite $chatid " \n" red
                        amsn::WinWriteIcon $chatid voice_icon 3 2
                        amsn::WinWrite $chatid "[timestamp] [trans 
receivedvoice]\n  " green
                        amsn::WinWriteClickable $chatid "[trans play]" [list 
::ChatWindow::playVoiceClip $w $filename_decoded $uid] play_voice_clip_$uid
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to