[Tkabber-dev] r1354 - in trunk/tkabber-plugins: . browser checkers chess ejabberd georoster gmail mute renju reversi spy tclchat

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Jan 28 20:39:02 MSK 2008


Author: sergei
Date: 2008-01-28 20:39:01 +0300 (Mon, 28 Jan 2008)
New Revision: 1354

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/browser/browser.tcl
   trunk/tkabber-plugins/checkers/checkers.tcl
   trunk/tkabber-plugins/chess/chess.tcl
   trunk/tkabber-plugins/ejabberd/ejabberd.tcl
   trunk/tkabber-plugins/georoster/georoster.tcl
   trunk/tkabber-plugins/gmail/gmail.tcl
   trunk/tkabber-plugins/mute/mute.tcl
   trunk/tkabber-plugins/renju/renju.tcl
   trunk/tkabber-plugins/reversi/reversi.tcl
   trunk/tkabber-plugins/spy/spy.tcl
   trunk/tkabber-plugins/tclchat/tclchat.tcl
Log:
	* browser/browser.tcl, checkers/checkers.tcl, chess/chess.tcl,
	  ejabberd/ejabberd.tcl, georoster/georoster.tcl, gmail/gmail.tcl,
	  mute/mute.tcl, renju/renju.tcl, reversi/reversi.tcl, spy/spy.tcl,
	  tclchat/tclchat.tcl: Removed usage of global font variable.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/ChangeLog	2008-01-28 17:39:01 UTC (rev 1354)
@@ -1,3 +1,10 @@
+2008-01-28  Sergei Golovan <sgolovan at nes.ru>
+
+	* browser/browser.tcl, checkers/checkers.tcl, chess/chess.tcl,
+	  ejabberd/ejabberd.tcl, georoster/georoster.tcl, gmail/gmail.tcl,
+	  mute/mute.tcl, renju/renju.tcl, reversi/reversi.tcl, spy/spy.tcl,
+	  tclchat/tclchat.tcl: Removed usage of global font variable.
+
 2008-01-20  Sergei Golovan <sgolovan at nes.ru>
 
 	* attline/attline.tcl: Fixed bug with leaving chatlog window in normal

