[Tkabber-dev] r734 - in trunk/tkabber: . ifacetk msgs plugins/general plugins/search

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Sep 29 23:31:11 MSD 2006


Author: sergei
Date: 2006-09-29 23:30:42 +0400 (Fri, 29 Sep 2006)
New Revision: 734

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/chats.tcl
   trunk/tkabber/custom.tcl
   trunk/tkabber/filters.tcl
   trunk/tkabber/ifacetk/iface.tcl
   trunk/tkabber/login.tcl
   trunk/tkabber/msgs/pl.msg
   trunk/tkabber/pixmaps.tcl
   trunk/tkabber/plugins/general/headlines.tcl
   trunk/tkabber/plugins/search/search.tcl
   trunk/tkabber/utils.tcl
Log:
	* custom.tcl: Added new variable type 'options'. GUI for this
	  type is options menu.

	* utils.tcl: Workarounded fixed borderwidth of tk_optionMenu
	  widget.

	* filters.tcl: Use workaround from utils.tcl.

	* ifacetk/iface.tcl, login.tcl, pixmaps.tcl,
	  plugins/general/headlines.tcl, plugins/search/search.tcl:
	  Replaced almost all customizeable radio variables by
	  options variables.

	* chats.tcl: Small fix for URL regexp.

	* msgs/pl.msg: Updated (thanks to Irek Chmielowiec).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/ChangeLog	2006-09-29 19:30:42 UTC (rev 734)
@@ -1,3 +1,22 @@
+2006-09-29  Sergei Golovan  <sgolovan at nes.ru>
+
+	* custom.tcl: Added new variable type 'options'. GUI for this
+	  type is options menu.
+
+	* utils.tcl: Workarounded fixed borderwidth of tk_optionMenu
+	  widget.
+
+	* filters.tcl: Use workaround from utils.tcl.
+
+	* ifacetk/iface.tcl, login.tcl, pixmaps.tcl,
+	  plugins/general/headlines.tcl, plugins/search/search.tcl:
+	  Replaced almost all customizeable radio variables by
+	  options variables.
+
+	* chats.tcl: Small fix for URL regexp.
+
+	* msgs/pl.msg: Updated (thanks to Irek Chmielowiec).
+
 2006-09-26  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/general/sound.tcl: Made sound::play loading sound file

Modified: trunk/tkabber/chats.tcl
===================================================================
--- trunk/tkabber/chats.tcl	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/chats.tcl	2006-09-29 19:30:42 UTC (rev 734)
@@ -45,7 +45,7 @@
 		(
 
 		 (?:
-			(?: ftp|https?)://[-\w]+(\.\w[-\w]*)+
+			(?: ftp|https?)://[-\w]+(\.\w[-\w]*)*
 		   |
 			(?: [a-z0-9][-a-z0-9]* \. )+
 			(?: com

Modified: trunk/tkabber/custom.tcl
===================================================================
--- trunk/tkabber/custom.tcl	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/custom.tcl	2006-09-29 19:30:42 UTC (rev 734)
@@ -343,12 +343,35 @@
 	    trace variable [namespace current]::tmp($varname) w \
 		[list [namespace current]::on_edit $varname]
 	    set tmp($varname) [set $varname]
-	    set e [Spinbox $t.spin$idx -1000000000 1000000000 1 [namespace current]::tmp($varname)]
+	    set e [Spinbox $t.spin$idx -1000000000 1000000000 1 \
+			   [namespace current]::tmp($varname)]
 	    $t window create end -window $e
 	    bindscroll $e $t
 	    $t insert end "\n"
 	}
 
+	options {
+	    catch {unset tmp($varname)}
+	    catch {unset var(temp,$varname)}
+	    trace variable [namespace current]::tmp($varname) w \
+		[list [namespace current]::on_edit $varname]
+	    trace variable [namespace current]::var(temp,$varname) w \
+		[list [namespace current]::on_change $t $varname]
+	    set var(temp,$varname) [set $varname]
+	    set tmp($varname) [set $varname]
+	    set options {}
+	    foreach {val text} $var(values,$varname) {
+		lappend options $text
+	    }
+	    set opt [eval [list OptionMenu $t.opt$idx \
+				[namespace current]::var(temp,$varname)] \
+			  $options]
+	    $t.opt$idx configure -cursor left_ptr
+	    $t window create end -window $t.opt$idx
+	    bindscroll $t.opt$idx $t
+	    $t insert end "\n"
+	}
+
 	list {
 	    if {![info exists var(values,$varname)]} return
 
@@ -494,6 +517,16 @@
 		$w selection set $i
 	    }
 	}
+	options {
+	    foreach {val text} $var(values,$varname) {
+		if {$text == $var(temp,$varname) && \
+			(![info exists tmp($varname)] || \
+			 $tmp($varname) != $val)} {
+		    set tmp($varname) $val
+		    break
+		}
+	    }
+	}
     }
 }
 
@@ -508,6 +541,19 @@
     variable tmp
     variable saved
 
