[Tkabber-dev] r2011 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon May 20 16:17:50 MSK 2013


Author: sergei
Date: 2013-05-20 16:17:49 +0400 (Mon, 20 May 2013)
New Revision: 2011

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/messages.tcl
Log:
	* messages.tcl: Fixed choosing the outgoing connection when sending
	  normal messages using 'Services->Send message' menu item.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2013-02-20 10:37:41 UTC (rev 2010)
+++ trunk/tkabber/ChangeLog	2013-05-20 12:17:49 UTC (rev 2011)
@@ -1,3 +1,8 @@
+2013-05-20  Sergei Golovan  <sgolovan at nes.ru>
+
+	* messages.tcl: Fixed choosing the outgoing connection when sending
+	  normal messages using 'Services->Send message' menu item.
+
 2013-02-20  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/unix/dockingtray.tcl, plugins/unix/tktray.tcl,

Modified: trunk/tkabber/messages.tcl
===================================================================
--- trunk/tkabber/messages.tcl	2013-02-20 10:37:41 UTC (rev 2010)
+++ trunk/tkabber/messages.tcl	2013-05-20 12:17:49 UTC (rev 2011)
@@ -362,7 +362,7 @@
 
     set bbox [ButtonBox $mw.bottom.buttons -spacing 10 -padx 10]
     $bbox add -text [::msgcat::mc "Send"] \
-	-command [list message::send $mw $xlib -group $group]
+	-command [list message::send0 $mw -group $group]
     $bbox add -text [::msgcat::mc "Cancel"] -command [list destroy $mw]
     bind $mw <Control-Return> "ButtonBox::invoke [double% $bbox] 0"
     bind $mw <Escape> "ButtonBox::invoke [double% $bbox] 1"
@@ -802,13 +802,14 @@
     if {![info exists xlib]} {
 	set xlib [lindex [connections] 0]
     }
-    set send_subscribe_xlib [connection_jid $xlib]
 
     set mw .subscsend[incr msgid]
     toplevel $mw -class Message
     wm group $mw .
     wm withdraw $mw
 
+    set send_subscribe_xlib($mw) [connection_jid $xlib]
+
     if {[cequal $to ""]} {
         set title [::msgcat::mc "Send subscription request"]
     } else {
@@ -842,7 +843,7 @@
 	}
 	label $mw.subj.lconnection -text [::msgcat::mc "From: "]
 	ComboBox $mw.subj.connection \
-	    -textvariable [namespace current]::send_subscribe_xlib \
+	    -textvariable [namespace current]::send_subscribe_xlib($mw) \
 	    -values $connections \
 	    -state $cstate
 
@@ -878,7 +879,7 @@
     variable send_subscribe_xlib
 
     foreach c [connections] {
-	if {[connection_jid $c] == $send_subscribe_xlib} {
+	if {[connection_jid $c] == $send_subscribe_xlib($mw)} {
 	    set xlib $c
 	}
     }



More information about the Tkabber-dev mailing list