File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,21 @@ if {$use_ttk} {
1212 set NS ttk
1313}
1414
15+ set title " Question?"
1516if {$argc < 1} {
1617 puts stderr " Usage: $argv0 <question>"
1718 exit 1
1819} else {
20+ if {$argc > 2 && [lindex $argv 0] == " --title" } {
21+ set title [lindex $argv 1]
22+ set argv [lreplace $argv 0 1]
23+ }
1924 set prompt [join $argv " " ]
2025}
2126
2227${NS} ::frame .t
23- ${NS} ::label .t.m -text $prompt -justify center -width 40
24- .t.m configure -wraplength 400
28+ ${NS} ::label .t.m -text $prompt -justify center -width 400px
29+ .t.m configure -wraplength 400px
2530pack .t.m -side top -fill x -padx 20 -pady 20 -expand 1
2631pack .t -side top -fill x -ipadx 20 -ipady 20 -expand 1
2732
@@ -47,5 +52,17 @@ proc yes {} {
4752 exit 0
4853}
4954
50- wm title . " Question?"
55+ if {$::tcl_platform(platform) eq {windows}} {
56+ set icopath [file dirname [file normalize $argv0 ]]
57+ if {[file tail $icopath ] eq {git-core}} {
58+ set icopath [file dirname $icopath ]
59+ }
60+ set icopath [file dirname $icopath ]
61+ set icopath [file join $icopath share git git-for-windows.ico]
62+ if {[file exists $icopath ]} {
63+ wm iconbitmap . -default $icopath
64+ }
65+ }
66+
67+ wm title . $title
5168tk::PlaceWindow .
You can’t perform that action at this time.
0 commit comments