+    switch -- $var(type,$varname) {
+	options {
+	    foreach {val text} $var(values,$varname) {
+		if {$tmp($varname) == $val && \
+			(![info exists var(temp,$varname)] || \
+			 $var(temp,$varname) != $text)} {
+		    set var(temp,$varname) $text
+		    break
+		}
+	    }
+	}
+    }
+
     set is_default [cequal [set $varname] $var(default,$varname)]
     if {[info exists var(config,$varname)]} {
 	set is_config [cequal [set $varname] $var(config,$varname)]

Modified: trunk/tkabber/filters.tcl
===================================================================
--- trunk/tkabber/filters.tcl	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/filters.tcl	2006-09-29 19:30:42 UTC (rev 734)
@@ -304,7 +304,7 @@
     }
 
     # TODO: hiding entry for some tags
-    eval tk_optionMenu $f.mb$n $f.mb$n.var $menu
+    eval [list OptionMenu $f.mb$n $f.mb$n.var] $menu
     global $f.mb$n.var
     set $f.mb$n.var $fromtag($tag)
     entry $f.e$n

Modified: trunk/tkabber/ifacetk/iface.tcl
===================================================================
--- trunk/tkabber/ifacetk/iface.tcl	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/ifacetk/iface.tcl	2006-09-29 19:30:42 UTC (rev 734)
@@ -57,7 +57,7 @@
 
     custom::defvar options(closebuttonaction) close \
 	[::msgcat::mc "What action does the close button."] \
-	-group IFace -type radio -layout vertical \
+	-group IFace -type options \
 	-values [list \
 		     close    [::msgcat::mc "Close Tkabber"] \
 		     nothing  [::msgcat::mc "Do nothing"] \

Modified: trunk/tkabber/login.tcl
===================================================================
--- trunk/tkabber/login.tcl	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/login.tcl	2006-09-29 19:30:42 UTC (rev 734)
@@ -86,7 +86,7 @@
 if {$use_tls || $have_compress} {
     custom::defvar loginconf(stream_options) plaintext \
 	[::msgcat::mc "XMPP stream options when connecting to server."] \
-	-group Login -type radio -layout horizontal \
+	-group Login -type options \
 	-values $values
 }
 

Modified: trunk/tkabber/msgs/pl.msg
===================================================================
--- trunk/tkabber/msgs/pl.msg	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/msgs/pl.msg	2006-09-29 19:30:42 UTC (rev 734)
@@ -59,6 +59,7 @@
 ::msgcat::mcset pl "Stored user priority." "Zapamiętany priorytet użytkownika."
 ::msgcat::mcset pl "Stored user status." "Zapamiętany status użytkownika."
 ::msgcat::mcset pl "Stored user text status." "Zapamiętany opis statusu użytkownika."
+::msgcat::mcset pl "You are unsubscribed from %s" "Twoja subskrypcja od %s została anulowana"
 
 # filetransfer.tcl
 ::msgcat::mcset pl "File Transfer options." "Ustawienia przesyłania plików."
@@ -446,7 +447,7 @@
 
 # userinfo.tcl
 ::msgcat::mcset pl "List of users for userinfo." "Lista użytkowników."
-::msgcat::mcset pl "Show user info" "Pokaż wizytówkę użytkownika"
+::msgcat::mcset pl "Show user or service info" "Pokaż wizytówkę użytkownika, usługi"
 ::msgcat::mcset pl "Show" "Pokaż"
 ::msgcat::mcset pl "%s info" "Wizytówka dla %s"
 ::msgcat::mcset pl "Personal" "Osobiste"
@@ -754,7 +755,7 @@
 ::msgcat::mcset pl "Subject: " "Temat: "
 ::msgcat::mcset pl "Subscribe request from:" "Prośba o subskrypcję od:"
 ::msgcat::mcset pl "Send subscription to: " "Prośba o subskrypcję do: "
-::msgcat::mcset pl "I would like to add you to my roster." "Chciałbym dodać Cię do mojej listy kontaktów."
+::msgcat::mcset pl "I would like to add you to my roster." "Witam! Chcę dodać Cię do mojej listy kontaktów."
 
 # iface.tcl
 ::msgcat::mcset pl "Options for main interface." "Ustawienia wyglądu i zachowania aplikacji."
@@ -782,7 +783,7 @@
 ::msgcat::mcset pl "Privacy rules..." "Zasady ochrony prywatności..."
 ::msgcat::mcset pl "Change password..." "Zmień hasło..."
 ::msgcat::mcset pl "Message archive" "Archiwum wiadomości"
-::msgcat::mcset pl "Show user info..." "Pokaż wizytówkę dla..."
+::msgcat::mcset pl "Show user or service info..." "Pokaż wizytówkę użytkownika, usługi..."
 ::msgcat::mcset pl "Edit my info..." "Edytuj własną wizytówkę..."
 ::msgcat::mcset pl "Announce" "Włącz"
 ::msgcat::mcset pl "Allow downloading" "Pozwól na ściąganie"
@@ -1465,6 +1466,8 @@
 ::msgcat::mcset pl "File not found or not regular file: %s" "Nie znaleziono pliku lub jest on nieprawidłowy: %s"
 ::msgcat::mcset pl "Error while sending file. Peer reported: %s" "Błąd podczas wysyłania pliku. Komunikat błędu od odbiorcy: %s"
 ::msgcat::mcset pl "Can't receive file: %s" "Nie udało się odebrać pliku: %s"
+::msgcat::mcset pl "Port for outgoing HTTP file transfers (0 for assigned automatically). This is useful when sending files from behind a NAT with a forwarded port." "Numer portu przy wysyłaniu plików przez HTTP (jeżeli 0 to port zostanie przypisany automatycznie). Jest to przydatne przy wysyłaniu plików z sieci ukrytej za NAT z przekierowanym portem (forwarding)."
+::msgcat::mcset pl "Force advertising this hostname (or IP address) for outgoing HTTP file transfers." "Wymuś rozgłaszanie nazwy tego hosta (lub adresu IP) przy wysyłaniu plików przez HTTP."
 
 # plugins/filetransfer/jidlink.tcl
 ::msgcat::mcset pl "Send file request failed: %s" "Nie udało się wysłać pliku: %s"
@@ -1608,6 +1611,7 @@
 ::msgcat::mcset pl "Opponent wins (You resigned)" "Wygrał przeciwnik (Zrezygnowałeś z gry)"
 ::msgcat::mcset pl "Chess..." "Szachy..."
 ::msgcat::mcset pl "Games" "Gry"
+::msgcat::mcset pl "Sound to play after opponent's turn" "Odtwórz dźwięk po ruchu przeciwnika"
 
 # plugins/ejabberd/ejabberd.tcl
 ::msgcat::mcset pl "List of ejabberd servers." "Lista serwerów ejabberd."
@@ -1774,7 +1778,6 @@
 ::msgcat::mcset pl "This message was sent by %s\n" "Ta wiadomość została wysłana przez %s\n"
 ::msgcat::mcset pl "Extended addressing fields:" "Rozszerzone pola adresowe:"
 ::msgcat::mcset pl "Forwarded by:" "Przekazane przez:"
-::msgcat::mcset pl "\$names(\$type):" "\$names(\$type):"
 
 # plugins/general/xcommands.tcl
 ::msgcat::mcset pl "Commands" "Polecenia"

Modified: trunk/tkabber/pixmaps.tcl
===================================================================
--- trunk/tkabber/pixmaps.tcl	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/pixmaps.tcl	2006-09-29 19:30:42 UTC (rev 734)
@@ -28,10 +28,7 @@
 	[::msgcat::mc \
 	    "Tkabber icon theme. To make new theme visible for Tkabber\
 	     put it to some subdirectory of ~/.tkabber/pixmaps"] \
-	-group IFace \
-	-type radio \
-	-layout vertical \
-	-values $values \
+	-group IFace -type options -values $values \
 	-command [namespace current]::load_stored_theme
 }
 

