[Tkabber-dev] r499 - in trunk/plugins: clienticons hidetabs

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Oct 28 21:16:24 MSD 2011


Author: ancestor
Date: 2011-10-28 21:16:24 +0400 (Fri, 28 Oct 2011)
New Revision: 499

Modified:
   trunk/plugins/clienticons/clienticons.tcl
   trunk/plugins/hidetabs/hidetabs.tcl
Log:
1) Fixed invalid disco#info queries in clienticons.tcl.
2) Fixed invalid shortkey bind in hidetabs.tcl.


Modified: trunk/plugins/clienticons/clienticons.tcl
===================================================================
--- trunk/plugins/clienticons/clienticons.tcl	2011-10-11 07:39:39 UTC (rev 498)
+++ trunk/plugins/clienticons/clienticons.tcl	2011-10-28 17:16:24 UTC (rev 499)
@@ -235,7 +235,9 @@
     set mjid [lindex $jid 1]
     set sjid [::xmpp::jid::stripResource $mjid]
 
-    lassign [::roster::get_category_and_subtype $xlib $sjid] category subtype	
+    if {$sjid != [lindex $group 1]} {
+        lassign [::roster::get_category_and_subtype $xlib $sjid] category subtype
+    }
 
     if {$type == "jid" || $type == "jid2" || $type == "metajid"} {
         if {$category == "conference" && $w == ".roster"} return

Modified: trunk/plugins/hidetabs/hidetabs.tcl
===================================================================
--- trunk/plugins/hidetabs/hidetabs.tcl	2011-10-11 07:39:39 UTC (rev 498)
+++ trunk/plugins/hidetabs/hidetabs.tcl	2011-10-28 17:16:24 UTC (rev 499)
@@ -89,12 +89,12 @@
 	custom::defvar config(key_nb_toggle) "<Key-F5>" \
 		[mc "Key for toggle tabbar."] \
 		-group hidetabs -type string \
-		-command [list [namespace current]::change_bindkey $config(key_nb_toggle)]
+		-command [namespace current]::change_bindkey
 
 	custom::defvar config(key_menu_toggle) "<KeyPress-Alt_R>" \
 		[mc "Key for toggle tabs menu."] \
 		-group hidetabs -type string \
-		-command [list [namespace current]::change_bindkey $config(key_menu_toggle)]
+		-command [namespace current]::change_bindkey
 	
 	image create photo hidetabs/none-type \
 		-file [file join $cdir pixmaps none-type.gif]
@@ -165,6 +165,7 @@
 	
 	show_unread
 	show_ctab
+	hide_labels_process
 	
 	bind . $config(key_nb_toggle) [namespace current]::toggle_tabbar
 	bind . $config(key_menu_toggle) [list [namespace current]::menu_key 0 toggle]
@@ -428,25 +429,23 @@
 	}
 }
 
-proc hidetabs::change_bindkey {old_key ns key c} {
-	variable config
 
-	catch {bind . $old_key {}}
+proc hidetabs::change_bindkey {ns key c} {
+	variable config
+	variable old_key
 	
+	catch {bind . $old_key($key) {}}
+	
 	if { [string length $config($key)] == 0 } {
 		return
 	}
+
+	set old_key($key) $config($key)
 	
-	switch -- $key {
-		key_menu_toggle {
-			bind . $config(key_menu_toggle) \
-				[list [namespace current]::menu_key 0 toggle]
-		}
-		key_nb_toggle {
-			bind . $config(key_nb_toggle) \
-				[namespace current]::toggle_tabbar
-		}
-	}
+	bind . $config(key_menu_toggle) \
+		[list [namespace current]::menu_key 0 toggle]
+	bind . $config(key_nb_toggle) \
+		[namespace current]::toggle_tabbar
 }
 
 proc hidetabs::pcm_menu { m } {



More information about the Tkabber-dev mailing list