patch 55c1cbaf4c675e24f783478cf8aaa869449f3c17
Author: Enrique D. Bosch <presidev@AT@gmail.com>
Date: Fri Aug 24 22:40:19 CEST 2018
* Add error wrapper, later can be a window dialog or something
diff -rN -u old-idlebiff/idlebiff new-idlebiff/idlebiff
--- old-idlebiff/idlebiff 2024-11-22 15:47:07.096101613 +0100
+++ new-idlebiff/idlebiff 2024-11-22 15:47:07.096101613 +0100
@@ -100,7 +100,7 @@
set png_chk_h [ dict get $pnginfo height ]
set size_not_same [ or [ != $png_up_w $png_down_w ] [ != $png_down_w $png_chk_w ] [ != $png_up_h $png_down_h ] [ != $png_down_h $png_chk_h ] ]
- if { $size_not_same } { error }
+ if { $size_not_same } { emit_error size }
wm title . idlebiff
wm iconname . idlebiff
@@ -209,6 +209,8 @@
}
}
+proc emit_error args { error $args }
+
proc set_timeout {} \
{
variable ::shared::conf
@@ -302,7 +304,7 @@
variable ::shared::conf
variable ::shared::cap
- if { $cap(logindisabled) } { error logindisabled }
+ if { $cap(logindisabled) } { emit_error logindisabled }
if { $retr } { unset conf(pass) }
if { ![ info exists conf(pass) ] } { set conf(pass) [ get_password $retr ] }
@@ -398,7 +400,7 @@
variable ::shared::ka
variable ::shared::cap
- if { !$cap(idle) } { error noidle }
+ if { !$cap(idle) } { emit_error noidle }
fileevent $con readable { parse_idle_check $con }
enter_mailbox $con
set_search_params
@@ -506,7 +508,7 @@
else { set current $img_down }
update_img $current
}
- if {[ no_tagged $linea ]} { error search }
+ if {[ no_tagged $linea ]} { emit_error search }
}
proc read_line con \
@@ -560,8 +562,8 @@
}
foreach i [ array names ccsu ] \
{
- if { ![ info exists csu($i) ] } { error cert }
- if {[ ne $csu($i) $ccsu($i) ]} { error cert }
+ if { ![ info exists csu($i) ] } { emit_error cert }
+ if {[ ne $csu($i) $ccsu($i) ]} { emit_error cert }
}
}
}