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

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat May 9 17:40:07 MSD 2009


Author: sergei
Date: 2009-05-09 17:40:07 +0400 (Sat, 09 May 2009)
New Revision: 1803

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/msgs/de.msg
   trunk/tkabber/plugins/general/remote.tcl
Log:
	* plugins/general/remote.tcl: Fixed binding of <Destroy> event if the
	  bound script contains % sign.

	* msgs/de.msg: Updated German translation (thanks to Roger Sondermann).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-05-09 12:16:14 UTC (rev 1802)
+++ trunk/tkabber/ChangeLog	2009-05-09 13:40:07 UTC (rev 1803)
@@ -8,6 +8,11 @@
 	* plugins/chat/chatstate.tcl: Added sending 'paused' event (thanks to
 	  quantifier at jabster.pl).
 
+	* plugins/general/remote.tcl: Fixed binding of <Destroy> event if the
+	  bound script contains % sign.
+
+	* msgs/de.msg: Updated German translation (thanks to Roger Sondermann).
+
 2009-05-07  Sergei Golovan  <sgolovan at nes.ru>
 
 	* joingrdialog.tcl: Added another room JID normalization.

Modified: trunk/tkabber/msgs/de.msg
===================================================================
--- trunk/tkabber/msgs/de.msg	2009-05-09 12:16:14 UTC (rev 1802)
+++ trunk/tkabber/msgs/de.msg	2009-05-09 13:40:07 UTC (rev 1803)
@@ -1,6 +1,6 @@
 
 # German messages file
-# Roger Sondermann 17.04.2009
+# Roger Sondermann 07.09.2009
 
 # .../chats.tcl
 ::msgcat::mcset de "%s has changed nick to %s."                             "%s hat seinen Nicknamen geändert in %s"
@@ -452,9 +452,9 @@
 ::msgcat::mcset de "No default list"                                        "Keine voreingestellte Liste"
 ::msgcat::mcset de "Presence-in"                                            "Präsenz eingehend"
 ::msgcat::mcset de "Presence-out"                                           "Präsenz ausgehend"
-::msgcat::mcset de "Privacy list is activated"                              "Privatsphären-Liste ist aktiv"
-::msgcat::mcset de "Privacy list is not activated"                          "Privatsphären-Liste ist nicht aktiv"
-::msgcat::mcset de "Privacy list is not created"                            "Privatsphären-Liste ist nicht erstellt"
+::msgcat::mcset de "Privacy list is activated"                              "Privatsphären-Liste ist aktiviert"
+::msgcat::mcset de "Privacy list is not activated"                          "Privatsphären-Liste ist nicht aktiviert"
+::msgcat::mcset de "Privacy list is not created"                            "Privatsphären-Liste ist nicht erstellt worden"
 ::msgcat::mcset de "Privacy lists"                                          "Privatsphären-Listen"
 ::msgcat::mcset de "Privacy lists are not implemented"                      "Privatsphären-Listen sind nicht implementiert"
 ::msgcat::mcset de "Privacy lists are unavailable"                          "Privatsphären-Listen sind nicht verfügbar"

Modified: trunk/tkabber/plugins/general/remote.tcl
===================================================================
--- trunk/tkabber/plugins/general/remote.tcl	2009-05-09 12:16:14 UTC (rev 1802)
+++ trunk/tkabber/plugins/general/remote.tcl	2009-05-09 13:40:07 UTC (rev 1803)
@@ -285,7 +285,7 @@
 	    return [::remote::get_error modify bad-request bad-action]
 	}
 
-    } elseif { ($state(step) < $steps) && ($state(step) > 0) } {
+    } elseif {($state(step) < $steps) && ($state(step) > 0)} {
 	# Inner step
 	if {[cequal $action "next"] || [cequal $action "execute"] || [cequal $action ""]} {
 
@@ -318,7 +318,7 @@
 	}
 
 
-    } elseif { $state(step) == $steps } {
+    } elseif {$state(step) == $steps} {
 	# Last step
 	if {[cequal $action complete] || [cequal $action execute] || [cequal $action ""]} {
 
@@ -659,11 +659,11 @@
 	set count [llength $unread($id)]
 
 	switch -- $type {
-	    chat      { set msg [::trans::trans $lang "%s: %s chat message(s)"] }
-	    groupchat { set msg [::trans::trans $lang "%s: %s groupchat message(s)"] }
-	    headline  { set msg [::trans::trans $lang "%s: %s headline message(s)"] }
-	    normal    { set msg [::trans::trans $lang "%s: %s normal message(s)"] }
-	    default   { set msg [::trans::trans $lang "%s: %s unknown message(s)"] }
+	    chat      {set msg [::trans::trans $lang "%s: %s chat message(s)"]}
+	    groupchat {set msg [::trans::trans $lang "%s: %s groupchat message(s)"]}
+	    headline  {set msg [::trans::trans $lang "%s: %s headline message(s)"]}
+	    normal    {set msg [::trans::trans $lang "%s: %s normal message(s)"]}
+	    default   {set msg [::trans::trans $lang "%s: %s unknown message(s)"]}
 	}
 
 	lappend options [format $msg $name $count] $id
@@ -771,7 +771,9 @@
 
     lassign $id type chatid
 
-    if {![info exists unread($id)]} { return }
+    if {![info exists unread($id)]} {
+	return
+    }
 
     foreach elem $unread($id) {
 
@@ -850,7 +852,7 @@
 proc ::remote::forward::trace_number_msg {var1 chatid mode} {
     variable unread
 
-    if { $::ifacetk::number_msg($chatid) == 0 } {
+    if {$::ifacetk::number_msg($chatid) == 0} {
 	set type $::chat::chats(type,$chatid)
 	set id [list $type $chatid]
 	catch {unset unread($id)}
@@ -879,12 +881,11 @@
     }
 
     set msgwin [winfo toplevel $f]
-
-    bindtags $msgwin [concat [bindtags $msgwin] tag$msgwin]
-    bind tag$msgwin <Destroy> \
-	 +[list [namespace current]::on_msgwin_destroy $msgwin $id]
     lappend unread($id) $msgwin
 
+    bind $f <Destroy> \
+	 +[double% [namespace code [list on_msgwin_destroy $msgwin $id]]]
+
     set date [clock seconds]
     set msgdata($msgwin) [list $date $from $body $x]
 
@@ -893,7 +894,7 @@
 
 hook::add message_process_x_hook ::remote::forward::message_process_x
 
-# clear chat message with type == normal if it was closed
+# clear message with type == normal if it was closed
 proc ::remote::forward::on_msgwin_destroy {msgwin id} {
     variable unread
     variable msgdata
@@ -905,7 +906,7 @@
 	catch {unset msgdata($msgwin)}
     }
 
-    if { [llength $unread($id)] == 0 } {
+    if {[llength $unread($id)] == 0} {
 	catch {unset unread($id)}
     }
 }



More information about the Tkabber-dev mailing list