From e7fc40a5249f545b8d6f26bba95cd0e65ec9c861 Mon Sep 17 00:00:00 2001 From: Seb Shader Date: Tue, 9 Nov 2021 18:41:50 -0800 Subject: [PATCH] check for ::pd_colors before init to avoid error in vanilla --- color-themes-plugin.tcl | 12 +++++++++--- themes/pd-extended-theme-plugin.tcl | 1 - 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/color-themes-plugin.tcl b/color-themes-plugin.tcl index af96081..4a10c16 100644 --- a/color-themes-plugin.tcl +++ b/color-themes-plugin.tcl @@ -480,8 +480,14 @@ proc ::color-themes::init {mymenu} { close $fp } -if {$::windowingsystem eq "aqua"} { - ::color-themes::init .menubar.apple.preferences +#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 { - ::color-themes::init .menubar.file.preferences + if {$::windowingsystem eq "aqua"} { + ::color-themes::init .menubar.apple.preferences + } else { + ::color-themes::init .menubar.file.preferences + } } \ No newline at end of file diff --git a/themes/pd-extended-theme-plugin.tcl b/themes/pd-extended-theme-plugin.tcl index a0e74aa..930aa12 100644 --- a/themes/pd-extended-theme-plugin.tcl +++ b/themes/pd-extended-theme-plugin.tcl @@ -1,7 +1,6 @@ array set ::pd_colors { selected "#00f" signal_iolet "#558" -signal_iolet_border "#558" msg_iolet "#fff" obj_box_outline "#ccc" obj_box_fill "#f6f8f8"