aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2009-05-12 15:45:06 +0100
committerPaul Mackerras <paulus@samba.org>2009-05-16 20:17:46 +1000
commit3cb1f9c9820357812a9f17df92008c8838cbc1fc (patch)
treeb71abd856b0261601216b60a484c0c444c20dbb6
parentd93f1713b0ba57b119f2ba2e2beda2ed9cc7349d (diff)
downloadgit-3cb1f9c9820357812a9f17df92008c8838cbc1fc.tar.gz
git-3cb1f9c9820357812a9f17df92008c8838cbc1fc.tar.xz
gitk: Fix errors in the theme patch
This fixes a typo in the commit selection combobox that prevented it from working properly, and sets the width of the widget. This also fixes show_error to handle errors arising before the gui is fully configured (ie: invalid command line parameters) Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rwxr-xr-xgitk10
1 files changed, 8 insertions, 2 deletions
diff --git a/gitk b/gitk
index 4526193b3..082fa7751 100755
--- a/gitk
+++ b/gitk
@@ -1798,6 +1798,7 @@ proc make_transient {window origin} {
proc show_error {w top msg} {
global NS
+ if {![info exists NS]} {set NS ""}
if {[wm state $top] eq "withdrawn"} { wm deiconify $top }
message $w.m -text $msg -justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
@@ -1920,7 +1921,12 @@ proc mca {str} {
proc makedroplist {w varname args} {
global use_ttk
if {$use_ttk} {
- set gm [ttk::combobox $w -width 10 -state readonly\
+ set width 0
+ foreach label $args {
+ set cx [string length $label]
+ if {$cx > $width} {set width $cx}
+ }
+ set gm [ttk::combobox $w -width $width -state readonly\
-textvariable $varname -values $args]
} else {
set gm [eval [linsert $args 0 tk_optionMenu $w $varname]]
@@ -2141,7 +2147,7 @@ proc makewindow {} {
pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \
-side left -fill y
set gdttype [mc "containing:"]
- set gm [makedroplist .tf.lbar.gdttype gdtype \
+ set gm [makedroplist .tf.lbar.gdttype gdttype \
[mc "containing:"] \
[mc "touching paths:"] \
[mc "adding/removing string:"]]