X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-gui%2Flib%2Findex.tcl;h=e9db0c49895fbebdf8dbe7c0472546a05fea26a0;hb=48c250a121a425a1860226b6a7061aecfbab5246;hp=d33896a0ce26dd34c8024e21c71123e62832b8c0;hpb=417653777a1d073f53b2053cf0b0838a35cfc7d5;p=git.git diff --git a/git-gui/lib/index.tcl b/git-gui/lib/index.tcl index d33896a0c..e9db0c498 100644 --- a/git-gui/lib/index.tcl +++ b/git-gui/lib/index.tcl @@ -8,36 +8,41 @@ proc _delete_indexlock {} { } proc _close_updateindex {fd after} { + global use_ttk NS fconfigure $fd -blocking 1 if {[catch {close $fd} err]} { set w .indexfried - toplevel $w + Dialog $w + wm withdraw $w wm title $w [strcat "[appname] ([reponame]): " [mc "Index Error"]] wm geometry $w "+[winfo rootx .]+[winfo rooty .]" - pack [label $w.msg \ - -justify left \ - -anchor w \ - -text [strcat \ - [mc "Updating the Git index failed. A rescan will be automatically started to resynchronize git-gui."] \ - "\n\n$err"] \ - ] -anchor w - - frame $w.buttons - button $w.buttons.continue \ + set s [mc "Updating the Git index failed. A rescan will be automatically started to resynchronize git-gui."] + text $w.msg -yscrollcommand [list $w.vs set] \ + -width [string length $s] -relief flat \ + -borderwidth 0 -highlightthickness 0 \ + -background [get_bg_color $w] + $w.msg tag configure bold -font font_uibold -justify center + ${NS}::scrollbar $w.vs -command [list $w.msg yview] + $w.msg insert end $s bold \n\n$err {} + $w.msg configure -state disabled + + ${NS}::button $w.continue \ -text [mc "Continue"] \ -command [list destroy $w] - pack $w.buttons.continue -side right -padx 5 - button $w.buttons.unlock \ + ${NS}::button $w.unlock \ -text [mc "Unlock Index"] \ -command "destroy $w; _delete_indexlock" - pack $w.buttons.unlock -side right - pack $w.buttons -side bottom -fill x -pady 10 -padx 10 + grid $w.msg - $w.vs -sticky news + grid $w.unlock $w.continue - -sticky se -padx 2 -pady 2 + grid columnconfigure $w 0 -weight 1 + grid rowconfigure $w 0 -weight 1 wm protocol $w WM_DELETE_WINDOW update - bind $w.buttons.continue " + bind $w.continue " grab $w - focus $w.buttons.continue + focus %W " + wm deiconify $w tkwait window $w $::main_status stop