File: 06_avoid-tab-underflow.dpatch

package info (click to toggle)
tkman 2.2-4
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 948 kB
  • ctags: 290
  • sloc: tcl: 8,264; sh: 470; makefile: 241
file content (19 lines) | stat: -rw-r--r-- 708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/sh /usr/share/dpatch/dpatch-run
## 06_avoid-tab-underflow.dpatch by  <maxy@gnuservers.com.ar>
##
## DP: Avoid tab underflow

@DPATCH@
diff -urNad tkman-2.2~/gui.tcl tkman-2.2/gui.tcl
--- tkman-2.2~/gui.tcl	2008-04-18 17:55:15.000000000 -0300
+++ tkman-2.2/gui.tcl	2008-04-18 17:56:54.000000000 -0300
@@ -746,6 +746,9 @@
 	set repstr "ETRNIOASM          aaabcdeeeefghiijklmnnooprrsttuy"; set replen [string length $repstr]
 
 	set rm [expr {[winfo width $t]-2*[$t cget -padx]-10}]
+	if { $rm <= 150 } {
+		set rm 151
+	}
 	$t tag configure info -tabs [list 0.3i $rm right]
 	$t tag configure census -tabs [list [expr {$rm-150}] right $rm right]
 	$t tag configure high -tabs [list $rm right]