Commit 4a6ba684 authored by pokergaming's avatar pokergaming
Browse files

made a simple animation (toggle visibility) when tracking an error associated...

made a simple animation (toggle visibility) when tracking an error associated with a toplevel canvas. Use broken box font colors for error link in console.
parent f0635ce4
......@@ -210,7 +210,7 @@ proc ::dialog_gui::set_gui_preset {args} {
set ::pd_colors(selection_rectangle) #7c71da
set ::pd_colors(highlighted_text) #3e32a2
set ::pd_colors(highlighted_text_bg) #a49aea
set ::pd_colors(dash_outline) "#f00"
set ::pd_colors(dash_outline) "#ff9933"
set ::pd_colors(dash_fill) "#3e32a2"
set ::pd_colors(graph_border) "#777"
set ::pd_colors(graph) "#3e32a2"
......@@ -211,9 +211,21 @@ proc ::dialog_prefs::set_color {array key op} {
graph_border {set commands [list "itemconfigure \
graph&&(!label) -stroke $c"]}
graph {set commands [list "itemconfigure graph&&(!label) -fill $c"]}
dash_fill {set commands [list "itemconfigure broken&&box -fill $c"]}
dash_outline {set commands [list "itemconfigure \
broken&&box -stroke $c"]}
dash_fill {
set commands [list "itemconfigure broken&&box -fill $c"]
if {[winfo exists .printout.frame.text]} {
.printout.frame.text tag configure errorlink -background $c
dash_outline {
set commands [list "itemconfigure broken&&box -stroke $c"]
if {[winfo exists .printout.frame.text]} {
.printout.frame.text tag configure errorlink -foreground $c
magic_glass_bg {set commands [list "itemconfigure \
magicGlassBg -fill $c"]}
magic_glass_bd {set commands [list "itemconfigure \
......@@ -226,9 +238,6 @@ proc ::dialog_prefs::set_color {array key op} {
.search.navtext tag configure link -foreground $c
.search.f.advancedlabel configure -foreground $c
if {[winfo exists .printout.frame.text]} {
.printout.frame.text tag configure link -foreground $c
# return
default {}
......@@ -5665,6 +5665,7 @@ static int glist_dofinderror(t_glist *gl, void *error_object)
extern t_class *messresponder_class;
extern t_class *message_class;
void canvas_finderror(void *error_object)
t_canvas *x;
......@@ -5672,10 +5673,26 @@ void canvas_finderror(void *error_object)
/* Since the messresponder_class isn't patchable,
we climb up to the parent message_class addy. */
if(((t_gobj *)error_object)->g_pd == messresponder_class)
error_gobj = error_object - sizeof(t_text);
/* do pointer math to potentially get the parent message */
void *msg = error_object - sizeof(t_text);
/* if it looks like a message, it must be a message */
if(((t_gobj *)msg)->g_pd == message_class)
error_gobj = msg;
/* find all root canvases */
for (x = canvas_list; x; x = x->gl_next)
if ((void *)x == error_gobj)
/* If the error is associated with a toplevel canvas, we
do a quick-and-dirty unvis and vis to give some basic
visual feedback to the user */
canvas_vis(glist_getcanvas(x), 0);
canvas_vis(glist_getcanvas(x), 1);
if (glist_dofinderror(x, error_gobj))
......@@ -956,12 +956,12 @@ proc pdtk_posterror {objectid loglevel errormsg} {
$t configure -state normal
# if we have an object id, make a friendly link...
if {$objectid ne ""} {
$t insert end "error" [list obj$objectid link]
$t insert end "error" [list obj$objectid errorlink]
$t tag bind obj$objectid <1> "pderror_select_by_id $objectid; break"
$t tag bind obj$objectid <Enter> "$t configure -cursor hand2"
$t tag bind obj$objectid <Leave> "$t configure -cursor xterm"
$t tag configure link -foreground "$::pd_colors(link)" \
-underline on
$t tag configure errorlink -foreground "$::pd_colors(dash_outline)" \
-underline on -background "$::pd_colors(dash_fill)"
} else {
$t insert end "error"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment