[Tkabber-dev] r1557 - in trunk/tkabber-plugins: . openurl openurl/msgs

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Oct 19 00:14:21 MSD 2008


Author: sergei
Date: 2008-10-19 00:14:21 +0400 (Sun, 19 Oct 2008)
New Revision: 1557

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/openurl/msgs/ru.msg
   trunk/tkabber-plugins/openurl/openurl.tcl
Log:
	* openurl/openurl.tcl: Optionally use flat menu for all browsers.

	* openurl/msgs/ru.msg: Updated Russian translation.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2008-10-18 19:25:17 UTC (rev 1556)
+++ trunk/tkabber-plugins/ChangeLog	2008-10-18 20:14:21 UTC (rev 1557)
@@ -15,6 +15,10 @@
 	* checkers/checkers.tcl, mute/mute.tcl, renju/renju.tcl,
 	  reversi/reversi.tcl: Fixed XML elements creation and IQ query.
 
+	* openurl/openurl.tcl: Optionally use flat menu for all browsers.
+
+	* openurl/msgs/ru.msg: Updated Russian translation.
+
 2008-10-17  Sergei Golovan <sgolovan at nes.ru>
 
 	* *: 0.11.1 is released.

Modified: trunk/tkabber-plugins/openurl/msgs/ru.msg
===================================================================
--- trunk/tkabber-plugins/openurl/msgs/ru.msg	2008-10-18 19:25:17 UTC (rev 1556)
+++ trunk/tkabber-plugins/openurl/msgs/ru.msg	2008-10-18 20:14:21 UTC (rev 1557)
@@ -1,3 +1,4 @@
 # $Id$
 
 ::msgcat::mcset ru "Open URL with" "Открыть URL с помощью"
+::msgcat::mcset ru "Open URL with %s" "Открыть URL с помощью %s"

Modified: trunk/tkabber-plugins/openurl/openurl.tcl
===================================================================
--- trunk/tkabber-plugins/openurl/openurl.tcl	2008-10-18 19:25:17 UTC (rev 1556)
+++ trunk/tkabber-plugins/openurl/openurl.tcl	2008-10-18 20:14:21 UTC (rev 1557)
@@ -19,6 +19,15 @@
 	lynx "Lynx" \
 	links "Links" \
 	elinks "Elinks"]
+
+    custom::defgroup Plugins [::msgcat::mc "Plugins options."] -group Tkabber
+
+    custom::defgroup {Open URL} [::msgcat::mc "Open URL plugin options."] -group Plugins
+
+    custom::defvar options(submenu) 1 \
+	[::msgcat::mc "Checkers figures theme."] \
+	-group {Open URL} \
+	-type boolean
 }
 
 proc openurl::open_url {brname brpath command} {
@@ -69,18 +78,30 @@
 	}
     }
 
-    set mb [menu $m.openurl -tearoff 0]
+    if {$options(submenu)} {
+	set mb [menu $m.openurl -tearoff 0]
 
-    foreach {brname brdesc} $options(browsers) {
-	if {[llength [set e [auto_execok $brname]]] > 0} {
-	    $mb add command \
-		-label $brdesc \
-		-command [list [namespace current]::open_url \
-			       $brname [lindex $e 0] $command]
+	foreach {brname brdesc} $options(browsers) {
+	    if {[llength [set e [auto_execok $brname]]] > 0} {
+		$mb add command \
+		    -label $brdesc \
+		    -command [list [namespace current]::open_url \
+				   $brname [lindex $e 0] $command]
+	    }
 	}
+
+	$m add cascade -label [::msgcat::mc "Open URL with"] -menu $mb
+    } else {
+	foreach {brname brdesc} $options(browsers) {
+	    if {[llength [set e [auto_execok $brname]]] > 0} {
+		$m add command \
+		   -label [::msgcat::mc "Open URL with %s" $brdesc] \
+		   -command [list [namespace current]::open_url \
+				  $brname [lindex $e 0] $command]
+	    }
+	}
+
     }
-
-    $m add cascade -label [::msgcat::mc "Open URL with"] -menu $mb
 }
 
 hook::add chat_win_popup_menu_hook \



More information about the Tkabber-dev mailing list