Small adjustments and bug fixes in xorriso-tcltk

This commit is contained in:
Thomas Schmitt 2013-01-04 20:43:49 +00:00
parent a26cb8f9ca
commit 5aede6ec59
2 changed files with 20 additions and 7 deletions

View File

@ -389,11 +389,11 @@ proc scan_info_for_event {line} {
} }
if {[compare_sev $sev $highest_total_sev] >= 0} { if {[compare_sev $sev $highest_total_sev] >= 0} {
set highest_total_sev $sev set highest_total_sev $sev
set highest_total_sev_msg $line set highest_total_sev_msg [escape_newline $line]
} }
if {[compare_sev $sev $highest_cmd_sev] >= 0} { if {[compare_sev $sev $highest_cmd_sev] >= 0} {
set highest_cmd_sev $sev set highest_cmd_sev $sev
set highest_cmd_sev_msg $line set highest_cmd_sev_msg [escape_newline $line]
} }
} }
@ -2332,7 +2332,9 @@ proc effectuate_command_logging {close_window} {
if {$close_window == 1 && $browse_disk_window_is_active == 1} { if {$close_window == 1 && $browse_disk_window_is_active == 1} {
destroy_browse_disk .browse_disk_window destroy_browse_disk .browse_disk_window
} }
start_command_logging $cmd_log_target $cmd_logging_mode if {$close_window == 1 || $cmd_logging_mode > 0} {
start_command_logging $cmd_log_target $cmd_logging_mode
}
} }
@ -2357,7 +2359,9 @@ proc effectuate_debug_logging {close_window} {
if {$close_window == 1 && $browse_disk_window_is_active == 1} { if {$close_window == 1 && $browse_disk_window_is_active == 1} {
destroy_browse_disk .browse_disk_window destroy_browse_disk .browse_disk_window
} }
start_debug_logging $debug_log_file $debug_logging if {$close_window == 1 || $debug_logging > 0} {
start_debug_logging $debug_log_file $debug_logging
}
} }
@ -2910,7 +2914,7 @@ proc set_display_msg {mode} {
proc xorriso_tcltk_errmsg {msg} { proc xorriso_tcltk_errmsg {msg} {
global highest_cmd_sev_msg global highest_cmd_sev_msg
set highest_cmd_sev_msg $msg set highest_cmd_sev_msg [escape_newline $msg]
display_msg $msg display_msg $msg
window_ack $msg "grey" "toplevel" window_ack $msg "grey" "toplevel"
update idletasks update idletasks
@ -5509,6 +5513,7 @@ proc log_command {cmd} {
if {$cmd_log_conn == ""} { if {$cmd_log_conn == ""} {
effectuate_command_logging 0 effectuate_command_logging 0
if {$cmd_logging_mode < 1} {return ""}
} }
set prefix "" set prefix ""
if {$cmd_logging_mode == 1} { if {$cmd_logging_mode == 1} {
@ -5559,6 +5564,7 @@ proc start_command_logging {target mode} {
} else { } else {
puts stderr $msg puts stderr $msg
} }
set cmd_logging_mode 0
return 0 return 0
} }
if {$mode > 0} { if {$mode > 0} {
@ -5632,7 +5638,7 @@ proc execute_script {close_window} {
set errmsg "" set errmsg ""
set ret [catch {set execute_script_conn [open $execute_script_adr r]} errmsg] set ret [catch {set execute_script_conn [open $execute_script_adr r]} errmsg]
if {$ret != 0} { if {$ret != 0} {
xorriso_tcltk_errmsg "xorriso-tcltk : SORRY : Failed to open command log script [make_text_shellsafe $execute_script_adr] :\n$errmsg" xorriso_tcltk_errmsg "xorriso-tcltk : SORRY : Failed to open command script [make_text_shellsafe $execute_script_adr] :\n$errmsg"
return "" return ""
} }
set line "" set line ""
@ -5674,6 +5680,13 @@ proc execute_script {close_window} {
} }
# Convert newline into \n
#
proc escape_newline {text} {
return [string map [list "\n" "\\n"] $text]
}
# -------- start living # -------- start living

View File

@ -1 +1 @@
#define Xorriso_timestamP "2013.01.04.192238" #define Xorriso_timestamP "2013.01.04.204305"