Modified: trunk/tkabber-plugins/browser/browser.tcl
===================================================================
--- trunk/tkabber-plugins/browser/browser.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/browser/browser.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -132,7 +132,6 @@
 }
 
 proc browser::recv {bw jid res child} {
-    global font
     variable config
     variable browser
 
@@ -152,7 +151,7 @@
 	    set desc [format [::msgcat::mc "Browse error: %s"] [error_to_string $child]]
 	    set icon ""
 
-	    add_line $tw $parent_tag $tnode $icon $desc $data -font $font \
+	    add_line $tw $parent_tag $tnode $icon $desc $data \
 		-fill $config(fill)
 	    set browser(nchilds,$bw,$jid) 1
 	} else {
@@ -277,7 +276,6 @@
 proc browser::add_item_line {bw level jid category type name version parent} {
     variable browser
     variable config
-    global font
 
     set icon [item_icon $category $type]
     set tw $browser(tree,$bw)
@@ -286,7 +284,7 @@
     set parent_tag [jid_to_tag $parent]
     set node [jid_to_tag $jid]
 
-    add_line $tw $parent_tag $node $icon $desc $data -font $font \
+    add_line $tw $parent_tag $node $icon $desc $data \
 	-fill $config(fill)
 }
 
@@ -328,7 +326,6 @@
 proc browser::add_ns_line {bw jid level ns} {
     variable browser
     variable config
-    global font
 
     set tw $browser(tree,$bw)
 

Modified: trunk/tkabber-plugins/checkers/checkers.tcl
===================================================================
--- trunk/tkabber-plugins/checkers/checkers.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/checkers/checkers.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -546,7 +546,6 @@
 }
 
 proc checkers::open {gid} {
-    global font
     variable options
     variable square_size
     variable line_width
@@ -616,10 +615,11 @@
     #pack $w.history -side top -anchor w
     set hsw [ScrolledWindow $w.hsw]
     pack $hsw -side top -fill x -expand yes
+    set ht [text $w.text -wrap word -height 60 -state disabled]
+    set font [$ht cget -font]
     set tabstop1 [font measure $font "99.."]
     set tabstop2 [font measure $font "99..Qa8-a8+= "]
-    set ht [text $w.text -font $font -tabs "$tabstop1 $tabstop2" -wrap word \
-		 -height 60 -state disabled]
+    $ht configure -tabs "$tabstop1 $tabstop2"
     $ht tag configure attention -foreground [option get $ht errorForeground Text]
     $hsw setwidget $ht
     set flags(hw) $ht

Modified: trunk/tkabber-plugins/chess/chess.tcl
===================================================================
--- trunk/tkabber-plugins/chess/chess.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/chess/chess.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -504,7 +504,6 @@
 }
 
 proc chess::open {gid} {
-    global font
     variable options
     variable square_size
     variable line_width
@@ -573,10 +572,11 @@
     #pack $w.history -side top -anchor w
     set hsw [ScrolledWindow $w.hsw]
     pack $hsw -side top -fill x -expand yes
+    set ht [text $w.text -wrap word -height 60 -state disabled]
+    set font [$ht cget -font]
     set tabstop1 [font measure $font "99.."]
-    set tabstop2 [font measure $font "99..$piece_name(wq)a8-a8+= "]
-    set ht [text $w.text -font $font -tabs "$tabstop1 $tabstop2" -wrap word \
-		 -height 60 -state disabled]
+    set tabstop2 [font measure $font "99..Qa8-a8+= "]
+    $ht configure -tabs "$tabstop1 $tabstop2"
     $ht tag configure attention -foreground [option get $ht errorForeground Text]
     $hsw setwidget $ht
     set flags(hw) $ht

Modified: trunk/tkabber-plugins/ejabberd/ejabberd.tcl
===================================================================
--- trunk/tkabber-plugins/ejabberd/ejabberd.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/ejabberd/ejabberd.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -177,10 +177,9 @@
 }
 
 proc ejabberd::add_grid_text {connid jid info name desc row} {
-    global font
     label $info.l$name -text $desc
     set sw [ScrolledWindow $info.s$name -scrollbar vertical]
-    text $info.v$name -height 6 -wrap word -font $font
+    text $info.v$name -height 6 -wrap word
     $sw setwidget $info.v$name
     grid $info.l$name -row $row -column 0 -sticky e
     grid $info.s$name -row $row -column 1 -sticky we

Modified: trunk/tkabber-plugins/georoster/georoster.tcl
===================================================================
--- trunk/tkabber-plugins/georoster/georoster.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/georoster/georoster.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -962,7 +962,7 @@
 	}
 
 	if {$options(showcities) == "all"} {
-	    set txt [$c create text [expr {$x+4}] $y -text $name -font $::font -anchor w \
+	    set txt [$c create text [expr {$x+4}] $y -text $name -anchor w \
 			 -fill [option get [winfo parent $c] cityforeground GeoRoster] \
 			 -tags [list city text name$name]]
 	    lassign [$c bbox $txt] x1 y1 x2 y2

Modified: trunk/tkabber-plugins/gmail/gmail.tcl
===================================================================
--- trunk/tkabber-plugins/gmail/gmail.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/gmail/gmail.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -190,7 +190,6 @@
 package require md5
 
 proc gmail::add_thread {jid tid messages date url children unseen} {
-    global font
     variable options
 
     set w .gmail_messages
@@ -199,7 +198,7 @@
     set fnode [str2node $jid]
     if {![$tw exists $fnode]} {
 	$tw insert end root $fnode -text $jid -open 1 \
-	    -fill $options(unseencolor) -image browser/user -font $font \
+	    -fill $options(unseencolor) -image browser/user \
 	    -data [list type jid jid $jid unseen $unseen]
     }
 
@@ -232,7 +231,7 @@
     set names [senders2names $senders]
     $tw insert end $fnode $snode \
 	-text "$timestamp$names ($messages) $subject" -open 1 \
-	-fill $options(unseencolor) -font $font \
+	-fill $options(unseencolor) \
 	-data [list type thread jid $jid tid $tid \
 		    messages $messages date $date url $url \
 		    children $children unseen $unseen]

Modified: trunk/tkabber-plugins/mute/mute.tcl
===================================================================
--- trunk/tkabber-plugins/mute/mute.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/mute/mute.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -101,7 +101,6 @@
 }
 
 proc mute::editor::open_win {connid jid id} {
-    global font
     variable txts
 
     set w [get_winid $connid $jid $id]
@@ -125,7 +124,7 @@
     pack $sep -pady 2m -fill x -side bottom
 
     set sw [ScrolledWindow $w.sw]
-    set text [text $w.text -font $font]
+    set text [text $w.text]
     pack $sw -side top -anchor w -expand yes -fill both
     $sw setwidget $text
 }

Modified: trunk/tkabber-plugins/renju/renju.tcl
===================================================================
--- trunk/tkabber-plugins/renju/renju.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/renju/renju.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -466,7 +466,6 @@
 }
 
 proc renju::open {gid} {
-    global font
     variable options
     variable game_names
     variable square_size
@@ -531,10 +530,11 @@
     #pack $w.history -side top -anchor w
     set hsw [ScrolledWindow $w.hsw]
     pack $hsw -side top -fill x -expand yes
+    set ht [text $w.text -wrap word -height 60 -state disabled]
+    set font [$ht cget -font]
     set tabstop1 [font measure $font "99.."]
     set tabstop2 [font measure $font "99..Qa8-a8+= "]
-    set ht [text $w.text -font $font -tabs "$tabstop1 $tabstop2" -wrap word \
-		 -height 60 -state disabled]
+    $ht configure -tabs "$tabstop1 $tabstop2"
     $ht tag configure attention -foreground [option get $ht errorForeground Text]
     $hsw setwidget $ht
     set flags(hw) $ht

Modified: trunk/tkabber-plugins/reversi/reversi.tcl
===================================================================
--- trunk/tkabber-plugins/reversi/reversi.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/reversi/reversi.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -417,7 +417,6 @@
 }
 
 proc reversi::open {gid} {
-    global font
     variable options
     variable square_size
     variable line_width
@@ -485,10 +484,11 @@
     #pack $w.history -side top -anchor w
     set hsw [ScrolledWindow $w.hsw]
     pack $hsw -side top -fill x -expand yes
+    set ht [text $w.text -wrap word -height 60 -state disabled]
+    set font [$ht cget -font]
     set tabstop1 [font measure $font "99.."]
     set tabstop2 [font measure $font "99..Qa8-a8+= "]
-    set ht [text $w.text -font $font -tabs "$tabstop1 $tabstop2" -wrap word \
-		 -height 60 -state disabled]
+    $ht configure -tabs "$tabstop1 $tabstop2"
     $ht tag configure attention -foreground [option get $ht errorForeground Text]
     $hsw setwidget $ht
     set flags(hw) $ht

Modified: trunk/tkabber-plugins/spy/spy.tcl
===================================================================
--- trunk/tkabber-plugins/spy/spy.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/spy/spy.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -37,7 +37,6 @@
 }
 
 proc spy::open_window {} {
-    global font
     variable watches
 
     set w .spy
@@ -73,7 +72,7 @@
     set sw [ScrolledWindow $w.isw -scrollbar vertical]
     pack $sw -side top -fill both -expand yes -in $w
 
-    set log [text $w.log -font $font -wrap word]
+    set log [text $w.log -wrap word]
     $sw setwidget $log
 
     $log configure -state disabled -takefocus 1

Modified: trunk/tkabber-plugins/tclchat/tclchat.tcl
===================================================================
--- trunk/tkabber-plugins/tclchat/tclchat.tcl	2008-01-28 02:27:04 UTC (rev 1353)
+++ trunk/tkabber-plugins/tclchat/tclchat.tcl	2008-01-28 17:39:01 UTC (rev 1354)
@@ -205,22 +205,22 @@
 	    wm transient $t
 	    wm protocol $t WM_DELETE_WINDOW { }
 	    wm title $t "Load History From Logs"
-	    grid [label $t.lbl -font $::font \
+	    grid [label $t.lbl \
 		    -text "Please select how far back you want to load:"] \
 		    -sticky ew -pady 5
 	    set i 0
 	    variable HistQueryNum [expr {[llength $loglist] / 2}]
             set loglist [lpairreverse $loglist]
 	    foreach {l s} $loglist {
-		grid [radiobutton $t.rb$i -text "$l $s" -font $::font \
+		grid [radiobutton $t.rb$i -text "$l $s" \
                           -val $i -var [namespace current]::HistQueryNum] \
                     -sticky w -padx 15 -pady 0
 		incr i
 	    }
-	    grid [radiobutton $t.rb$i -text "None" -font $::font \
+	    grid [radiobutton $t.rb$i -text "None" \
                       -val $i -var [namespace current]::HistQueryNum] \
                 -sticky w -padx 15 -pady 0
-	    grid [button $t.ok -text Ok -width 8 -font $::font \
+	    grid [button $t.ok -text Ok -width 8 \
                       -command [list destroy $t] -default active] \
                 -sticky e -padx 5 -pady 10
 	    grid columnconfigure $t 0 -weight 1



More information about the Tkabber-dev mailing list