check for ::pd_colors before init to avoid error in vanilla

This commit is contained in:
Seb Shader 2021-11-09 18:41:50 -08:00
parent 621d084209
commit e7fc40a524
2 changed files with 9 additions and 4 deletions

View file

@ -480,8 +480,14 @@ proc ::color-themes::init {mymenu} {
close $fp close $fp
} }
#for some reason returning from source didn't work
if {![array exists ::pd_colors]} {
::pdwindow::post "color-themes: no ::pd_colors array: skipping\n"
#return not working here
} else {
if {$::windowingsystem eq "aqua"} { if {$::windowingsystem eq "aqua"} {
::color-themes::init .menubar.apple.preferences ::color-themes::init .menubar.apple.preferences
} else { } else {
::color-themes::init .menubar.file.preferences ::color-themes::init .menubar.file.preferences
} }
}

View file

@ -1,7 +1,6 @@
array set ::pd_colors { array set ::pd_colors {
selected "#00f" selected "#00f"
signal_iolet "#558" signal_iolet "#558"
signal_iolet_border "#558"
msg_iolet "#fff" msg_iolet "#fff"
obj_box_outline "#ccc" obj_box_outline "#ccc"
obj_box_fill "#f6f8f8" obj_box_fill "#f6f8f8"