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

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Aug 3 21:57:41 MSD 2008


Author: sergei
Date: 2008-08-03 21:57:40 +0400 (Sun, 03 Aug 2008)
New Revision: 1480

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/msgs/ru.msg
   trunk/tkabber/plugins/general/copy_jid.tcl
Log:
	* plugins/general/copy_jid.tcl: Added a menu item for copying real JID
	  (if available) in groupchats to clipboard (thanks to Konstantin
	  Khomoutov).

	* msgs/ru.msg: Updated Russian translation (thanks to Konstantin
	  Khomoutov).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-07-30 16:13:55 UTC (rev 1479)
+++ trunk/tkabber/ChangeLog	2008-08-03 17:57:40 UTC (rev 1480)
@@ -1,3 +1,12 @@
+2008-08-03  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/general/copy_jid.tcl: Added a menu item for copying real JID
+	  (if available) in groupchats to clipboard (thanks to Konstantin
+	  Khomoutov).
+
+	* msgs/ru.msg: Updated Russian translation (thanks to Konstantin
+	  Khomoutov).
+
 2008-07-30  Sergei Golovan  <sgolovan at nes.ru>
 
 	* login.tcl: Added -proxy option to jlib::connect call even if no

Modified: trunk/tkabber/msgs/ru.msg
===================================================================
--- trunk/tkabber/msgs/ru.msg	2008-07-30 16:13:55 UTC (rev 1479)
+++ trunk/tkabber/msgs/ru.msg	2008-08-03 17:57:40 UTC (rev 1480)
@@ -405,6 +405,7 @@
 ::msgcat::mcset ru "Copy headline to clipboard" "Скопировать новость в буфер\
 	обмена"
 ::msgcat::mcset ru "Copy JID to clipboard" "Скопировать JID в буфер обмена"
+::msgcat::mcset ru "Copy real JID to clipboard" "Скопировать реальный JID в буфер обмена"
 ::msgcat::mcset ru "Copy selection to clipboard" "Скопировать выделение в\
 	буфер обмена"
 ::msgcat::mcset ru "Copy URL to clipboard" "Скопировать URL в буфер обмена"

Modified: trunk/tkabber/plugins/general/copy_jid.tcl
===================================================================
--- trunk/tkabber/plugins/general/copy_jid.tcl	2008-07-30 16:13:55 UTC (rev 1479)
+++ trunk/tkabber/plugins/general/copy_jid.tcl	2008-08-03 17:57:40 UTC (rev 1480)
@@ -20,8 +20,23 @@
 	   -command [list [namespace current]::copy $m $jid]
 }
 
+proc copy_jid::add_muc_menu_item {m connid jid} {
+    set real_jid [::muc::get_real_jid $connid $jid]
+    if {$real_jid != ""} {
+	$m add command \
+	   -label [::msgcat::mc "Copy real JID to clipboard"] \
+	   -command [list [namespace current]::copy $m $real_jid]
+    } else {
+	$m add command \
+	   -label [::msgcat::mc "Copy real JID to clipboard"] \
+	   -state disabled
+    }
+}
+
 hook::add roster_create_groupchat_user_menu_hook \
     [namespace current]::copy_jid::add_menu_item 44
+hook::add roster_create_groupchat_user_menu_hook \
+    [namespace current]::copy_jid::add_muc_menu_item 44.5
 hook::add chat_create_user_menu_hook \
     [namespace current]::copy_jid::add_menu_item 44
 hook::add chat_create_conference_menu_hook \
@@ -39,3 +54,4 @@
 
 ###############################################################################
 
+# vim:ts=8:sw=4:sts=4:noet



More information about the Tkabber-dev mailing list