[Tkabber-dev] r452 - in trunk/plugins/chattoolbar: . msgs

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Jan 3 21:35:01 MSK 2011


Author: Rejjin
Date: 2011-01-03 21:35:01 +0300 (Mon, 03 Jan 2011)
New Revision: 452

Added:
   trunk/plugins/chattoolbar/AUTHORS
   trunk/plugins/chattoolbar/README
   trunk/plugins/chattoolbar/TODO
   trunk/plugins/chattoolbar/icon-table.tcl
   trunk/plugins/chattoolbar/msgs/
   trunk/plugins/chattoolbar/msgs/ru.msg
Removed:
   trunk/plugins/chattoolbar/pixmaps/
Modified:
   trunk/plugins/chattoolbar/chattoolbar.tcl
Log:
If you activate the plugin, then the conversation 
window bar appears, which contains buttons for 
quick and convenient access to commands. Buttons 
can be sorted as you like. You can disable some buttons.

Added: trunk/plugins/chattoolbar/AUTHORS
===================================================================
--- trunk/plugins/chattoolbar/AUTHORS	                        (rev 0)
+++ trunk/plugins/chattoolbar/AUTHORS	2011-01-03 18:35:01 UTC (rev 452)
@@ -0,0 +1,3 @@
+Written by Renji.
+email: webrenji at gmail.com
+xmpp: rejjin at jabber.dk
\ No newline at end of file

Added: trunk/plugins/chattoolbar/README
===================================================================
--- trunk/plugins/chattoolbar/README	                        (rev 0)
+++ trunk/plugins/chattoolbar/README	2011-01-03 18:35:01 UTC (rev 452)
@@ -0,0 +1,32 @@
+"ChatToolBar" plugin for Tkabber.
+
+[INTRO]
+If you activate the plugin, then the conversation 
+window bar appears, which contains buttons for 
+quick and convenient access to commands. Buttons 
+can be sorted as you like. You can disable some buttons.
+
+[OPTIONS]
+The plugin can be configured through the standard menu 
+plugin. To do this you need to go to the menu "Tkabber",
+choose "Settings", then "Plugins" and "ChatToolbar".
+
+] user_variable(toolbar_button) - add a button to quickly 
+	mutations both position and status on main toolbar.
+] user_variable(chat_active) - using in chat-windows.
+] user_variable(groupchat_active) - using in groupchats.
+] user_variable(auto_show) - automatically display the toolbar 
+	when you open a new window.
+] user_variable(spacing) - Distance between the buttons in toolbar.
+
+[BUTTONS]
+For mutations both sort keys to enter the window settings 
+ChatToolBar. To do this, open the system menu "Services", 
+then "ChatToolbar options". A new window opens, where you 
+see all the buttons, plug-in. Up and down arrows you can move 
+the buttons of others. Unchecking one of the buttons it is 
+deactivated. Just below you can see an example of mutations both. 
+In the same window, added ability to mutations both the distance 
+between the buttons. After making all the mutations both click 
+the "Apply" (if you have many windows open, it may take some time), 
+now the mutations both introduced.
\ No newline at end of file

Added: trunk/plugins/chattoolbar/TODO
===================================================================
Modified: trunk/plugins/chattoolbar/chattoolbar.tcl
===================================================================
--- trunk/plugins/chattoolbar/chattoolbar.tcl	2011-01-01 20:33:43 UTC (rev 451)
+++ trunk/plugins/chattoolbar/chattoolbar.tcl	2011-01-03 18:35:01 UTC (rev 452)
@@ -1,330 +1,390 @@
+# Chattoolbar - plugin for Tkabber.
+# Written by Renji <webrenji at gmail.com>
+# See README for details.
+
+package require msgcat
+package require Img
+
+event add <<ChattoolbarState>> <Control-b> <Control-B> <Control-Egrave> <Control-egrave>
+
 namespace eval chattoolbar {
+variable user_variable
+variable stored_variable
+variable iconTable
 
-	package require msgcat
 	::msgcat::mcload [file join [file dirname [info script]] msgs]
+	source [file join [file dirname [info script]] icon-table.tcl]
 	
-	variable options
 	custom::defgroup Plugins [::msgcat::mc "Plugins options."] -group Tkabber	
-    custom::defgroup ChatToolbar [::msgcat::mc "Chat Toolbar options"] -group Plugins	
-	custom::defvar options(add_toolbar_button) 1 [::msgcat::mc "Create button on toolbar"] -group ChatToolbar -type boolean
+	custom::defgroup ChatToolbar [::msgcat::mc "ChatToolbar options."] -group Plugins	
 	
-	trace add variable [namespace current]::options(using_for_groupchat) write [namespace current]::reload
-	trace add variable [namespace current]::options(using_for_chat) write [namespace current]::reload
+	custom::defvar user_variable(toolbar_button) 1 \
+		[::msgcat::mc "Create button on toolbar."] \
+		-group ChatToolbar -type boolean \
+		-command [namespace current]::state_toolbar_button
+	custom::defvar user_variable(chat_active) 1 \
+		[::msgcat::mc "Enable for chats."] \
+		-group ChatToolbar -type boolean \
+		-command [namespace current]::redraw_all_chats
+	custom::defvar user_variable(groupchat_active) 1 \
+		[::msgcat::mc "Enable for groupchats."] \
+		-group ChatToolbar -type boolean \
+		-command [namespace current]::redraw_all_chats
+	custom::defvar user_variable(auto_show) 1 \
+		[::msgcat::mc "Automatically open the toolbar at the entrance to the room."] \
+		-group ChatToolbar -type boolean 
+	custom::defvar user_variable(spacing) 1 \
+		[::msgcat::mc "Distance between the buttons."] \
+		-group ChatToolbar -type integer \
+		-command [namespace current]::redraw_all_chats
+	
+	custom::defvar stored_variable(activate_chats) {} {} \
+	-group Hidden -type string 
+	custom::defvar stored_variable(sort_index) {} {} \
+	-group Hidden -type string 
+	custom::defvar stored_variable(button_state) {} {} \
+	-group Hidden -type string 
+	custom::defvar stored_variable(toolbar_btn_index) -1 {} \
+	-group Hidden -type string 	
+	
+	foreach id $iconTable(id_list) {
+	image create photo plugins/chattoolbar/$id \
+		-data $iconTable(icon,$id)
+	}
 
-	image create photo chattoolbar-setting -file [file join [file dirname [info script]] pixmaps chattoolbar-setting.gif]
+	image create photo plugins/chattoolbar/toolbar \
+	-data $iconTable(toolbar)
 	
-	variable script_dir
-	set script_dir [file dirname [info script]]
+	image create photo plugins/chattoolbar/up \
+	-data $iconTable(up_arrow)
+	image create photo plugins/chattoolbar/down \
+	-data $iconTable(down_arrow)
 	
-	hook::add finload_hook [namespace current]::handle 100
-	hook::add open_chat_post_hook [namespace current]::on_join_conference 100
+	hook::add open_chat_post_hook [namespace current]::setup_toolbar
+	hook::add finload_hook [namespace current]::add_toolbar_button
+	hook::add finload_hook [namespace current]::add_services_menu
 }
 
