Allow "hostname" to fail.
All checks were successful
Remind unit tests / tests (push) Successful in 27s

This commit is contained in:
Dianne Skoll
2024-10-10 11:43:26 -04:00
parent 62030719bb
commit a1b814d6b1

View File

@@ -26,7 +26,10 @@ if {[catch {package require Tcl 8.5-}]} {
wm withdraw .
set Hostname [exec hostname]
catch {
set Hostname [exec hostname]
}
global env
set HOME $env(HOME)
@@ -1102,7 +1105,11 @@ proc LoadOptions {} {
proc ConfigureCalWindow { month year firstDay numDays } {
global Hostname
.h.title configure -text "$month $year"
wm title . "$month $year - TkRemind on $Hostname"
if {[info exists Hostname]} {
wm title . "$month $year - TkRemind on $Hostname"
} else {
wm title . "$month $year - TkRemind"
}
wm iconname . "$month $year"
ConfigureCalFrame .cal $firstDay $numDays
}