Modified: trunk/tkabber/plugins/general/headlines.tcl
===================================================================
--- trunk/tkabber/plugins/general/headlines.tcl	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/plugins/general/headlines.tcl	2006-09-29 19:30:42 UTC (rev 734)
@@ -19,7 +19,7 @@
 
     custom::defvar options(multiple) 0 \
 	[::msgcat::mc "Display headlines in single/multiple windows."] \
-	-group Messages -type radio -layout vertical \
+	-group Messages -type options \
 	-values [list 0 [::msgcat::mc "Single window"] \
 		      1 [::msgcat::mc "One window per bare JID"] \
 		      2 [::msgcat::mc "One window per full JID"]]

Modified: trunk/tkabber/plugins/search/search.tcl
===================================================================
--- trunk/tkabber/plugins/search/search.tcl	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/plugins/search/search.tcl	2006-09-29 19:30:42 UTC (rev 734)
@@ -24,7 +24,7 @@
 		       disco windows. \"substring\" searches exact substring,\
 		       \"glob\" uses glob style matching, \"regexp\" allows\
 		       to match regular expression."] \
-	-type radio -layout horizontal \
+	-type options \
 	-values [list substring substring glob glob regexp regexp] \
 	-group Search
 

Modified: trunk/tkabber/utils.tcl
===================================================================
--- trunk/tkabber/utils.tcl	2006-09-27 16:47:12 UTC (rev 733)
+++ trunk/tkabber/utils.tcl	2006-09-29 19:30:42 UTC (rev 734)
@@ -362,3 +362,13 @@
     $path draw $sff.cb0
 }
 
+proc OptionMenu {path args} {
+    set m [eval [list ::tk_optionMenu $path] $args]
+
+    set bd [option get $path borderWidth ""]
+    if {$bd != ""} {
+	$path configure -bd $bd
+    }
+    return $m
+}
+



More information about the Tkabber-dev mailing list