[Tkabber-dev] r453 - trunk/plugins/chattoolbar

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Jan 4 09:44:32 MSK 2011


Author: Rejjin
Date: 2011-01-04 09:44:32 +0300 (Tue, 04 Jan 2011)
New Revision: 453

Added:
   trunk/plugins/chattoolbar/README_ru
Modified:
   trunk/plugins/chattoolbar/README
   trunk/plugins/chattoolbar/chattoolbar.tcl
Log:
Fixed bugs with show|hide toolbar.
Added README_ru file with russian manual.
Modified README - added section for binding keys (show and hide).

Modified: trunk/plugins/chattoolbar/README
===================================================================
--- trunk/plugins/chattoolbar/README	2011-01-03 18:35:01 UTC (rev 452)
+++ trunk/plugins/chattoolbar/README	2011-01-04 06:44:32 UTC (rev 453)
@@ -6,6 +6,10 @@
 quick and convenient access to commands. Buttons 
 can be sorted as you like. You can disable some buttons.
 
+[SHOW|HIDE TOOLBAR]
+For changing chattoolbar state use combination:
+Control-B
+
 [OPTIONS]
 The plugin can be configured through the standard menu 
 plugin. To do this you need to go to the menu "Tkabber",

Added: trunk/plugins/chattoolbar/README_ru
===================================================================
(Binary files differ)


Property changes on: trunk/plugins/chattoolbar/README_ru
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: trunk/plugins/chattoolbar/chattoolbar.tcl
===================================================================
--- trunk/plugins/chattoolbar/chattoolbar.tcl	2011-01-03 18:35:01 UTC (rev 452)
+++ trunk/plugins/chattoolbar/chattoolbar.tcl	2011-01-04 06:44:32 UTC (rev 453)
@@ -87,6 +87,7 @@
 	return
 	}
 	set chatwin [chat::chat_win $chatid]
+	set input_win [chat::input_win $chatid]
 	
 	catch {destroy [winfo parent $chatwin].toolbar.bbox}
 	catch {destroy [winfo parent $chatwin].toolbar}
@@ -106,28 +107,29 @@
 		}
 	}
 	
-	change_state_toolbar $chatid $toolFrame $user_variable(auto_show)
+	if {$user_variable(auto_show)} {change_state_toolbar $chatid $toolFrame} 
 	
 	bind $chatwin <<ChattoolbarState>> \
 	[list [namespace current]::change_state_toolbar $chatid $toolFrame]
+	bind $input_win <<ChattoolbarState>> \
+	[list [namespace current]::change_state_toolbar $chatid $toolFrame]
 }
 
 proc chattoolbar::change_state_toolbar {chatid toolFrame args} {
 variable stored_variable
 	
 	set activex [lsearch $stored_variable(activate_chats) $chatid]
-	
+
 	if {$activex < 0} {
 		set chatwin [chat::chat_win $chatid]
 		pack $toolFrame -side bottom -anchor w -fill x \
 			-before [winfo parent $chatwin].csw
 		lappend stored_variable(activate_chats) $chatid
-		if {[lindex $args 0] == 1} return
+	} else {
+		pack forget $toolFrame
+		set stored_variable(activate_chats) [lreplace \
+			$stored_variable(activate_chats) $activex $activex]
 	}
-	
-	pack forget $toolFrame
-	set stored_variable(activate_chats) [lreplace \
-		$stored_variable(activate_chats) $activex $activex]
 }
 
 proc chattoolbar::get_sorted_ids {} {



More information about the Tkabber-dev mailing list