{"thread":{"id":"19314","subject":"[PATCH] gitk: Fix errors in the theme patch","startedAt":"2009-05-12T14:45:06Z","lastAt":"2009-05-17T23:32:20Z","messageCount":2,"participants":["Pat Thoyts","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"113638","messageId":"87zldi9y8d.fsf@users.sourceforge.net","threadId":"19314","inReplyTo":null,"subject":"[PATCH] gitk: Fix errors in the theme patch","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2009-05-12T14:45:06Z","receivedAt":"2009-05-12T14:45:06Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"\n  This patch fixes a typo in the commit selection combobox that\n  prevented it from working and sets the width of the widget.\n  Also fixed show_error to handle errors arising before the gui is\n  fully configured (ie: invalid command line parameters)\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n gitk |   10 ++++++++--\n 1 files changed, 8 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 4526193..082fa77 100755\n--- a/gitk\n+++ b/gitk\n@@ -1798,6 +1798,7 @@ proc make_transient {window origin} {\n \n proc show_error {w top msg} {\n     global NS\n+    if {![info exists NS]} {set NS \"\"}\n     if {[wm state $top] eq \"withdrawn\"} { wm deiconify $top }\n     message $w.m -text $msg -justify center -aspect 400\n     pack $w.m -side top -fill x -padx 20 -pady 20\n@@ -1920,7 +1921,12 @@ proc mca {str} {\n proc makedroplist {w varname args} {\n     global use_ttk\n     if {$use_ttk} {\n-\tset gm [ttk::combobox $w -width 10 -state readonly\\\n+        set width 0\n+        foreach label $args {\n+            set cx [string length $label]\n+            if {$cx > $width} {set width $cx}\n+        }\n+\tset gm [ttk::combobox $w -width $width -state readonly\\\n \t\t    -textvariable $varname -values $args]\n     } else {\n \tset gm [eval [linsert $args 0 tk_optionMenu $w $varname]]\n@@ -2141,7 +2147,7 @@ proc makewindow {} {\n     pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \\\n \t-side left -fill y\n     set gdttype [mc \"containing:\"]\n-    set gm [makedroplist .tf.lbar.gdttype gdtype \\\n+    set gm [makedroplist .tf.lbar.gdttype gdttype \\\n \t\t[mc \"containing:\"] \\\n \t\t[mc \"touching paths:\"] \\\n \t\t[mc \"adding/removing string:\"]]\n-- \n1.6.3.msysgit.0\n"},{"id":"114147","messageId":"18960.40580.699131.292524@cargo.ozlabs.ibm.com","threadId":"19314","inReplyTo":"87zldi9y8d.fsf@users.sourceforge.net","subject":"Re: [PATCH] gitk: Fix errors in the theme patch","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2009-05-17T23:32:20Z","receivedAt":"2009-05-17T23:32:20Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Pat Thoyts writes:\n\n>   This patch fixes a typo in the commit selection combobox that\n>   prevented it from working and sets the width of the widget.\n>   Also fixed show_error to handle errors arising before the gui is\n>   fully configured (ie: invalid command line parameters)\n\nApplied to the dev branch, thanks.  I'll pull it into the master\nbranch soon - there have been changes to [vieweditor] on the master\nbranch that conflict, including new widgets added which will need to\nhave the ${NS}:: treatment.\n\nPaul.\n"}]}