File tree 1 file changed +20
-3
lines changed 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,21 @@ if {$use_ttk} {
12
12
set NS ttk
13
13
}
14
14
15
+ set title " Question?"
15
16
if {$argc < 1} {
16
17
puts stderr " Usage: $argv0 <question>"
17
18
exit 1
18
19
} else {
20
+ if {$argc > 2 && [lindex $argv 0] == " --title" } {
21
+ set title [lindex $argv 1]
22
+ set argv [lreplace $argv 0 1]
23
+ }
19
24
set prompt [join $argv " " ]
20
25
}
21
26
22
27
${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
25
30
pack .t.m -side top -fill x -padx 20 -pady 20 -expand 1
26
31
pack .t -side top -fill x -ipadx 20 -ipady 20 -expand 1
27
32
@@ -47,5 +52,17 @@ proc yes {} {
47
52
exit 0
48
53
}
49
54
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
51
68
tk::PlaceWindow .
You can’t perform that action at this time.
0 commit comments