[Tkabber-dev] r2168 - in trunk/tkabber: . msgs plugins/general

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Dec 20 10:40:43 MSK 2014


Author: sergei
Date: 2014-12-20 10:40:43 +0300 (Sat, 20 Dec 2014)
New Revision: 2168

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/datagathering.tcl
   trunk/tkabber/msgs/ru.msg
   trunk/tkabber/plugins/general/captcha.tcl
Log:
	* datagathering.tcl, plugins/general/captcha.tcl: Added title to the
	  jabber:x:data form windows. Use it for the CAPTCHA dialogs.

	* msgs/ru.msg: Updated Russian translations.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2014-12-13 08:20:06 UTC (rev 2167)
+++ trunk/tkabber/ChangeLog	2014-12-20 07:40:43 UTC (rev 2168)
@@ -1,3 +1,10 @@
+2014-12-20  Sergei Golovan  <sgolovan at nes.ru>
+
+	* datagathering.tcl, plugins/general/captcha.tcl: Added title to the
+	  jabber:x:data form windows. Use it for the CAPTCHA dialogs.
+
+	* msgs/ru.msg: Updated Russian translations.
+
 2014-12-09  Sergei Golovan  <sgolovan at nes.ru>
 
 	* gpgme.tcl: Fixed bug when unencrypted message is sent despite of

Modified: trunk/tkabber/datagathering.tcl
===================================================================
--- trunk/tkabber/datagathering.tcl	2014-12-13 08:20:06 UTC (rev 2167)
+++ trunk/tkabber/datagathering.tcl	2014-12-20 07:40:43 UTC (rev 2168)
@@ -379,7 +379,7 @@
 
 ###############################################################################
 
-proc data::draw_window {items send_cmd {cancel_cmd destroy}} {
+proc data::draw_window {items send_cmd args} {
     variable winid
 
     if {![info exists winid]} {
@@ -392,10 +392,19 @@
 	destroy $w
     }
 
+    set cancel_cmd destroy
+    set title ""
+    foreach {key val} $args {
+	switch -- $key {
+	    -cancelCommand { set cancel_cmd $val }
+	    -title { set title $val }
+	}
+    }
+
     toplevel $w -class XData
     wm group $w .
-    wm title $w ""
-    wm iconname $w ""
+    wm title $w $title
+    wm iconname $w $title
     wm transient $w .
     wm withdraw $w
     set geometry [option get $w geometry XData]
@@ -491,7 +500,7 @@
 
     data::draw_window $subels \
 	[list [namespace current]::send_data $xlib $xmlns $jid $node] \
-	[list [namespace current]::cancel_data $xlib $xmlns $jid $node]
+	-cancelCommand [list [namespace current]::cancel_data $xlib $xmlns $jid $node]
 }
 
 proc data::cancel_data {xlib xmlns jid node w} {

Modified: trunk/tkabber/msgs/ru.msg
===================================================================
--- trunk/tkabber/msgs/ru.msg	2014-12-13 08:20:06 UTC (rev 2167)
+++ trunk/tkabber/msgs/ru.msg	2014-12-20 07:40:43 UTC (rev 2168)
@@ -323,6 +323,7 @@
 ::msgcat::mcset ru "Cannot publish empty activity" "Вы должны выбрать\
 	занятие"
 ::msgcat::mcset ru "Cannot publish empty mood" "Вы должны выбрать состояние"
+::msgcat::mcset ru "CAPTCHA from %s" "Капча от %s"
 ::msgcat::mcset ru "Carbon copy" "Копия"
 ::msgcat::mcset ru "Cell:" "Мобильный:"
 ::msgcat::mcset ru "Certificate has expired" "Срок действия сертификата\

Modified: trunk/tkabber/plugins/general/captcha.tcl
===================================================================
--- trunk/tkabber/plugins/general/captcha.tcl	2014-12-13 08:20:06 UTC (rev 2167)
+++ trunk/tkabber/plugins/general/captcha.tcl	2014-12-20 07:40:43 UTC (rev 2168)
@@ -44,7 +44,8 @@
 
 proc captcha::process_x_data {f xlib from x} {
     data::draw_window [list $x] \
-		      [namespace code [list send_x_data $xlib $from]]
+		      [namespace code [list send_x_data $xlib $from]] \
+		      -title [::msgcat::mc "CAPTCHA from %s" $from]
 }
 
 proc captcha::send_x_data {xlib to w restags} {



More information about the Tkabber-dev mailing list