[Tkabber-dev] r274 - in trunk/plugins/juick: . msgs

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Jan 28 20:14:06 MSK 2010


Author: Totktonada
Date: 2010-01-28 20:14:06 +0300 (Thu, 28 Jan 2010)
New Revision: 274

Modified:
   trunk/plugins/juick/TODO
   trunk/plugins/juick/juick.tcl
   trunk/plugins/juick/msgs/ru.msg
Log:
Add to menu item for open thing in default browser.

Modified: trunk/plugins/juick/TODO
===================================================================
--- trunk/plugins/juick/TODO	2010-01-28 17:11:15 UTC (rev 273)
+++ trunk/plugins/juick/TODO	2010-01-28 17:14:06 UTC (rev 274)
@@ -9,4 +9,4 @@
 + Colored citation
 + Copy nicks/nums/tag to clipboard (Tkabber-way)
 + Dynamic load/unload.
-- Open things in browser(s).
++ Open things in browser.
\ No newline at end of file

Modified: trunk/plugins/juick/juick.tcl
===================================================================
--- trunk/plugins/juick/juick.tcl	2010-01-28 17:11:15 UTC (rev 273)
+++ trunk/plugins/juick/juick.tcl	2010-01-28 17:14:06 UTC (rev 274)
@@ -90,6 +90,8 @@
     if {$thing == ""} return
     $m add command -label [::msgcat::mc "\[J\] Copy thing to clipboard."] \
           -command [list [namespace current]::copy_thing $chatwin $thing]
+    $m add command -label [::msgcat::mc "\[J\] Open thing in browser."] \
+          -command [list [namespace current]::browse_thing $chatwin $thing]
 }
 
 proc copy_thing {w thing} {
@@ -97,6 +99,17 @@
     clipboard append -displayof $w $thing
 }
 
+proc browse_thing {w thing} {
+    switch -regexp -- $thing {
+        {^[#@]} {
+          browseurl http://juick.com/[string range $thing 1 end]
+          }
+        {^\*} {
+          browseurl http://juick.com/last?tag=[string range $thing 1 end]
+          }
+    }
+}
+
 variable commands {HELP NICK LOGIN S U ON OFF D BL WL PM VCARD PING INVITE}
 proc correct_command {chatid user body type} {
    # Maybe once I'll get arount to it 

Modified: trunk/plugins/juick/msgs/ru.msg
===================================================================
--- trunk/plugins/juick/msgs/ru.msg	2010-01-28 17:11:15 UTC (rev 273)
+++ trunk/plugins/juick/msgs/ru.msg	2010-01-28 17:14:06 UTC (rev 274)
@@ -1,2 +1,3 @@
 ::msgcat::mcset ru "\[J\] Copy thing to clipboard." "\[J\] Скопировать сущность в буфер обмена."
 ::msgcat::mcset ru "Whether the Juick plugin is loaded." "Загружено ли расширение для удобной работы с Juick."
+::msgcat::mcset ru "\[J\] Open thing in browser." "\[J\] Открыть сущность в браузере."
\ No newline at end of file



More information about the Tkabber-dev mailing list