unset headids($name)
}
+proc make_transient {window origin} {
+ global have_tk85
+
+ # In MacOS Tk 8.4 transient appears to work by setting
+ # overrideredirect, which is utterly useless, since the
+ # windows get no border, and are not even kept above
+ # the parent.
+ if {!$have_tk85 && [tk windowingsystem] eq {aqua}} return
+
+ wm transient $window $origin
+
+ # Windows fails to place transient windows normally, so
+ # schedule a callback to center them on the parent.
+ if {[tk windowingsystem] eq {win32}} {
+ after idle [list tk::PlaceWindow $window widget $origin]
+ }
+}
+
proc show_error {w top msg} {
message $w.m -text $msg -justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
proc error_popup {msg {owner .}} {
set w .error
toplevel $w
- wm transient $w $owner
+ make_transient $w $owner
show_error $w $w $msg
}
set confirm_ok 0
set w .confirm
toplevel $w
- wm transient $w $owner
+ make_transient $w $owner
message $w.m -text $msg -justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
}
toplevel $w
wm title $w [mc "About gitk"]
- wm transient $w .
+ make_transient $w .
message $w.m -text [mc "
Gitk - a commit viewer for git
}
toplevel $w
wm title $w [mc "Gitk key bindings"]
- wm transient $w .
+ make_transient $w .
message $w.m -text "
[mc "Gitk key bindings:"]
toplevel $top
wm title $top $title
- wm transient $top .
+ make_transient $top .
# View name
frame $top.nfr
set patchtop $top
catch {destroy $top}
toplevel $top
- wm transient $top .
+ make_transient $top .
label $top.title -text [mc "Generate patch"]
grid $top.title - -pady 10
label $top.from -text [mc "From:"]
set mktagtop $top
catch {destroy $top}
toplevel $top
- wm transient $top .
+ make_transient $top .
label $top.title -text [mc "Create tag"]
grid $top.title - -pady 10
label $top.id -text [mc "ID:"]
set wrcomtop $top
catch {destroy $top}
toplevel $top
- wm transient $top .
+ make_transient $top .
label $top.title -text [mc "Write commit to file"]
grid $top.title - -pady 10
label $top.id -text [mc "ID:"]
set top .makebranch
catch {destroy $top}
toplevel $top
- wm transient $top .
+ make_transient $top .
label $top.title -text [mc "Create new branch"]
grid $top.title - -pady 10
label $top.id -text [mc "ID:"]
set confirm_ok 0
set w ".confirmreset"
toplevel $w
- wm transient $w .
+ make_transient $w .
wm title $w [mc "Confirm reset"]
message $w.m -text \
[mc "Reset branch %s to %s?" $mainhead [string range $rowmenuid 0 7]] \
}
toplevel $top
wm title $top [mc "Tags and heads: %s" [file tail [pwd]]]
- wm transient $top .
+ make_transient $top .
text $top.list -background $bgcolor -foreground $fgcolor \
-selectbackground $selectbgcolor -font mainfont \
-xscrollcommand "$top.xsb set" -yscrollcommand "$top.ysb set" \
font create sample
eval font config sample [font actual $font]
toplevel $top
- wm transient $top $prefstop
+ make_transient $top $prefstop
wm title $top [mc "Gitk font chooser"]
label $top.l -textvariable fontparam(which)
pack $top.l -side top
}
toplevel $top
wm title $top [mc "Gitk preferences"]
- wm transient $top .
+ make_transient $top .
label $top.ldisp -text [mc "Commit list display options"]
grid $top.ldisp - -sticky w -pady 10
label $top.spacer -text " "