[Tkabber-dev] r1391 - in trunk/tkabber: . ifacetk

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Mar 7 22:03:09 MSK 2008


Author: sergei
Date: 2008-03-07 22:03:08 +0300 (Fri, 07 Mar 2008)
New Revision: 1391

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/iroster.tcl
   trunk/tkabber/presence.tcl
Log:
	* ifacetk/iroster.tcl, presence.tcl: Code cleanup.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-03-07 13:28:38 UTC (rev 1390)
+++ trunk/tkabber/ChangeLog	2008-03-07 19:03:08 UTC (rev 1391)
@@ -25,6 +25,8 @@
 	* README, doc/tkabber.html, doc/tkabber.xml: Fixed section about using
 	  fonts and added a few items into the list of new features in 0.10.1.
 
+	* ifacetk/iroster.tcl, presence.tcl: Code cleanup.
+
 2008-03-06  Sergei Golovan  <sgolovan at nes.ru>
 
 	* disco.tcl: Added new hook disco_node_reply_hook to allow answering

Modified: trunk/tkabber/ifacetk/iroster.tcl
===================================================================
--- trunk/tkabber/ifacetk/iroster.tcl	2008-03-07 13:28:38 UTC (rev 1390)
+++ trunk/tkabber/ifacetk/iroster.tcl	2008-03-07 19:03:08 UTC (rev 1391)
@@ -1580,7 +1580,7 @@
 	    set suffix2 [join [lrange [split $menu .] 2 end] .]
 	    set suffix3 [lindex [split $menu .] end]
 	    set m2 [menu $m.$suffix3 -tearoff 0]
-	    $m add cascad -label $label -menu $m2
+	    $m add cascade -label $label -menu $m2
 	    add_menu_submenu $m2 $prefix .$suffix2 $jids
 	} elseif {![catch { $m1 entrycget $i -variable } var]} {
 	    # Can't distinguish checkbuttons and radiobuttons
@@ -1608,7 +1608,7 @@
     }
     if {[llength $command_list] > 1} {
 	set m2 [menu $m.$i -tearoff 0]
-	$m add cascad -label $label -menu $m2
+	$m add cascade -label $label -menu $m2
 	foreach jid $jids {
 	    set m1 $prefix[jid_to_tag $jid]$suffix
 	    set idx [$m1 index $label]
@@ -1640,7 +1640,7 @@
     }
     if {[llength $command_list] > 1} {
 	set m2 [menu $m.$i -tearoff 0]
-	$m add cascad -label $label -menu $m2
+	$m add cascade -label $label -menu $m2
 	foreach jid $jids {
 	    set m1 $prefix[jid_to_tag $jid]$suffix
 	    set idx [$m1 index $label]
@@ -1923,7 +1923,7 @@
     $mm add command -label [::msgcat::mc "Unavailable"] \
 	-command [list roster::send_custom_presence_group $connid $name unavailable]
 
-    $m add cascad -label [::msgcat::mc "Send custom presence"] -menu $mm
+    $m add cascade -label [::msgcat::mc "Send custom presence"] -menu $mm
 }
 
 ###############################################################################

Modified: trunk/tkabber/presence.tcl
===================================================================
--- trunk/tkabber/presence.tcl	2008-03-07 13:28:38 UTC (rev 1390)
+++ trunk/tkabber/presence.tcl	2008-03-07 19:03:08 UTC (rev 1391)
@@ -603,38 +603,16 @@
     $mm add command -label [::msgcat::mc "Unavailable"] \
 	-command [list send_custom_presence $jid unavailable -connection $connid]
 
-    $m add cascad -label [::msgcat::mc "Send custom presence"] -menu $mm
+    $m add cascade -label [::msgcat::mc "Send custom presence"] -menu $mm
 }
 
 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
+hook::add chat_create_conference_menu_hook custom_presence_menu 43
 
 ###############################################################################
 
-proc custom_conference_presence_menu {m connid jid} {
-    set mm [menu $m.custom_presence -tearoff 0]
-
-    $mm add command -label [::msgcat::mc "Available"] \
-	-command [list send_custom_presence $jid available -connection $connid]
-    $mm add command -label [::msgcat::mc "Free to chat"] \
-	-command [list send_custom_presence $jid chat -connection $connid]
-    $mm add command -label [::msgcat::mc "Away"] \
-	-command [list send_custom_presence $jid away -connection $connid]
-    $mm add command -label [::msgcat::mc "Extended away"] \
-	-command [list send_custom_presence $jid xa -connection $connid]
-    $mm add command -label [::msgcat::mc "Do not disturb"] \
-	-command [list send_custom_presence $jid dnd -connection $connid]
-    $mm add command -label [::msgcat::mc "Unavailable"] \
-	-command [list send_custom_presence $jid unavailable -connection $connid]
-
-    $m add cascad -label [::msgcat::mc "Send custom presence"] -menu $mm
-}
-
-hook::add chat_create_conference_menu_hook custom_conference_presence_menu 43
-
-###############################################################################
-
 proc service_login {connid jid} {
     global userstatus
 



More information about the Tkabber-dev mailing list