[Tkabber-dev] r273 - in branches/plugins-0.11.1/juick: . msgs

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Jan 28 20:11:15 MSK 2010


Author: Totktonada
Date: 2010-01-28 20:11:15 +0300 (Thu, 28 Jan 2010)
New Revision: 273

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

Modified: branches/plugins-0.11.1/juick/TODO
===================================================================
--- branches/plugins-0.11.1/juick/TODO	2010-01-24 20:51:16 UTC (rev 272)
+++ branches/plugins-0.11.1/juick/TODO	2010-01-28 17:11:15 UTC (rev 273)
@@ -8,4 +8,4 @@
 - Command validation (necessary?)
 + Colored citation
 + Copy nicks/nums/tag to clipboard (Tkabber-way)
-- Open things in browser(s).
++ Open things in browser.

Modified: branches/plugins-0.11.1/juick/juick.tcl
===================================================================
--- branches/plugins-0.11.1/juick/juick.tcl	2010-01-24 20:51:16 UTC (rev 272)
+++ branches/plugins-0.11.1/juick/juick.tcl	2010-01-28 17:11:15 UTC (rev 273)
@@ -65,6 +65,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} {
@@ -72,6 +74,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: branches/plugins-0.11.1/juick/msgs/ru.msg
===================================================================
--- branches/plugins-0.11.1/juick/msgs/ru.msg	2010-01-24 20:51:16 UTC (rev 272)
+++ branches/plugins-0.11.1/juick/msgs/ru.msg	2010-01-28 17:11:15 UTC (rev 273)
@@ -1 +1,2 @@
 ::msgcat::mcset ru "\[J\] Copy thing to clipboard." "\[J\] Скопировать сущность в буфер обмена."
+::msgcat::mcset ru "\[J\] Open thing in browser." "\[J\] Открыть сущность в браузере."



More information about the Tkabber-dev mailing list