{"thread":{"id":"22013","subject":"[PATCH] git-gui: handle really long error messages in updateindex.","startedAt":"2009-12-20T02:02:03Z","lastAt":"2010-01-23T22:23:01Z","messageCount":2,"participants":["Pat Thoyts","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"130277","messageId":"87bphqui9t.fsf@users.sourceforge.net","threadId":"22013","inReplyTo":null,"subject":"[PATCH] git-gui: handle really long error messages in updateindex.","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2009-12-20T02:02:03Z","receivedAt":"2009-12-20T02:02:03Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":" As reported to msysGit (bug #340) it is possible to get some very long\n error messages when updating the index. The use of a label to display\n this prevents scrolling the output. This patch replaces the label with\n a scrollable text widget configured to look like a label.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n lib/index.tcl |   34 ++++++++++++++++++----------------\n 1 files changed, 18 insertions(+), 16 deletions(-)\n\ndiff --git a/lib/index.tcl b/lib/index.tcl\nindex d33896a..0b58bd8 100644\n--- a/lib/index.tcl\n+++ b/lib/index.tcl\n@@ -14,29 +14,31 @@ proc _close_updateindex {fd after} {\n \t\ttoplevel $w\n \t\twm title $w [strcat \"[appname] ([reponame]): \" [mc \"Index Error\"]]\n \t\twm geometry $w \"+[winfo rootx .]+[winfo rooty .]\"\n-\t\tpack [label $w.msg \\\n-\t\t\t-justify left \\\n-\t\t\t-anchor w \\\n-\t\t\t-text [strcat \\\n-\t\t\t\t[mc \"Updating the Git index failed.  A rescan will be automatically started to resynchronize git-gui.\"] \\\n-\t\t\t\t\"\\n\\n$err\"] \\\n-\t\t\t] -anchor w\n-\n-\t\tframe $w.buttons\n-\t\tbutton $w.buttons.continue \\\n+\t\tset s [mc \"Updating the Git index failed.  A rescan will be automatically started to resynchronize git-gui.\"]\n+\t\ttext $w.msg -yscrollcommand [list $w.vs set] \\\n+\t\t\t-width [string length $s] -relief flat \\\n+\t\t\t-borderwidth 0 -highlightthickness 0 \\\n+\t\t\t-background [$w cget -background]\n+\t\t$w.msg tag configure bold -font font_uibold -justify center\n+\t\tscrollbar $w.vs -command [list $w.msg yview]\n+\t\t$w.msg insert end $s bold \\n\\n$err {}\n+\t\t$w.msg configure -state disabled\n+\n+\t\tbutton $w.continue \\\n \t\t\t-text [mc \"Continue\"] \\\n \t\t\t-command [list destroy $w]\n-\t\tpack $w.buttons.continue -side right -padx 5\n-\t\tbutton $w.buttons.unlock \\\n+\t\tbutton $w.unlock \\\n \t\t\t-text [mc \"Unlock Index\"] \\\n \t\t\t-command \"destroy $w; _delete_indexlock\"\n-\t\tpack $w.buttons.unlock -side right\n-\t\tpack $w.buttons -side bottom -fill x -pady 10 -padx 10\n+\t\tgrid $w.msg - $w.vs -sticky news\n+\t\tgrid $w.unlock $w.continue - -sticky se -padx 2 -pady 2\n+\t\tgrid columnconfigure $w 0 -weight 1\n+\t\tgrid rowconfigure $w 0 -weight 1\n \n \t\twm protocol $w WM_DELETE_WINDOW update\n-\t\tbind $w.buttons.continue <Visibility> \"\n+\t\tbind $w.continue <Visibility> \"\n \t\t\tgrab $w\n-\t\t\tfocus $w.buttons.continue\n+\t\t\tfocus %W\n \t\t\"\n \t\ttkwait window $w\n \n-- \n1.6.2\n"},{"id":"132509","messageId":"20100123222301.GA12679@spearce.org","threadId":"22013","inReplyTo":"87bphqui9t.fsf@users.sourceforge.net","subject":"Re: [PATCH] git-gui: handle really long error messages in updateindex.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-01-23T22:23:01Z","receivedAt":"2010-01-23T22:23:01Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> wrote:\n>  As reported to msysGit (bug #340) it is possible to get some very long\n>  error messages when updating the index. The use of a label to display\n>  this prevents scrolling the output. This patch replaces the label with\n>  a scrollable text widget configured to look like a label.\n> \n> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n> ---\n>  lib/index.tcl |   34 ++++++++++++++++++----------------\n>  1 files changed, 18 insertions(+), 16 deletions(-)\n\nThanks, applied.\n\n-- \nShawn.\n"}]}