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

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Wed Jan 12 02:28:11 MSK 2011


Author: Rejjin
Date: 2011-01-12 02:28:11 +0300 (Wed, 12 Jan 2011)
New Revision: 457

Modified:
   trunk/plugins/chattoolbar/icon-table.tcl
   trunk/plugins/chattoolbar/msgs/ru.msg
Log:
Added buttons:
Notes - editing notes for chatid
Juick - commands for juick at juick.com/Juick

Modified: trunk/plugins/chattoolbar/icon-table.tcl
===================================================================
--- trunk/plugins/chattoolbar/icon-table.tcl	2011-01-10 15:13:12 UTC (rev 456)
+++ trunk/plugins/chattoolbar/icon-table.tcl	2011-01-11 23:28:11 UTC (rev 457)
@@ -4,7 +4,7 @@
 
 # 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]
+set iconTable(id_list) [list disco copy paste smile configure_room custom_presence vcard change_nick history join_conference add_user rejoin clear topic juick_cmds notes]
 
 # REJOIN ID ___________________________
 
@@ -107,11 +107,8 @@
 	set sw [chat::winid $chatid].status.subject
 	$text insert end [$sw get]
 	
-	place $scw -in $w -relwidth 1 -relheight 1 \
-		-x 0 -y 0 -width -1 -height -40
-			
-	place $btn -in $w -relx 1 -rely 1 \
-		-x -5 -y -2 -anchor se
+	pack $scw -expand 1 -fill both
+	pack $btn -anchor se -pady 4 -padx 4
 }
 
 proc button_topic:send_new_subject {chatid text w} {
@@ -143,10 +140,13 @@
 set iconTable(text,custom_presence) [::msgcat::mc "Send custom presence"]
 
 proc button_custom_presence {chatid} {
-	set jid [::xmpp::jid::stripResource \
-		[chat::get_jid $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] {
@@ -274,7 +274,123 @@
 	join_group_dialog ""
 }
 
+# ___________________________
+set iconTable(icon,juick_cmds) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAGtJREFUOMtjYKAl2J/DcGV/DsMOfGpYCJjRwsDA8IFhwMD+HIYT+3MYllHiBXMGBgZxfAqYiHAII6UGMIwawPCfLAP25zAIQJl/SE4H+3MYVjAwMBhDuY/IcQEXAwODHAMDw10GBoZKmiZ3AOklESKhVPrCAAAAAElFTkSuQmCC
+}
 
+set iconTable(text,juick_cmds) [::msgcat::mc "Juick commands"]
+
+proc button_juick_cmds {chatid} {
+	set jid [chat::get_jid $chatid]
+	if {![string equal $jid "juick at juick.com/Juick"]} {
+	return
+	}
+	
+	set m .juick_cmds_popup
+	
+    if [winfo exists $m] {
+	destroy $m
+    }
+	
+    set m [menu $m -tearoff 0]
+	
+	$m add command -label [::msgcat::mc "Show last messages from your feed"] \
+	-command [list [namespace current]::juick_add $chatid {#} 1]
+	$m add command -label [::msgcat::mc "Show last messages from public timeline"] \
+	-command [list [namespace current]::juick_add $chatid {#+} 1]
+	$m add command -label [::msgcat::mc "Show recomendations and popular personal blogs"] \
+	-command [list [namespace current]::juick_add $chatid {@} 1]
+	$m add command -label [::msgcat::mc "Show your tags"] \
+	-command [list [namespace current]::juick_add $chatid {*} 1]
+	$m add command -label [::msgcat::mc "Show last 10 messages with tag"] \
+	-command [list [namespace current]::juick_add $chatid {*tag}]
+	$m add command -label [::msgcat::mc "Show user's info"] \
+	-command [list [namespace current]::juick_add $chatid {@username}]
+	$m add command -label [::msgcat::mc "Show user's info and last 10 messages"] \
+	-command [list [namespace current]::juick_add $chatid {@username+}]
+	$m add command -label [::msgcat::mc "Search posts"] \
+	-command [list [namespace current]::juick_add $chatid {? blah}]
+	$m add command -label [::msgcat::mc "Delete last message"] \
+	-command [list [namespace current]::juick_add $chatid {D L} 1]
+	$m add command -label [::msgcat::mc "Show your subscriptions"] \
+	-command [list [namespace current]::juick_add $chatid {S} 1]
+	$m add command -label [::msgcat::mc "Subscribe to message replies"] \
+	-command [list [namespace current]::juick_add $chatid {S #1234}]
+	$m add command -label [::msgcat::mc "Show your blacklist"] \
+	-command [list [namespace current]::juick_add $chatid {BL} 1]
+	$m add command -label [::msgcat::mc "Show your \"white list\""] \
+	-command [list [namespace current]::juick_add $chatid {WL} 1]
+	$m add command -label [::msgcat::mc "Send invite to jabber user"] \
+	-command [list [namespace current]::juick_add $chatid {INVITE user1 at example.org}]
+	$m add command -label [::msgcat::mc "PING"] \
+	-command [list [namespace current]::juick_add $chatid {PING} 1]
+	$m add command -label [::msgcat::mc "Help"] \
+	-command [list [namespace current]::juick_add $chatid {HELP} 1]
+	
+	tk_popup $m [winfo pointerx .] [winfo pointery .]
+}	
+
+proc juick_add {chatid text {send 0}} {
+	set cw [chat::winid $chatid]
+	set iw [chat::input_win $chatid]
+	$iw delete 1.0 end
+	$iw insert end $text
+	if {$send} {chat::send_message $cw $chatid chat}
+}
+
+# ___________________________
+set iconTable(icon,notes) {
+iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAB3RJTUUH2AQPDSoOH1HwCAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAARnQU1BAACxjwv8YQUAAAMdSURBVHjadVNZaBNRFD2zJBNT00wWJ4uNbRrS1JbQVq0bKq1S1KoIrR+CuEvVYpH+KSh+iCgIin6IKLgggiL1R/yoOyJaV2oXtYrWtqlpjGkz2abJpBNfAm6oFy685dxz77nvPgr/sA0MM9MuCHcohun75vPVnQWi+I/R/zq0GQ23mrZv4+0azZwpRUViq15/+H8E1O+bC6eaKhSFfTx2oUMjTNLSnoQEV00N9p88qZQdalwNJTNI6+XB5p3Xwz9i2N8JJjLUmvqGtVrjhoM4smARynkTvnR2Qm030TOqq26I4THEomFcPrMxIsWjQyq1+u4fBAxLN1ptHsgyBcfc2bh6sx35ZhPe2ByYV7OJIFLEE1nPB8TyY7tXun5KuHZ+a6XJVvyqdulOKguMRaIIfgshQWSI0QQuXbyC5ubN0HBpuN0WpEIPsXdHy68KwqK0fsESL5XN8HXkA4wGK5zFJnIzBmRSmD+nEZDJWpkA0mH0PH8AmsKtHMGulmoVp2bWWR1OAiYvllGhu/spBgeGoNPrwdAqWIVJMPB6CFO05O3i6H3xEhzQniOodhfWe8qcFtJGxMI+CAYJgtWMqllFJGM6p10MiugfGIZgNBNYEP3dn/2H2tCVI0jKyW0VFWWkNBHDvn68/yhlGwpFicNhZVBSrIVeT6OynDRR8WH4bTciEm6T0Ax7+viKAovAL+N0eUTjCDzTLcRjJEtWig6hQAwdL4bQPxjDisUCLFPz8PpxF2gF7bk5kBPjW7xeF4uJBN69+4zXPX7w+Sx4Xg3XNC3MFhVqLQbUpieTUlM54p4nvQrD5SoAm6fTbHV6C8mliNISDqXuguxIYeRLBG/7Ahh5NA5/QMLyhTq4HSykwCgCgVTPsQcI5gg4//1PbQfuOexOD+X2Toe5xEN0KrAa07DyLOKigpA/gpQkk8Hn0fusD2kFd/74C+daYUvGsYzMTIMaqHOXTePshTaMx2OYkJOQomNIR0Jweatx/lxnOinLlUfvo/evz5S1fatgYBmsTsRRO7UUVRyHAsjQJaLIjIoYiAax58RDtP3Afwc+jjWG3FzigwAAAABJRU5ErkJggg==
+}
+
+set iconTable(text,notes) [::msgcat::mc "Edit notes"]
+
+proc button_notes {chatid} {
+	variable notes
+	
+	custom::defvar notes($chatid) {} {} \
+	-type string -group Hidden
+	
+	if {[winfo exist .notes]} return
+	
+	toplevel .notes
+	
+	foreach {option value} [wm attributes .notes] {
+		if {[string equal $option "-topmost"]} {
+		wm attributes .notes -topmost 1
+		}
+	}
+	
+	wm title .notes [::msgcat::mc "Edit notes"]
+	
+	text .notes.win -font $::default_Roster_font \
+		-yscrollcommand [list .notes.scroll set] \
+		-wrap word
+	scrollbar .notes.scroll -orient vertical \
+		-command [list .notes.win yview]
+	button .notes.ok -text [::msgcat::mc "Save"] \
+		-command [list [namespace current]::save_notes $chatid]
+	button .notes.cancel -text [::msgcat::mc "Cancel"] \
+		-command {destroy .notes}
+	
+	pack .notes.win -fill both -expand 1
+	pack .notes.scroll -fill y -side right -in .notes.win
+	
+	pack .notes.cancel .notes.ok -padx 3 \
+	-pady 3 -side right
+	
+	.notes.win insert end $notes($chatid)
+	
+	wm geometry .notes 350x350
+}
+
+proc save_notes {chatid} {
+	variable notes
+	set notes($chatid) [.notes.win get 1.0 "end - 1 chars"]
+	destroy .notes
+}
+
 # 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==

Modified: trunk/plugins/chattoolbar/msgs/ru.msg
===================================================================
--- trunk/plugins/chattoolbar/msgs/ru.msg	2011-01-10 15:13:12 UTC (rev 456)
+++ trunk/plugins/chattoolbar/msgs/ru.msg	2011-01-11 23:28:11 UTC (rev 457)
@@ -28,4 +28,24 @@
 ::msgcat::mcset ru "Disco" "Обзор служб"
 ::msgcat::mcset ru "Join conference" "Войти в комнату"
 ::msgcat::mcset ru "%s subject" "%s тема"
-::msgcat::mcset ru "Save subject" "Сохранить тему"
\ No newline at end of file
+::msgcat::mcset ru "Save subject" "Сохранить тему"
+::msgcat::mcset ru "PING" "ПИНГ"
+::msgcat::mcset ru "Show your \"white list\"" "Показать ваш \"белый список\" пользователей"
+::msgcat::mcset ru "Show your blacklist" "Показать ваш \"чёрный список\" пользователей и тегов"
+::msgcat::mcset ru "Subscribe to message replies" "Подписаться на комментарии к этому сообщению"
+::msgcat::mcset ru "Show your subscriptions" "Вывести список всех блогов, на которые вы подписаны"
+::msgcat::mcset ru "Delete last message" "Удалить последнее сообщение"
+::msgcat::mcset ru "Search posts" "Поиск поста"
+::msgcat::mcset ru "Show user's info and last 10 messages" "Показать информацию о пользователе и 10 последних сообщений из его блога"
+::msgcat::mcset ru "Show user's info" "Показать информацию о пользователе"
+::msgcat::mcset ru "Show last 10 messages with tag" "Показать 10 последних сообщений с тегом"
+::msgcat::mcset ru "Show your tags" "Показать список популярных тегов"
+::msgcat::mcset ru "Show recomendations and popular personal blogs" "Показать список популярных персональных блогов"
+::msgcat::mcset ru "Show last messages from public timeline" "Показать последние 10 сообщений из общей ленты"
+::msgcat::mcset ru "Show last messages from your feed" "Показать последние сообщения из вашей личной ленты"
+::msgcat::mcset ru "Help" "Помощь"
+::msgcat::mcset ru "Send invite to jabber user" "Отослать приглашение пользователю Jabber"
+::msgcat::mcset ru "Juick commands" "Команды управления Juick"
+::msgcat::mcset ru "Save" "Сохранить"
+::msgcat::mcset ru "Cancel" "Отмена"
+::msgcat::mcset ru "Edit notes" "Редактировать заметки"
\ No newline at end of file



More information about the Tkabber-dev mailing list