[Tkabber-dev] r1094 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Apr 10 12:19:46 MSD 2007


Author: sergei
Date: 2007-04-10 12:19:45 +0400 (Tue, 10 Apr 2007)
New Revision: 1094

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/messages.tcl
   trunk/tkabber/presence.tcl
Log:
	* messages.tcl, presence.tcl: Moved showing unsubscribed message
	  dialog to messages.tcl and made several dialogs possible.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-04-09 18:31:05 UTC (rev 1093)
+++ trunk/tkabber/ChangeLog	2007-04-10 08:19:45 UTC (rev 1094)
@@ -1,3 +1,8 @@
+2007-04-10  Sergei Golovan  <sgolovan at nes.ru>
+
+	* messages.tcl, presence.tcl: Moved showing unsubscribed message
+	  dialog to messages.tcl and made several dialogs possible.
+
 2007-04-09  Sergei Golovan  <sgolovan at nes.ru>
 
 	* pixmaps/default/services/jud.gif, pixmaps/default/services/sms.gif:

Modified: trunk/tkabber/messages.tcl
===================================================================
--- trunk/tkabber/messages.tcl	2007-04-09 18:31:05 UTC (rev 1093)
+++ trunk/tkabber/messages.tcl	2007-04-10 08:19:45 UTC (rev 1094)
@@ -667,6 +667,21 @@
 
 ###############################################################################
 
+proc message::show_unsubscribed_dialog {connid from type x args} {
+    variable msgid
+
+    if {$type != "unsubscribed"} return
+
+    MessageDlg .unsubscribed[incr msgid] -aspect 50000 -icon info \
+	-title [::msgcat::mc "Unsubscribed from %s" $from] \
+	-message [::msgcat::mc "You are unsubscribed from %s" $from] \
+	-type user -buttons {ok} -default 0 -cancel 0
+}
+
+hook::add client_presence_hook message::show_unsubscribed_dialog
+
+###############################################################################
+
 proc message::subscribe {mw connid jid} {
     jlib::send_presence -to $jid -type subscribed -connection $connid
 

Modified: trunk/tkabber/presence.tcl
===================================================================
--- trunk/tkabber/presence.tcl	2007-04-09 18:31:05 UTC (rev 1093)
+++ trunk/tkabber/presence.tcl	2007-04-10 08:19:45 UTC (rev 1094)
@@ -66,12 +66,7 @@
 	subscribe {}
 	subscribed {}
 	unsubscribe {}
-	unsubscribed {
-	    MessageDlg .unsubscribed -aspect 50000 -icon info \
-		-title [::msgcat::mc "Unsubscribed from %s" $from] \
-		-message [::msgcat::mc "You are unsubscribed from %s" $from] \
-		-type user -buttons {ok} -default 0 -cancel 0
-	}
+	unsubscribed {}
 	probe {}
 	default {
 	    set type available



More information about the Tkabber-dev mailing list