[Tkabber-dev] r1027 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Mar 8 00:13:52 MSK 2007


Author: sergei
Date: 2007-03-08 00:13:51 +0300 (Thu, 08 Mar 2007)
New Revision: 1027

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/messages.tcl
   trunk/tkabber/presence.tcl
Log:
	* presence.tcl: Added custom presence menu to service contacts in
	  roster.

	* messages.tcl: Added menu item for granting subscription (this helps
	  if for some reason mutual subscription of two users is in
	  inconsistent state).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-03-07 20:46:47 UTC (rev 1026)
+++ trunk/tkabber/ChangeLog	2007-03-07 21:13:51 UTC (rev 1027)
@@ -24,6 +24,13 @@
 	* msgs/de.msg: Updated German translation (thanks to Roger
 	  Sondermann).
 
+	* presence.tcl: Added custom presence menu to service contacts in
+	  roster.
+
+	* messages.tcl: Added menu item for granting subscription (this helps
+	  if for some reason mutual subscription of two users is in
+	  inconsistent state).
+
 2007-03-06  Sergei Golovan  <sgolovan at nes.ru>
 
 	* chats.tcl: Fixed moving interface tabs by keyboard shortcuts

Modified: trunk/tkabber/messages.tcl
===================================================================
--- trunk/tkabber/messages.tcl	2007-03-07 20:46:47 UTC (rev 1026)
+++ trunk/tkabber/messages.tcl	2007-03-07 21:13:51 UTC (rev 1027)
@@ -920,12 +920,21 @@
     } else {
 	set state normal
     }
-    $m add command -label [::msgcat::mc "Resubscribe"] \
+    set mm [menu $m.subscription -tearoff 0]
+    $mm add command -label [::msgcat::mc "Request subscription"] \
 	-command [list jlib::send_presence \
 		      -to $rjid \
 		      -type subscribe \
-		      -connection $connid] \
-	-state $state
+		      -connection $connid]
+    $mm add command -label [::msgcat::mc "Grant subscription"] \
+	-command [list jlib::send_presence \
+		      -to $rjid \
+		      -type subscribed \
+		      -connection $connid]
+
+    $m add cascad -label [::msgcat::mc "Subscription"] \
+		  -menu $mm \
+		  -state $state
 }
 
 hook::add roster_jid_popup_menu_hook message::resubscribe_menu_item 30

Modified: trunk/tkabber/presence.tcl
===================================================================
--- trunk/tkabber/presence.tcl	2007-03-07 20:46:47 UTC (rev 1026)
+++ trunk/tkabber/presence.tcl	2007-03-07 21:13:51 UTC (rev 1027)
@@ -597,6 +597,7 @@
 
 hook::add chat_create_user_menu_hook custom_presence_menu 43
 hook::add roster_jid_popup_menu_hook custom_presence_menu 43
+hook::add roster_service_popup_menu_hook custom_presence_menu 43
 
 ###############################################################################
 



More information about the Tkabber-dev mailing list