-
-
-proc chattoolbar::handle { } {
-	init_toolbar_and_services_buttons
-	reload
+proc chattoolbar::add_services_menu {} {
+	[.mainframe getmenu services] insert \
+		[::msgcat::mc "Plugins"] \
+		separator
+		
+	[.mainframe getmenu services] insert \
+		[::msgcat::mc "Plugins"] command \
+		-label [::msgcat::mc "ChatToolbar options."] \
+		-command [namespace current]::configure_buttons
 }
+		
+proc chattoolbar::setup_toolbar {chatid type} {
+variable stored_variable
+variable user_variable
+variable iconTable
 
+	if {[chat::is_groupchat $chatid] && !$user_variable(groupchat_active)} {
+	return
+	} elseif {![chat::is_groupchat $chatid] && !$user_variable(chat_active)} {
+	return
+	}
+	set chatwin [chat::chat_win $chatid]
+	
+	catch {destroy [winfo parent $chatwin].toolbar.bbox}
+	catch {destroy [winfo parent $chatwin].toolbar}
+	
+	set toolFrame [frame [winfo parent $chatwin].toolbar]
+	set bbox [ButtonBox $toolFrame.bbox -spacing $user_variable(spacing)]	
+	pack $bbox -side left -padx 1m
 
-
-proc chattoolbar::init_toolbar_and_services_buttons { } {
-	variable options
-	
-	if { $options(add_toolbar_button) } {
-		ifacetk::add_toolbar_button \
-			chattoolbar-setting \
-			[namespace current]::setting \
-			[::msgcat::mc "Chattoolbar setting"]
+	foreach id [get_sorted_ids] {
+		if {[get_button_state $id]} {
+		$bbox add -image plugins/chattoolbar/$id \
+		-highlightthickness 1 \
+		-takefocus 0 -relief link \
+		-bd $::tk_borderwidth -padx 2 \
+		-pady 3 -command [list [namespace current]::button_$id $chatid] \
+		-helptext $iconTable(text,$id) -justify left
+		}
 	}
 	
-	[.mainframe getmenu plugins] add command \
-		-label [::msgcat::mc "Chattoolbar setting"] \
-		-command [namespace current]::setting
+	change_state_toolbar $chatid $toolFrame $user_variable(auto_show)
+	
+	bind $chatwin <<ChattoolbarState>> \
+	[list [namespace current]::change_state_toolbar $chatid $toolFrame]
 }
 
-
-
-proc chattoolbar::on_join_conference { chatid type } {
-	variable options
+proc chattoolbar::change_state_toolbar {chatid toolFrame args} {
+variable stored_variable
 	
-	create_toolbar $chatid
+	set activex [lsearch $stored_variable(activate_chats) $chatid]
 	
-	hook::run chattoolbar_hook $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
+	}
+	
+	pack forget $toolFrame
+	set stored_variable(activate_chats) [lreplace \
+		$stored_variable(activate_chats) $activex $activex]
 }
 
-
+proc chattoolbar::get_sorted_ids {} {
+variable stored_variable
+variable iconTable
 	
-proc chattoolbar::create_toolbar { chatid } {
-	set chatwin_toolbar [get_chattoolbar_frame $chatid]
+	set m [llength $iconTable(id_list)]
+	foreach id $iconTable(id_list) {
+		set idx [lsearch -index 1 $stored_variable(sort_index) $id]
+		if {$idx >= 0} {
+			set ind [lindex $stored_variable(sort_index) $idx 0]
+			set map($ind) [lindex $stored_variable(sort_index) $idx 1]
+		} else { set map([incr m]) $id }
+	}
 	
-	if { [winfo exist $chatwin_toolbar.tools] } {
-		destroy $chatwin_toolbar.tools
+	foreach id [lsort -integer [array names map]] {
+	lappend result $map($id)
 	}
 	
-	set frame_tool [frame $chatwin_toolbar.tools -cursor arrow]
-	set bbox [ButtonBox $frame_tool.bbox -spacing 1 -padx 1 -pady 1]
+	return $result
+}
+
+proc chattoolbar::get_sorted_ids_temp {} {
+variable temp_variable
+variable iconTable
 	
-	pack $chatwin_toolbar.tools -side bottom -fill both -pady 2
-	pack $bbox -side left
-}	
+	set m [llength $iconTable(id_list)]
+	foreach id $iconTable(id_list) {
+		set idx [lsearch -index 1 $temp_variable(sort_index) $id]
+		if {$idx >= 0} {
+			set ind [lindex $temp_variable(sort_index) $idx 0]
+			set map($ind) [lindex $temp_variable(sort_index) $idx 1]
+		} else { set map([incr m]) $id }
+	}
 	
+	foreach id [lsort -integer [array names map]] {
+	lappend result $map($id)
+	}
 	
-	
-proc chattoolbar::get_chattoolbar_box chatid {
-	set chatwin [get_chattoolbar_frame $chatid]
-	return $chatwin.tools.bbox
+	return $result
 }
 
+proc chattoolbar::get_button_state {id} {
+variable stored_variable
 
+	set idx [lsearch -index 1 $stored_variable(button_state) $id]
+	if {$idx >= 0} {
+		return [lindex $stored_variable(button_state) $idx 0]
+	} else {return 1}
+}
 
-proc chattoolbar::get_chattoolbar_box_frame chatid {
-	set chatwin [get_chattoolbar_frame $chatid]
-	return $chatwin.tools
+proc chattoolbar::state_toolbar_button {args} {
+variable user_variable 
+	
+	switch -- $user_variable(toolbar_button) {
+		1 add_toolbar_button 
+		0 delete_toolbar_button
+	}
 }
 
+proc chattoolbar::add_toolbar_button {} {
+variable stored_variable
 
+	catch {.mainframe gettoolbar 0} toolbar
+	set bbox $toolbar.bbox
+	
+	if {[winfo exist $toolbar.bbox] && ![ButtonBox::exist $toolbar.bbox $stored_variable(toolbar_btn_index)]} {
+		set stored_variable(toolbar_btn_index) [ifacetk::add_toolbar_button \
+			plugins/chattoolbar/toolbar \
+			[namespace current]::configure_buttons \
+			[::msgcat::mc "Configure ChatToolBar"]]
+	}
+}
 
-proc chattoolbar::get_chattoolbar_frame chatid {
-	set chatwin [chat::winid $chatid]
-	return $chatwin.pw0.f0.frame
-}
+proc chattoolbar::delete_toolbar_button {} {
+variable stored_variable
 	
+	catch {.mainframe gettoolbar 0} toolbar
+	set bbox $toolbar.bbox
 	
+	if {[winfo exist $toolbar.bbox] && \
+		[ButtonBox::exist $toolbar.bbox $stored_variable(toolbar_btn_index)]} {
+			ButtonBox::delete $toolbar.bbox $stored_variable(toolbar_btn_index)
+			set toolbar_button(index) -1
+	}
+}
+
+proc ::ButtonBox::exist {path index} {
+    variable $path
+    upvar 0  $path data
 	
-proc chattoolbar::destroy_chattoolbar chatid {
-	destroy [get_chattoolbar_box_frame $chatid]
+	return [expr {[lsearch -exact $data(buttons) $index] > 0}]	
 }
 
+proc ::ButtonBox::delete { path idx } {
+    variable $path
+    upvar 0  $path data
 
+    set i [lsearch -exact $data(buttons) $idx]
+    set data(buttons) [lreplace $data(buttons) $i $i]
+    destroy $path.b$idx
+}
 
-proc chattoolbar::setting { } {
-	variable options
-	
+proc chattoolbar::configure_buttons {} {
+variable state
+variable stored_variable
+variable temp_variable
+variable iconTable
+variable spacing
+variable user_variable
+
 	set w .chattoolbar_manager
 	
-	if { [winfo exists $w] } {
-		return
+	if {[winfo exists $w]} return
+	
+	set temp_variable(sort_index) $stored_variable(sort_index)
+	set spacing $user_variable(spacing)
+	foreach id $iconTable(id_list) {
+	set state($id) [get_button_state $id]
 	}
 	
 	add_win $w -title [::msgcat::mc "Chattoolbar manager"] \
 	    -tabtitle [::msgcat::mc "Chattoolbar setting"] \
-	    -raisecmd [list focus $w]
+		-raisecmd [list focus $w]
 	
 	set scw [ScrolledWindow $w.sw]
+	
 	set text [text $w.buttonlist -wrap word \
 		-background [$w cget -background] \
 		-cursor arrow]
 		
-	$scw setwidget $text
-		
-	set btn [button $w.apply \
-			-text [::msgcat::mc "Apply changes"] \
-			-command [namespace current]::apply_changes] 	
+	set apply [button $w.apply \
+		-text [::msgcat::mc "Apply"] \
+		-command [namespace current]::apply]
 	
-	foreach button [get_chattoolbar_buttons] {
-		 set check [checkbutton $text.check_$button \
-			-text $options(buttons,$button,text) \
-			-variable [namespace current]::options(buttons,$button,enabled)]
-			
-		set image [label $text.image_$button -image $options(buttons,$button,image)]
-			
-		$text window create end -window $image
-		$text insert end "\n "
-		$text window create end -window $check
-		$text insert end "\n\n"
-		
-		bindscroll $check $text
-	}
+	$scw setwidget $text	
 	
+	redraw_buttons_on_manager
+	
 	pack $scw -expand 1 -fill both
-	pack $btn -anchor se -pady 5 -padx 4
-	
+	pack $apply -anchor se -pady 5 -padx 4
 	$text configure -state disabled
 }
 
+proc chattoolbar::apply {} {
+variable stored_variable
+variable temp_variable
+variable state
+variable spacing
+variable user_variable
 
-
-proc chattoolbar::apply_changes { } {
-	save_buttons
-	reload
-} 
-
-
-
-proc chattoolbar::add_chattoolbar_buttons { name } {
-	variable options 
+	set stored_variable(sort_index) $temp_variable(sort_index)
+	set user_variable(spacing) $spacing
 	
-	if { [lsearch -exact [get_chattoolbar_buttons] $name] == -1 } {
-		lappend options(chattoolbar_buttons) $name
+	foreach ob [array names state] {
+		set idx [lsearch -index 1 $stored_variable(button_state) $ob]
+		if {$idx >= 0} {
+		set stored_variable(button_state) [lreplace $stored_variable(button_state) \
+			$idx $idx [list $state($ob) $ob]]
+		} else {lappend stored_variable(button_state) [list $state($ob) $ob]}
 	}
+	
+	redraw_all_chats
 }
 
+proc chattoolbar::redraw_buttons_on_manager { } {
+variable iconTable
+variable state
+variable spacing
+variable user_variable
 
+	set text .chattoolbar_manager.buttonlist
 
-proc chattoolbar::get_chattoolbar_buttons { } {
-	variable options 
-	
-	if { [info exist options(chattoolbar_buttons)] } {
-		return $options(chattoolbar_buttons)
-	}
-}
+	$text configure -state normal
+	$text delete 1.0 end
 
-
-
-proc chattoolbar::is_chattoolbar_button { name } {
-	variable options 
-	
-	if { [info exist options(chattoolbar_buttons)] } {
-		if { [lsearch -exact [get_chattoolbar_buttons] $name] >= 0 } {
-			return 1
+	ButtonBox $text.bbox -spacing $spacing
+	label $text.spacing_text -text [::msgcat::mc "Spacing between buttons"]
+	spinbox $text.spacing -from 0 -to 10 -width 5 \
+		-textvariable [namespace current]::spacing \
+		-command [namespace current]::redraw_buttons_on_manager \
+		-validate key \
+		-vcmd {string is integer %P} 
+		
+	normalize_sort_temp
+	foreach id [get_sorted_ids_temp] {
+		set check [checkbutton $text.check_$id \
+			-image plugins/chattoolbar/$id \
+			-variable [namespace current]::state($id)]
+		
+		button $text.check_${id}_up -image plugins/chattoolbar/up \
+			-command [list [namespace current]::button_move - $id] \
+			-relief flat -background [.chattoolbar_manager cget -background]
+			
+		button $text.check_${id}_down -image plugins/chattoolbar/down \
+			-command [list [namespace current]::button_move + $id] \
+			-relief flat -background [.chattoolbar_manager cget -background]
+		
+		$text window create end -window $text.check_${id}_up
+		$text window create end -window $text.check_${id}_down
+		$text window create end -window $check
+		$text insert end \t$iconTable(text,$id)\n
+		
+		if {$state($id)} {
+		$text.bbox add -image plugins/chattoolbar/$id \
+			-highlightthickness 1 \
+			-takefocus 0 -relief link \
+			-bd $::tk_borderwidth -padx 2 \
+			-pady 3 \
+			-helptext $iconTable(text,$id) \
+			-justify left
 		}
+		
+		bindscroll $check $text
 	}
-	return 0
-}
-
-
-
-proc chattoolbar::add_button { name chatid icon command helptext } {
-	variable options
 	
-	if { $options(buttons,$name,enabled) } {
-		set bbox [get_chattoolbar_box $chatid]
-		$bbox add -image $icon \
-			  -highlightthickness 0 \
-			  -takefocus 0 \
-			  -relief link \
-			  -bd $::tk_borderwidth \
-			  -padx 2 \
-			  -pady 3 \
-			  -command $command \
-			  -helptext $helptext \
-			  -justify left
-		return [$bbox index end]
-	}
-}	
+	$text insert end \n\n
+	$text window create end -window $text.bbox
+	$text insert end \n
+	$text window create end -window $text.spacing_text
+	$text window create end -window $text.spacing
 	
-proc chattoolbar::register { name text image command { state 1 } } {
-	variable options
-	
-	if { [is_chattoolbar_button $name] == 0 } {
-		set options(buttons,$name,text) $text
-		set options(buttons,$name,image) $image
-		set options(buttons,$name,command) $command
-		set options(buttons,$name,enabled) $state
-		
-		add_chattoolbar_buttons $name
-		create_proc_hook $name
-		hook::add chattoolbar_hook [namespace current]::$name
-	}
 }
-	
-proc chattoolbar::reload { args } {
-	foreach chatid $chat::chats(opened) {
-		destroy_chattoolbar $chatid
-		on_join_conference $chatid {}
-	}
-}
 
-
-
-proc chattoolbar::save_buttons { } {
-	variable script_dir
-	variable options
-
-	if { [info exist options(chattoolbar_buttons)] == 0 } {
-		set options(chattoolbar_buttons) {}
-	}
+proc chattoolbar::button_move {to id} {
+variable temp_variable
+		
+	set blen [llength $temp_variable(sort_index)]
 	
-	foreach name $options(chattoolbar_buttons) {
-		lappend stored_chattoolbar_buttons_list \
-			$name [list \
-				$options(buttons,$name,text) \
-				$options(buttons,$name,image) \
-				$options(buttons,$name,enabled) \
-				$options(buttons,$name,command)]
-	}
+	set idx [lsearch -index 1 $temp_variable(sort_index) $id]
+	set idval [lindex $temp_variable(sort_index) $idx]
+	lassign $idval sind sid
 	
-	set path [file join $script_dir buttons-cache]
-	set cache [open $path w]
-	puts $cache $stored_chattoolbar_buttons_list
-	close $cache
-}
+	set lidx [expr $idx $to 1]
+	set lidval [lindex $temp_variable(sort_index) $lidx]
+	lassign $lidval lsind lsid
 
-proc chattoolbar::load_buttons { } {
-	variable script_dir
-	variable options
+	if {$lidx < 0 || $lidx > [expr {$blen - 1}]} return
 	
-	set path [file join $script_dir buttons-cache]
+	set temp_variable(sort_index) [lreplace $temp_variable(sort_index) \
+		$idx $idx [list $lsind $sid]]
+	set temp_variable(sort_index) [lreplace $temp_variable(sort_index) \
+		$lidx $lidx [list $sind $lsid]]
 	
-	if { [file exist $path] == 0 } {
-		return
-	}
-	
-	set cache [open $path r]
-	gets $cache stored_chattoolbar_buttons_list
-	close $cache
-	
-	foreach { name args } $stored_chattoolbar_buttons_list {
-		set options(buttons,$name,text) [lindex $args 0]
-		set options(buttons,$name,image) [lindex $args 1]
-		set options(buttons,$name,command) [lindex $args 3]
-		set options(buttons,$name,enabled) [lindex $args 2]
-		
-		add_chattoolbar_buttons $name
-		create_proc_hook $name
-		hook::add chattoolbar_hook [namespace current]::$name
-	}
+	redraw_buttons_on_manager
 }
 
-proc chattoolbar::create_proc_hook { name } {
-	variable options
-	eval [format {
-		proc [namespace current]::%s chatid {
-			variable options
-			set name %s
-			[namespace current]::add_button $name \
-				$chatid $options(buttons,$name,image) \
-				$options(buttons,$name,command) \
-				$options(buttons,$name,text)
-		}
-	} $name $name]
+proc chattoolbar::normalize_sort_temp {} {
+variable temp_variable
+	foreach id [get_sorted_ids_temp] {
+	lappend temp_list [list [incr ix] $id]
+	}
+	set temp_variable(sort_index) $temp_list
 }
 
-[namespace current]::chattoolbar::load_buttons
-#########################################################################################
-
-proc chattoolbar::buttons { } {
-	variable script_dir
-	
-	if { [namespace exist ::plugins::tastebin] } {
-		register tastebin {Tastebin - pastebin uploader plugin} \
-			TastebinButton \
-			{::plugins::tastebin::SwitchState} 
+proc chattoolbar::redraw_all_chats {args} {
+	foreach chatid [chat::opened] {
+	setup_toolbar $chatid {}
 	}
-	
-	if { [namespace exist ::plugins::customstatus] } {
-		register customstatus [::msgcat::mc "Presence presets"] \
-			customstatus/chat-write \
-			{plugins::customstatus::post_menu [plugins::customstatus::recreate_menu]}
-	}
-
-	register add-user [::msgcat::mc "Add new user..."] \
-		toolbar/add-user \
-		{message::send_subscribe_dialog ""}
-	
-	register disco [::msgcat::mc "Service Discovery"] \
-		toolbar/disco \
-		{disco::browser::open_win "" ""}
-
-	register join-conference [::msgcat::mc "Join group..."] \
-		toolbar/join-conference \
-		{join_group_dialog ""}	
-		
-	register chattoolbar-setting [::msgcat::mc "Chattoolbar setting"] \
-		chattoolbar-setting \
-		plugins::chattoolbar::setting
-}
-
-hook::add finload_hook [namespace current]::chattoolbar::buttons 100
+}
\ No newline at end of file

Added: trunk/plugins/chattoolbar/icon-table.tcl
===================================================================
--- trunk/plugins/chattoolbar/icon-table.tcl	                        (rev 0)
+++ trunk/plugins/chattoolbar/icon-table.tcl	2011-01-03 18:35:01 UTC (rev 452)
@@ -0,0 +1,244 @@
+# Icons table
+
+variable iconTable
+
+# index of iconTable array.
+
+set iconTable(id_list) [list disco copy paste smile configure_room custom_presence vcard change_nick history join_conference add_user rejoin clear topic]
+
+# REJOIN ID ___________________________
+
+set iconTable(icon,rejoin) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAACH0lEQVR42pSTwUsUUBDGf2/dXXW1cMXEZCvKpQiCIKJLsNilP0G8CCor3oT6Dzx69SilaZ66eO/oQeoUUZbQwT0EdjE1w9335s28DpurUkEODHP6vpn55huXUuK8sfl8Zs5Mn6rGw+x5gJ+Xnnwx03L+0gDbtU16M/nYIpidnU1mxnGqaqtO3klkMPJ9A3RfL2NqpO0PiHhaBKpKqVQCwDl3pqb0keL9h4DD/9xFxZOSIRLJVOYdlXmHqgKw2pgmkXDOtVJVMVUa+1+RowNMAskUEU/m9ATHHVfr02cIYgyYChoDFgMWPcmMEBpkgQSwMTjHRh0e3X1Md+dFlt9Umbiw2CSPgRQjJgGNAZIjmRGl0ZxgoHiZ8uAt7pUftBQfqYyxdDiJcw753VnFk6ROf7FGSpEQTq3wtxipjLH4YwKRgMaIBk9X5x69Pbvk2urI8QT/ilfrL6n2LCPSwKJHxbP/vY1arQ8fcidn/La3A3s7QFOD02DnHCF4LAomHhVh12fBDJFAFnAAQ+/G0/DwMM/fjwMwVVxpeSFKo6lBFDR6nMtiZsQYTowUY2ydsdrz4oyZgvgmWDwmAeeMlJoEmfWZxPpMahFMFVfIZNrO+ECkuUKheIVC7zVyhSKkhGoku7CwkLa2togxsra29scfmBmjN4749PY17R1d5DsK5PLtpGSYKe5/3vlZ9Wq/ahxSlduq8aaZljLZ/KiKP/g1AM5qbQlMGLUUAAAAAElFTkSuQmCC
+}
+
+set iconTable(text,rejoin) [::msgcat::mc "Rejoin room"]
+
+proc button_rejoin {chatid} {
+	set jid [chat::get_jid $chatid]
+	set xlib [chat::get_xlib $chatid]
+
+	if {![chat::is_groupchat $chatid]} {
+		return
+    }
+	
+	if {[catch {get_our_groupchat_nick $chatid} nick]} {
+		set nick [get_group_nick $xlib $jid]
+	}
+	
+	set password ""	
+	if {[info exist ::muc::muc_password($chatid)]} {
+		set password $::muc::muc_password($chatid)
+	}
+	
+	muc::leave_group $chatid ""
+	muc::join_group $xlib $jid $nick $password
+}
+
+# VCARD ID ___________________________
+
+set iconTable(icon,vcard) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAV5JREFUeNrEky9Pw0AYxp+DpQkJHQhS1oSiSZgppprP0BrIpklRq+BDoOqYwHXVzKBQJFUNogM8AjNL2DL6v9zdsobRQTImeM1d7p7nd+977x0pigKrxBpWjJrjOFd0NP/o79ayLDPb7TaWLYUQgl6vZ9bSNEUYhhiNRksBRFEE83JAFEUc8DbJcX3/jjgtcHZcx464/iNAEIQpIEkS0DIQxzHunkP4LxEX3A7GONU2+NzzvApA13Uw7xzgYJeS6aFpDhw2wNdYaJpWATBPCcjznIsbm4C8RfCRAPvbDJpxse/7FYBhGFMAMzLa4DWG80AwnlaAi36Ck6MC6h6gqurCDJi3LKH/hNLMYkKzv3mkpUgxgiAoWzcLRVHm7+DSqM+dMBwO+Ui30Ww2Icvy4jtgrWBk13XLzVarBUmSKml/1ZimydtIOp3O7Cl3bds+tyzrt6f9XdMl//4bPwUYANB+yxQGS9MJAAAAAElFTkSuQmCC
+}
+
+set iconTable(text,vcard) [::msgcat::mc "Vcard info"]
+
+proc button_vcard {chatid} {
+	set xlib [chat::get_xlib $chatid]
+	set jid [chat::get_jid $chatid]
+	::userinfo::open $xlib [::xmpp::jid::stripResource $jid]
+}
+
+
+# ___________________________
+set iconTable(icon,history) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG3SURBVHjapFPBSgJRFD3WLALbjDomiBYWVESLmIqMkSyiTVCbFn1BLfydXNQPFLRuE5IIUhBMrSQhkjAEzanZ5EIdtXffzDgOZBuF49z7zjuHM/fN8/R6PYzyE04vVHqmZFk+Zk/FWs8zXDGkrT7F4OJVVeW8wP6ykiQlD+aB0KTJVn+gvH1DKdRxRv2SBMz63Hy5LCn1ev1ojPXJaDSKoBe4zqjIqCVUPnXEI8BuzBRQTWvE0R7aSxrSCp1OBwSjO47Dbbn/bkYXrnp5WgQIVm/rBMMw0G63ucFNToUoihyLEdFl8PKhQ9dN7G/JpoZpBSo4uhPYSzgJ2gMJqJ4LM8Ow2O9tHTdotVowOsDdvZNgJjSQgHHvVSfBzqbMNdyAilazyV0TG8MThIMih92ThrQ8QZMSsMWHRyfBVMA9g5rmJIivy1zjJLAM1laHn4LfJ3LYva3rD7H7zxf9F+caIuEy94rKV4OTYb8XC+wYV2IB3j+XNBTZMQ7yfQM6y1qthmJRR6Nhbih6vXhic7gNmAaapvF3H+RpTqT1yCfnWbZWsC5P3kqoWJcnZfXpIfySZ9Tr/CvAAFL4JRqBf1s8AAAAAElFTkSuQmCC
+}
+
+set iconTable(text,history) [::msgcat::mc "Chat history"]
+
+proc button_history {chatid} {
+	set jid [chat::get_jid $chatid]
+	logger::show_log [::xmpp::jid::stripResource $jid]
+}
+
+# ___________________________
+set iconTable(icon,configure_room) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAOxSURBVHjaYuzpWcQgLS3OwMDwX5Cdne2EpqaS9L9/f/+/ffvxxbNnryZ+/vx9/u/ff74yMjLAwY8fvxlMTbUYrKz0GAACiOnHj18MDx48Zfj589eXb99+zvv+/TuXpqYij42NgYqJidZkFhbmXqDhrIxAE0CGwDAMAAQAQQC+/wNERFAF9/f4/vHx8/4HBwXF3Nzl7/39/DwbGxUHExMQAAICADTW1t/W+Pj61Pn5/AD7+/sA8vL1ABcXEgAjIxwAAogJaMhyoJmmnz9/Zbh69Q7D06cvJp05c+3khw+fwTbIyUkx8PBwev748YP5169fDN++/2RgY2NjkJISA8sDBBCTjIx4sKys+Mpfv37r/v37l4GDg73a2trQhpeXG+it32BFQG/Ivv/0k/vr1+8Mnz5+YeDl5WTQ0VECywEEEAsbG/M3V1dbRWCgrXjx4s1BZ2ezTHV1BYaPH78CNbIwvHv3geHxs/fPhf7c/OTMu4vhE9AFHF+1gVrDwQYABBDLzZsPH1hZ6Wt5e9tqvX79TktFRZbh/fuPQKl/wMBiZnj9+j3Dl2//xD059+oIM3248o/xDwMbw2d4IAIEELOYmOaf//8ZfDU05BlERAQYvn37xfDv339gYP1lePToBcOHLwwM8px3lCQYj/v+/fXvz/fv/08xcgkxyNoms4KCACAAAEEAvv8DKCg5zdjY3v3q6u86//8ABPb2+ADq6u0A9/f4AAYJEAAD7MYAGeWRABn45Q8AEQdJ8/YG9PLp6cfx6Nj/AQQJ/wKIMTS0lOHLly9ADT+9OTk57Hl5uTS+fv35QkhM0jDMQcBE5tUkBqnf9xhEgNZ942RleMTI++fubebir19/TPr87S8DQACxgPzByMjEwMrKshUYyls/ffrG+Y+R6bvYv73m/y/e3Kak9VGIl50L7F/u/wwMykw/WP7+5+y7cpWNgY2dYRJAADFra1uDE8e/f/8YgF5g+M/I9keC8wNDkOzpp18+//vGxsPmKqHGyszAz87AAKSY//5nEOX6xfSPidnj+WvGlwABxMKAA/xnYGT49ZdpypEzDGy//jP0mLqxMjK8+8HA8OALA+Of/wy6wr8ZHwtyNwIEEE4DwFHEzMAATFt9+44w/Pn5/UefjepfZgYOYOJ9/5uBCZjIuJn+CgEEEF4DYIYAvTZp1xEGhp/P/vc5W7EwM7D/Z3j/koHhyiPmSwABRNAAcHoHWvqPEWjILU6Gey9/1AnxMLDfe89+/e0PphyAAAMA72F4qGAYYSYAAAAASUVORK5CYII=
+}
+
+set iconTable(text,configure_room) [::msgcat::mc "Configure room"]
+
+proc button_configure_room {chatid} {
+	muc::request_config $chatid
+}
+
+# ___________________________
+set iconTable(icon,topic) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUlJREFUeNqMUztOw0AQ3bUXSIPwEQxNSiLRpCMSEqIC03ECJLpwgtg3MAUFVDkCuI9IOiiQ0lIBN1hait28DbNoZO1aGen5M96ZefNmLAXs9PKmstbeGmN2Rdg0UM6axzvmS4Ct9OT8eoJghx0Rtx5wdtA/0p8f72/kk0CqcBmTY+6qRBLUwIC+cxZWgoGllxEoLkLROHNMBZxlOPfjGSRiM1uy5wFnkJBAzkpXCdhrR1PFtjnmxrUw6ej9i2n0RPcCmKKDetY8VClUXUBdT63XSpABV8CQnl3CV/KN9vvDtRAhwXxw2eq5ID2mLoEVSodEnBM0a81VLqDFM/D955fCiO1MxWRnI5WxM1amYtMx8hYPPTNpjVYdBy/YFuahKUrxW6vI6PJ44P/PVb8091UowZhmnrMtLNnCLfliyQ76nsFa/VirKwEGAPl8ceh31ThgAAAAAElFTkSuQmCC
+}
+
+set iconTable(text,topic) [::msgcat::mc "Change subject"]
+
+proc button_topic {chatid} {
+	set in_win [chat::input_win $chatid]
+	set new_subject [$in_win get 1.0 "end-1 chars"]
+	if {[string length $new_subject] == 0} {
+		return
+	}
+	set xlib [chat::get_xlib $chatid]
+    set jid [chat::get_jid $chatid]
+	message::send_msg $xlib $jid -type groupchat \
+		-subject $new_subject
+}
+
+# ___________________________
+set iconTable(icon,clear) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArJJREFUeNqkk11Ik1EYx//Hzc85dc2crulc05k5dDmbmFo5i6ZLiiiEiC5KyIu6iC4CkYrwopsCoW+yiwIJNCPcUDPQojTSyaJUyo9YmSU6v7Z0c+/2dg4uCEIKfOH3PofnPM9z/uec5xCe57GeT3izKgSsBKvDIGR1gtnTDTz26wnMuatzAYpnmEeYECZ/AHU+H2pD/mORApp3j0HHO2kh05IHdTvKDundy6gT/iM5zWLjs+vvXDnJJFhu1Eh/LiPZYNylb3rQYuP8ayuIo/FnqN07Ojp2u+1NNLxTUyivunhQrCWTjx+9sE3MoDYQQDtTEEqJpcRTkmiiIUIUm5eaU6gbrMxWWa0WlJaa0NbhRYlyBPuOnatY4a5a+QA87EyE9HchQiTZHi6KEUWKpeKNyekyiUwR73OtCF0TTpQZotBieQKj0QxrxxJKVWMwHjhh7mi+v0AX6w6hMjrdC3PeDEN5kVytz/HMBxLHe4eFruk5RCkkmB36iopcFyyWJhQXm9E6mIRFxyI4DoQCgSmHOHps/HxPV1+miIdcFBsNWboCAnpX3+3jkKgTwbk9yIxbQuNzOzSafFSevdxYmIYGuo3Pv2+hPVdLlp3OgfNbCrRlIwNDEPICpGSnwT0zD97jR5wyAcezFmCormym8beo/FesZQSsYxbdgFpOHPYh3tn3+l1mfqFOvmlrKiaHHeC8HGIUUsx9nETT04cv9cm41v+FdKdsAN5/ow33+95UCQRKuociLSmhXVaj0RTsCdADUusyME2T27s6e6n/0qwHz1o/EKz5BJRSgt0qmI5kob/t+mH+7qk8/qgOb42bYZKJ/45nClgziSgxFBYSyXw6ObZlSFHNFvo0g3r7D3RR/wrFS/EFx34SLBJGCQ/a0KCPaQwE8VO4oP0Tnqz3Of8SYAAnOhsd7tLKFAAAAABJRU5ErkJggg==
+}
+
+set iconTable(text,clear) [::msgcat::mc "Clear chat window"]
+
+proc button_clear {chatid} {
+	plugins::clear::clear_chat_win $chatid
+}
+
+# ___________________________
+set iconTable(icon,custom_presence) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAflJREFUeNpi/P//PwM6aFkdpQikMoE4HIiZgXg9EE+vCV12DV0tI7oBdUuC5ZiYmB+aqzkxqEjqMDAyMjLcf3mD4fiN3Qx//v7Wa4pZexlZPRO6id+/fc/Uk7NkEOUTZHj8+hzDw1dnGPi5OBmMFO3AcujqWdAFvn7+ksDJzsxw+9lZuNirD08ZhHhlwXJAbhYhAxjuPr3E8J/xD4r4m4+vwXLEuGDBrfu3KgSFuVHEP777ApJbTIwB0+/evFchJMHLwCPACQxEoNjHHwxvnn9m+Pf373SCBpjZW5sBDTn+4ukzy3tXnjGAYklYTPS/qpb6SX4hQVD0XsAajZXz/PiBVLuChHqmvqIlg7SIIlzR////GJ68uc9w6f4Jhocvb4FckduetOkvigt+fP/ebqxul6mjZMDw9uMDhnN3LiFsAUJuTmEGS017BnZmzsxLd08wwGID7IKMbps0RSn1maY6lgxPXl9lwAfkxfQZDp7bw/Ds9YO4GaVHFoNd8P3rt0wVWQ2Gqw+OMBACl+4fYNBSMGC4++AaKFHBDdB9/PYqw5fv7xiIAf//XQPpMYCHATCJfnz86r4QExNR+hk+fPoE1gM3ABiA0x/dfVotLMXDwMjEiFfzv3//Gd49+wLWgxKN9tH8vdAszEnAAaD0PP3g0o9lIA5AgAEA1OPkeDeIXrEAAAAASUVORK5CYII=
+}
+
+set iconTable(text,custom_presence) [::msgcat::mc "Send custom presence"]
+
+proc button_custom_presence {chatid} {
+set jid [chat::get_jid $chatid]
+	set xlib [chat::get_xlib $chatid]
+	
+	if ![chat::is_groupchat $chatid] {
+		return
+    }
+	
+	set m .custom_presence_popup
+	
+    if [winfo exists $m] {
+		destroy $m
+    }
+	
+    set m [menu $m -tearoff 0]
+	
+    $m add command -label [::msgcat::mc "Available"] \
+			-command [list send_custom_presence $xlib $jid available]
+    $m add command -label [::msgcat::mc "Free to chat"] \
+		    -command [list send_custom_presence $xlib $jid chat]
+    $m add command -label [::msgcat::mc "Away"] \
+		    -command [list send_custom_presence $xlib $jid away]
+    $m add command -label [::msgcat::mc "Extended away"] \
+		    -command [list send_custom_presence $xlib $jid xa]
+    $m add command -label [::msgcat::mc "Do not disturb"] \
+		    -command [list send_custom_presence $xlib $jid dnd]
+
+		   
+	tk_popup $m [winfo pointerx .] [winfo pointery .]
+}
+
+# ___________________________
+set iconTable(icon,paste) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAgpJREFUeNp8k7+L1EAUx79JZv21oqhwgoiFIgp6rXuCIIj/gCDYbSFskUOwkrOwWFgx2IiVQRcstpA7tLIRLARBOU44EKwEr7LwcsiBdxE3mZmM7002biaoD94mm/m+z3znzYxnjEE9RqPRI3qEk79xt9udx3/CW7w996fg58EOsr2n0Ov17OBwOMTO9DPamyuVPr4WLbvAZ7fOmV/rH21GUWTSNDVJktjkd/5WjbOWHddTaF0g/foO441POLpnNwaDgTPB2SMZvq/G2DUzC9Y2QyhVoKBUUuPCsW2bzVDSKzXqbwAqVFpDSgXUGvry23l82Dztqg88wKv+WxbFS/2LtheCC7UsIHMXsLxxEtGNOajCgJ2zfUXjBb3ff7oSXr3zBi/uXponADlQigDSAWgCZ1mKteQHcrKeKwNJsBOH92Hhegf3Hr8Pryy8hq9ybdefZ9JJBgYBsCPw0RKcHoTv4cv6FsbZNm52Z1kTCrauFAEaS7AAnwpbHgz8ydeyiWvJlnXCGmcJ9VMps5wAQIt+jC2cQjyaKyA3rLFNZAfsxAGMcytqBZWDKYQ2tQSQxm6jpibZbawF02kFELT2MqYQ/sLurAM+HLxFh453XMCqhO+VjYOYXBxbXNinIILtARXHz58Mw+YJk+2+Bczsb6OY7L+uzkTBk5aN9prXuYozlx/Wr/W/Iv4twAB6XV9giUsGiQAAAABJRU5ErkJggg==
+}
+
+set iconTable(text,paste) [::msgcat::mc "Paste"]
+
+proc button_paste {chatid} {
+	set win [chat::input_win $chatid]
+	event generate $win <<Paste>>
+}
+
+# ___________________________
+set iconTable(icon,copy) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAB3RJTUUH1gIFCQUziNtYHAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAARnQU1BAACxjwv8YQUAAAB1UExURfHv4nN7pXN7rXt7rcbW/87W/73W/73O/7XO/3uErcbn/6XW/5zO/73G/3uEtXuMta3W/4SUxs7n/9bv/4Sczt7v/4SUvef3//////f//+/3/87e/4Sl1nOEtYyl3oyt3oSt3tbn/4y174y15/f39+/395S955vnmCkAAAABdFJOUwBA5thmAAAAjElEQVR42k2M6xqCIBBEQaGUtQyBuCRpab3/I+bCJ3b+zdmZJWSZkUgKi3Pr+onfIibvnAsxls4Ythxe70NYa6f575E2AE+c+RBHFFIphTMfbH50HwC0xWwel2oTvRBCm0wSVwEgFSSSaDnncsgkUVNKe3HDQpcESbNMEa3Ae3c0asYZO52bZhd0pyI/IQgMa2EAg3cAAAAASUVORK5CYII=
+}
+
+set iconTable(text,copy) [::msgcat::mc "Copy"]
+
+proc button_copy {chatid} {
+	set win [chat::input_win $chatid]
+	event generate $win <<Copy>>
+}
+
+# ___________________________
+set iconTable(icon,smile) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAwNJREFUOI1tk99vU2UYxz/ve87p2rVr67DtbFcGCGqIxV+RoOECo9GoV/y4wgWWGBMvtzv8J9RLEyDIjBcqw5AQE5cQTYgzukQSgZlNYGtLRwft2rU9tD3nvO/rBT+C6PfqeZLP8716PoLH0pjfibSjUjgjeRlKj4GFCWpF7VXLiRfn9OO8/ehy+yfQXu0Da/C5KSe+Z5cV2e4gbFS/4getXy/X54qfaa/ydWof5sGNeDBULxCTduzUYPbwwYHkK0LQAePeQ8QQ2KP0W0vGLX36vfZqR0fepPOwoPIjSDvyXXzLxKHQYAqhN8AvgZ271x5UwMmDncVXSZqLn5zVfuNQ7m2MLP0AWnM4PPzaQSc0AP4a2p3n5IlZuo1f6DbmOHF8FuXOo/vL2FSJZif2a8U4gFQKiRWfisTzAv8ORrlUN9Kc+kZzbTXD9VsZvvxWc6uRBuVietcIJ3YIEcpOrpxH2lozaodiLwjTxRgFQvLU2E6mjm3imUIOIWDyWJbc1hF0ewmwEKqJE91R6HdW82LpLHuTqc0XE5ldQAAyhJAOhFIQNACJCGUxQRfEIMZvoToLtNf/Mhvr9X22VggduASdBdzeAInhJNpKIvprIGxAo91FTLAOXoVW0yUa9jFGohXYSlH0PO2jW46w81y9tMDzhTBaPnG/ADAKSze4unCX3LanEdZNPF8FSlGUWnPTbXt/IiPEIi7V3rvMnOmzsrhCp36DTv0GK0vLzMz0WO2+x1C0C1YEt92/ojVlAXBpmvF0Pj89nAoLYru58HOYi+dn0SoAQFoWe99/h7fe6EPnd9ZrPXO7VJp46QjTAuCP0wikc2bzs9sPDCXCyKECrthNebkFQH5LnCjz6M5l2s2eKS/+fc5o/8DLRzEPX3n+JDFhOaczW7ftT49mhBUKI5wkCIHxmii/x53ymqkuXz9nlH/k1Q9p/8sFgN+OI7RhPBSJT8af3FSIxBM2CHrtZrBRq1/x7rY+F4Kv9nz0PzI9mrkvkAbyGMbuU0UB5dc/5j86/wMWOFy7mPTPEgAAAABJRU5ErkJggg==
+}
+
+set iconTable(text,smile) [::msgcat::mc "Choise smile"]
+
+proc button_smile {chatid} {
+	set way ::plugins::emoticons
+	if {[info exist ${way}::options(show_emoticons)] && [set ${way}::options(show_emoticons)] && \
+		[info exist ${way}::options(theme)] && [string length [set ${way}::options(theme)]] > 0} {
+			event generate [chat::input_win $chatid] <<EmoticonsMenu>>
+	} 
+}
+
+# ___________________________
+set iconTable(icon,add_user) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAArBJREFUeNqkk21IU2EUx//P3av3bm7OdL4tMi0VSispx7IGvZB+MAj8EBREfsjQInv5INi3DP1QEBi9WBgkQWGQEaRERIKaX8LUzLSsrDFXNLc5t927u3tv904YpVBCB855ngPn+T3nf3geIkkS/sfUSjhWmhpPZBRREbLTloI2My2s5wQJ/ggV/BhQtfiiYpskirxcgt63c38CknWLiVy/IZ3hb1oYvoAlBBq1FgwkXQrLNbOg/SYj3bG04zhgjSG62IEolCalriowZuUgwvGYmpwCxwsIhaJJudnWSod9SwfHcssBNM3Hk1CQY9NLq7CrqgpB1zjI8z6otVrwWguEmT4UZOoQjZLlgC5NA2Ly1mZ47dtn0/F6JlkjmCw4UF0NFWMBYgu4deWd++JwGTRiCHeXAvqC5QClBsNZv1u7H3jOmAy2tEIHFL3c/E903+/g26e3fpoQzaBE7XIATYWVEZoDbNpxYfuNjK9cLwbv3Qal1UNPGxEua1O7Bt4fStHOvZAgjv0ugSi3mCq69DxHtdRUlpw6UptPemZjmPVGEQsTCCzBWqkHXtdjhDk/5kPzoUDI2/q0ZaRZAVBKcFommk7v8Dc4K1aTh5OAy6OSZdOIhpMgerohRp9gj3Mb6g7Wo8xexCRbpQv2E1mXEoDrxZ3na+1eDLwag38BYOV3EvFLcRfnOrGpsAQCJaAkcy8EwsO+0aEcq08Awkzem+nREXwZnoHk56BLJdCZCZg0Al9wFhpiwP6ik3HNZ3e3Iy+9WNnqE0MULPmHdZFvTiHyI//lo6GazGy9SZQ0yoAQi/gw7h7EiLsfjXvvoPXZUehV8afLJob4N5O1NufkmpocxeVYl7EZHzzDGBzth+tz4PLQVfc5spLfKENa5aVOdqPsQdmvyYcbV9TBv+yXAAMAvmshRLn6akUAAAAASUVORK5CYII=
+}
+
+set iconTable(text,add_user) [::msgcat::mc "Add new user..."]
+
+proc button_add_user {chatid} {
+	eval [list message::send_subscribe_dialog {}]
+}
+
+# ___________________________
+set iconTable(icon,change_nick) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABF1BMVEX////ap0nami/QlCjGhyLv75bkyG/QjSjQmkLv6Hzv4pbaoTzGgDzv21Xv4mnv4omdZhzGgCjv4lzv20/ktE+nZhzGlDzv20namjydZiLv6ILarknQoUnGjS/7yJ7y0LLy0KjqyKjqyJ7qt3/qrnXZrn/Qt57QrpPQnWvQeyPInXXIeyPIcy3IcyPAv7y3t7Kmpqimpp6mc0Kee1aec0yeakKWlZOWYi2WWSONjImNYjiNWS2FhImFhH+FUSOFSA98e398e3V8USN8SCN8SBl8QA90c3V0UTh0SC10QA9ramtrYmBrQBljWVZjUUxjNw9bYmBbWWBbWVZbQBlbNxlSWVZSUVZSNw9KUUxKSExKSEI5QDg5NzilcsfAAAAAAXRSTlMAQObYZgAAALlJREFUGJVjYMAKfF1dPf39EHxvZ3N7c89gX7iAu4WnnaedTzhcwN/DxMrfKQQh4KKmpKSlqu4CF7BWVFRQUFQ0hwtEm8rJyysYxUC5jEzMZkHGxpFmEZFgPgsrG7tZkIFBmE0AWICDk4uTlTtIXy80MsghACjAw8vHx88UGBkZFhDgpazLwCAgKCQsJMLsFeHmZRumrANUIiooJs4rwRRmaxsZpakBsUdSTEo6KioqBu4OBkkZWRgTAKgwHTUVe3Y/AAAAAElFTkSuQmCC
+}
+
+set iconTable(text,change_nick) [::msgcat::mc "Change nick"]
+
+proc button_change_nick {chatid} {
+	if {![chat::is_groupchat $chatid]} {
+		return
+	}
+	
+	set iw [chat::input_win $chatid]
+	set nick [$iw get 1.0 "end-1 chars"]
+	muc::change_nick $chatid $nick
+}
+
+# ___________________________
+set iconTable(icon,disco) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACjUlEQVR4nMWTS2sTYRSGn5nMZCadNJeJ1tqLLWmsloJKa6GCRcGFLqyle7Eg4sJf4NadP0MXLgQX4l4Qu9GNije0WtokdYxJ08nkMvPNTC5urFjr3gNnc3jfh8O5wP8O6e/C2StXY+bY8duhlro2PJge9z2X128+Ui+XKofM+CNdCu6uPr5f2NVH/jQPTUxlJhcuPzk6O7+Sm5tPLcyfpJcexY8YlL6Xjc/v3s1Jemwpk0o+t0vF0j7A3OLKg8GZ85cWzp9hYsTENDRqkTghGvWGoCU8Ko1aWo9q56Jd8cBr1oW8ax6bPn1haHpmeTibZTwd5ZAEXR/MPhlJVUlnTNIDh5GjBhU3nEqMTt4C+A04kDtxPZZIMprWaXfBlaABOKKHaHm0HIe+wQHU7DECWcUnugig7AI6famTOw0X23Z4GUp09DiyLFH6UcMqFPGEwHMcgq0CiBaSkcruAbSaDfVLvogiazhdnYSZQY5INOwa1sYG3dCj30yTKetUu21kRVX2AILv+fVyvT1pWzaxeIpYIomiqgRCIJp1cpNHiGgR1GCMcOcbPa9u7ZmBb1sP5VqZsFkl2a9BKKiVK/gtl6iikEka9PfaSE6VmARK21vds8bAddYGRiaWXdc/eGr2BFNTOQzDQIqoKKpGrbJN/tN7Wj8KGJrqlNde3fDdZvU3oNPptKW2+8IcGl9qOk68X1c4fDCB6/k49ja2tYFtbZKM68IpfLhZKa4/23dIolUv9bzaWlSPzXbanUx+I49V2EQ4FeTQRZeCkr359o719cM9oPevX0gCR2RZnjkwkr2oJQdyUkQxZHq+37CL1a2vTwNfvAQ2gTLQ2/dMv7rSf2UfoAIdwAU8wAfCXfFPffsXfMRKZIsAAAAASUVORK5CYII=
+}
+
+set iconTable(text,disco) [::msgcat::mc "Disco"]
+
+proc button_disco {chatid} {
+	eval [list join_group_dialog {}]
+}
+# ___________________________
+set iconTable(icon,join_conference) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAALcSURBVDjLjZJpSNNxHMb/VhTUi3pjVFoyj+wyPDG1sDUTE7ES1zCPuXRbZjZrSk63qVPzKNuc+ncmHmPOeU3nkYkEmnjhlVdaBPoiddGbMDEoj6clZEYlvnhe/fh8+P4eHgIAsVWE/kdY4wVWC7NqE0yXUZZLeebFvs7mu3+9bwnzvE1pMyrK6lzFYWxOYaSFbFuCYqaxfK7OEfOtbHzty8a81g1zmqOYKLD4vC0B6b8/Wz/SioVuEssjSiz2kJh93YL2FLuZbQn8vG9wJssfrH0ZrcXqVB2WJnTQd8ghCbmo/aeAQ7Vi5bMuLciDqSBDacsRDJtB+cPI73otHx8akqFvFKFLcRdn2adbnGLP7PtDwHSzpOWzPFZlgVRsTomUh9zCVGTmiZD4JBYNb8qR1i6Bjdi6zJZ/fO+GQMqw73oWcQ11SWGYrBBCzadDHkyDguuB0hEhotSuYJfaIX0gGjVvixGti4JLhBO5IchjWNS8b9f8VZgmngrpcBzClY5IbroJhuIE4nq5YJGhmCZ9/18YT30B91TnwFU6gFVsC2E9HdUDOYipuYrL0kMIkDIwX+TzW7DDIUeQJ4jaKCxS5QzdMAntUN46WDkgg+xlDJS9Wbit9oRT+p61riIf9jps5FYZ7scfWuz4CDyq1kJUokGY4b8/4adtPGS2RiKthYOkJhYkz7lQdKYgqOw8rBKJFYLiraDTec1LjVOrSJ0E2P1ASAcQWHQSVf0yqA0LVPZkoaQ7wyC5g4JOCThqL1BExCcTAWFLjKU6rgzW5oJfrwezFWDq1hCoWcP1AnNcyTEFTXoQbo8PIKTUFeSrJNxSecJMROgPC4hT6zuYyXGfr027jwBxHzhtAOuF4QIdENwIBDUDjIxpiPnpsE/dBaaSBrMEYtYAW28s8Z2K69Ii8Yt3ppfrHKMHQBWPGTIOqnAU7vFDsPCqmsmNCU+yFBt9O5awE8YCgrJ5vT8AXgaV02he+4MAAAAASUVORK5CYII=
+}
+
+set iconTable(text,join_conference) [::msgcat::mc "Join conference"]
+
+proc button_join_conference {chatid} {
+	join_group_dialog ""
+}
+
+
+# Toolbar icon 
+set iconTable(toolbar) {
+iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEQAACxEBf2RfkQAAAAd0SU1FB9ELCQ0KFPeDtBUAAAPpSURBVHjarZZtaFtlFMd/SbM2tdO4ZhWpNe3eqCvYri1MiJR1rU6lzpFhQfSLU9xAhckgK2N2iizqENnqy2C6bnYwB841DOxgXW03lXQljV0ohaotsQ0L2CZp0qZLlyb38YPPLbchffnggYd7uc+5//+55/zPeW4Wy5sAPpTXWSDA/2A6IBsQnR2XxR2PS3zqaBaSJFfur/S+Xi7dUg4PACWA6HN1i/7bt0Rnx2WVJGcZEp30OQ0Uy4AysucAjwDlgLjr/1v0ubpVgjLpkxFcCCHsdvsQcA4o1Kc5rAFSQDMQByLl5eWsyy/QAtUDWRnAFSEEHo8Hq9VaBuwDHtISrAHuD3rdFBU9NgdMA2NfftFCIjFHdCrEkaZDXcBTgCEtTTqA0dFR/H4/NpsNwAooWqe1wLcX286+Ulq6BQDLhs3kGvPo/e3GgtOuhkYAExADFDX6UCiE2WxW3Z4GosBkOsEzwMm21tMlJSUW8vIeJKWkyM8vQFEUxnx/MnBnkKajHyELmAAmk8mkzmAwrAO2yxTPAlOSZMGyZWEbgW9kQdUVnPgnIGZjM8L1S6c44Ti2sNff36/eV0kBFMovzE5Xm15GVQBskgqqkms7ICJTYRGLzQh3700BCKfTqYJXA1tlgMblekAvmfOAhwEzsB4oUiUbDE6mgwvgReDRFXpkkSK03WiQjVcIbNOCH3jrdfHy3t0qydYM8l1V2yvaB06nE5vNRtPhw+iz9KzNzSY2E+WTz1pUafZp39GtBG4/1U5F2UaCwTDvvVqn7h0Azpw/f45ii4VEPMrAwABHmo8D7AE6pJqWBRf2U+1i0DchLrR3idZrv4s3j36tpuN5mXcxPj4uwuGQcPfe1Kprn5qupWaKcvzsNd7Yu4PO6ze45fkD9AZSyaTqEwZGgUqLxYIQgifKtlG7s5YTjmPIOXQQMOgzgZ+58iuvNVj54WoX7iEf1poahodHmE/MqX4JIAJMABVm83oUdGwpfRLLhlIOHXwb4HPg/fRhp7T9dJvGXdVc+PE6Pn+AZxteYnh4hMDYX1w82aSOgThwT3brBFBhMpmIRKJ4vV5GfH6cTifABwYNgdLyfTd7aiu4dLUHnz9ATV19Ovh+YEZGHweSkgSgYuOmzd6e7p+pqq4mlfovnVoCikseJ6UIJu76MoF/DLhl/qeBeVnQhJZkZ129VwO5fxFBV4+L0HQlO57bjXdoEfh3wBUJHgXuS3DSSNQDKUcGMKXtg1qg511HGwDxezFaHe+o4F8BIUkwu4TG1QPLKDOTksQLZgReSJuidqBSns+mDAfNqv4gtIPOKIHUcTsvixqVRU1pUrMq+xfAW6lLERWofAAAAABJRU5ErkJggg==
+}
+
+set iconTable(up_arrow) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAK3RFWHRDcmVhdGlvbiBUaW1lAE1vIDE3IEZlYiAyMDAzIDE4OjE4OjUwICswMTAwG42xAwAAAAd0SU1FB9MCEREsEYR+JaAAAAAJcEhZcwAACvAAAArwAUKsNJgAAAAEZ0FNQQAAsY8L/GEFAAABnklEQVR42s1STStEURh+rhlzy0emxtdiJDSiNBYWymKyYuQjG2vZ2EwhZWnhX1hQFrIgUVNYKQtSppQog0Qz3Xxd11wzY+6558NBo2QUSnlP71mc8z7P+7zPOcCfxqg2iNDlyC/BiWDX9A3pn72jCOkDPwOHzJaGqXNzJy7EzL4QvsmTJwxfB3KVKp9OhvS6Ure2vTTWVLEZTSNlCahOBTPrp8btfUkA8zWHXxMM3ZWpamx7Zdzv273IQE8SEJuDQcjlwOLGcSwlytswVxfPQvLewX0Xha78y/DyeLPvXLdxlSBIW1QqoDBTNh6SaXS0+6pcRFtD8Mj9UUHvgROeh1Wvu7BbdSjwVhTDX+/BlSEVMA5CCKKRPRhWAXieisQj3UJRdSfmGy3nK0HYT+Xek9XlmoiI2tZKnGhpMAEweWtmFBgL3Z88c+ZylnMB02JIyuScgzImU8lVmpvAtpns+Da/xMOWBPxFxrcJiOz+RF9NlFhQTqUP7PsEXDDEU4Aln44IASKbM/6DEbQzzbyJ6Q5BLIWxzMtH4EJOg38ZzxLi1sSCzjP4AAAAAElFTkSuQmCC
+}
+
+set iconTable(down_arrow) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAK3RFWHRDcmVhdGlvbiBUaW1lAE1vIDE3IEZlYiAyMDAzIDE5OjA3OjAzICswMTAwj5b4MgAAAAd0SU1FB9MCERINCoDCR/YAAAAJcEhZcwAACvAAAArwAUKsNJgAAAAEZ0FNQQAAsY8L/GEFAAAB2UlEQVR42sVSTWgTQRh9O7Ozu9ndkJaUgBWz/hyCICJ481Lw1FL8A6nQQz36d/HmyaN468VTQfEgIgitiD0IRSylFUSkVmgsVqXWDS0Ymy5pYprdmXEiFtsyB3PywTDw8d7jfW8G+N8wtNOTj+u2w8wk5iAGF8Kggm/UJWaGvN1UU6fff7g7NXTuCN5+2cBqlCBcr6E8+x5cw9UamCrX8vefKIY1QEowKWBS/LuBxRg6HIaMY0IoccwF1ijRbqtPwChch8JXh4MibgpYKlZdw/1je5vg/GcPvXO/SzIIgWsSeCqBb5lwbQpjq+5T4x4uTCreMPlrMHiGwSo9Cwqb1WM33ohCPoOUZcC3TXW3zAxkcx3oHBwX6RSq2Gw8Qc8BuvMZL5UyaVmaunnx+FEqY5SjBlaiGE0uEScS3CBYCz9g+l1jNqkEPXhRqG5bQWFkb1St7eu/9WDuWyIIVO/wUwxpx0LaZRDlj3hV5EuJLPRviXcatPBwTxgl+b47Txcr3V0uOj0bGd8GqSziZVH+aNoH+zAarGhK3Ia7XfNhlD17b+JrI59zQNc/4fk8r0f00GncDxZ20/VfuYWr5YET2YVHnNjy9WowgJHcGNrG5eXruLJ0rX1hG/gFsY6kWq0OsmEAAAAASUVORK5CYII=
+}
\ No newline at end of file

Added: trunk/plugins/chattoolbar/msgs/ru.msg
===================================================================
--- trunk/plugins/chattoolbar/msgs/ru.msg	                        (rev 0)
+++ trunk/plugins/chattoolbar/msgs/ru.msg	2011-01-03 18:35:01 UTC (rev 452)
@@ -0,0 +1,29 @@
+::msgcat::mcset ru "ChatToolbar options." "Настройки для ChatToolbar"
+::msgcat::mcset ru "Create button on toolbar." "Создать кнопку для быстрых настроек на панеле."
+::msgcat::mcset ru "Enable for chats." "Активировать для приватных разговоров."
+::msgcat::mcset ru "Enable for groupchats." "Активировать для конференций."
+::msgcat::mcset ru "Automatically open the toolbar at the entrance to the room." "Автоматически открывать панель при входе в комнату."
+::msgcat::mcset ru "Distance between the buttons." "Расстояние между иконками."
+::msgcat::mcset ru "Whether the ChatToolbar plugin is loaded." "Определяет, загружен ли плагин ChatToolbar"
+::msgcat::mcset ru "Chattoolbar manager" "Настройки для ChatToolbar"
+::msgcat::mcset ru "Chattoolbar setting" "Настройки для ChatToolbar"
+::msgcat::mcset ru "Apply" "Применить"
+::msgcat::mcset ru "Rejoin room" "Перезайти"
+::msgcat::mcset ru "Vcard info" "Показать информацию о пользователе"
+::msgcat::mcset ru "Chat history" "История сообщений"
+::msgcat::mcset ru "Configure room" "Конфигурировать комнату"
+::msgcat::mcset ru "Change subject" "Сменить тему"
+::msgcat::mcset ru "Clear chat window" "Очистить окно разговора"
+::msgcat::mcset ru "Send custom presence" "Послать специальное присутствие"
+::msgcat::mcset ru "Available" "Доступен"
+::msgcat::mcset ru "Free to chat" "Свободен для разговора"
+::msgcat::mcset ru "Away" "Отошёл"
+::msgcat::mcset ru "Extended away" "Давно отошёл"
+::msgcat::mcset ru "Do not disturb" "Не беспокоить"
+::msgcat::mcset ru "Paste" "Вставить"
+::msgcat::mcset ru "Copy" "Копировать"
+::msgcat::mcset ru "Choise smile" "Выбрать эмоциконку"
+::msgcat::mcset ru "Add new user..." "Добавить нового пользователя..."
+::msgcat::mcset ru "Change nick" "Сменить псевдоним"
+::msgcat::mcset ru "Disco" "Обзор служб"
+::msgcat::mcset ru "Join conference" "Войти в комнату"



More information about the Tkabber-dev mailing list