From: marko Date: Wed, 13 Jul 2005 22:56:55 +0000 (+0000) Subject: Fix a bug with pointer / cursor taking wrong icon / shape after choosing X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=96c0a13ad1067f911f17b253386b66e5deb7f1f2;p=imunes.git Fix a bug with pointer / cursor taking wrong icon / shape after choosing File->New in main menu. Also prevent vimageCleanup from being called unnecessarily from within filemgmt.tcl when in edit mode. Bug found by: miljenko Submitted by: Requested by: Reviewed by: Approved by: Obtained from: --- diff --git a/exec.tcl b/exec.tcl index 8d085be..01e78a5 100755 --- a/exec.tcl +++ b/exec.tcl @@ -306,6 +306,8 @@ proc deployCfg {} { proc vimageCleanup {} { + global .c + set t_start [clock seconds] set vimages [join [nexec vimage -l | fgrep -v " " | cut -d: -f 1]] set defindex [lsearch $vimages default] @@ -330,6 +332,7 @@ proc vimageCleanup {} { catch { nexec rm -f /usr/local/xorp/config.boot } catch { nexec mv /etc/resolv.conf.bak /etc/resolv.conf } statline "Cleanup completed in [expr [clock seconds] - $t_start] seconds." + .c config -cursor left_ptr } diff --git a/filemgmt.tcl b/filemgmt.tcl index 60f4c68..ec4ffb7 100755 --- a/filemgmt.tcl +++ b/filemgmt.tcl @@ -78,9 +78,11 @@ set fileTypes {{"IMUNES network configuration" {.imn} } proc newFile {} { - global currentFile + global currentFile oper_mode - vimageCleanup + if { $oper_mode == "exec" } { + vimageCleanup + } loadCfg "" redrawAll set currentFile ""