From 27488a10207a7fd120d63d037573832d201d6d3a Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Wed, 25 Oct 2023 16:28:10 +0200 Subject: [PATCH] add tabs ctx menu `open term in sim directory` --- src/resources.tcl | 9 +++------ src/xschem.tcl | 11 ++++++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/resources.tcl b/src/resources.tcl index 904bf9f3..4bec3205 100644 --- a/src/resources.tcl +++ b/src/resources.tcl @@ -575,12 +575,9 @@ eziIgKTpgaABbKeu14fyfmGMAs2ZHpRCADs= image create photo CtxmenuTerm CtxmenuTerm put " -R0lGODlhEAAQAPUAAAAAADExMTIyMjMzMzQ0NDU1NTw8PD09PUJCQk9PT3x8fIeHh42NjZCQkKmp -qaqqqqurq7W1tba2tri4uMbGxsjIyMnJycrKyszMzM3Nzc/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW -1tfX1+zs7PT09P7+/v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACcALAAAAAAQABAAAAZzwIfw -AYEMj0dJ5bOsaCrO5kfyqIyu2CyW8jAAvuAw2PAQABIKhnq9BgjK4M5pTj+ZAAX493El1e9vZggT -YX9ucCYmDQsLD4ZvBQAmdZSADwGSlI+ImnSWmAtsogyHXmKnAAYQVlqtIxoQEkxQUR0UHbQSQQA7 +R0lGODlhEAAQAPMAAAAAACIiIjAwMHR0dHh4eHx8fOXl5ejo6O/v7/f39wAAAAAAAAAAAAAAAAAA +AAAAACH5BAEAAAoALAAAAAAQABAAAAQ+UMlJq731mM07PwcgjmRpAEWqriqgoNhUAOcwItd8EkIg +JDkaLKbQDWPGArEoVBKTrOgsVKqOFBqP1nBYViIAOw== " image create photo CtxmenuSymbol diff --git a/src/xschem.tcl b/src/xschem.tcl index b466ceaf..7f81a482 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -5587,6 +5587,11 @@ proc tab_ctx_cmd {tab_but what} { cd [file dirname $filename] execute 0 $terminal cd $save + } elseif {$what eq {simterm}} { + set save [pwd] + cd $netlist_dir + execute 0 $terminal + cd $save } elseif {$what eq {edit}} { eval execute 0 $editor $filename } elseif {$what eq {netlist}} { @@ -5658,9 +5663,12 @@ proc tab_context_menu {tab_but} { button .ctxmenu.b2 -text {Open directory} -padx 3 -pady 0 -anchor w -activebackground grey50 \ -highlightthickness 0 -image CtxmenuOpendir -compound left \ -font [subst $font] -command "set retval 2; tab_ctx_cmd $tab_but dir; destroy .ctxmenu" - button .ctxmenu.b3 -text {Open terminal} -padx 3 -pady 0 -anchor w -activebackground grey50 \ + button .ctxmenu.b3 -text {Open circuit dir term.} -padx 3 -pady 0 -anchor w -activebackground grey50 \ -highlightthickness 0 -image CtxmenuTerm -compound left \ -font [subst $font] -command "set retval 3; tab_ctx_cmd $tab_but term; destroy .ctxmenu" + button .ctxmenu.b8 -text {Open sim. dir term.} -padx 3 -pady 0 -anchor w -activebackground grey50 \ + -highlightthickness 0 -image CtxmenuTerm -compound left \ + -font [subst $font] -command "set retval 3; tab_ctx_cmd $tab_but simterm; destroy .ctxmenu" button .ctxmenu.b4 -text {Edit file} -padx 3 -pady 0 -anchor w -activebackground grey50 \ -highlightthickness 0 -image CtxmenuEdit -compound left \ -font [subst $font] -command "set retval 4; tab_ctx_cmd $tab_but edit; destroy .ctxmenu" @@ -5687,6 +5695,7 @@ proc tab_context_menu {tab_but} { pack .ctxmenu.b1 -fill x -expand true pack .ctxmenu.b2 -fill x -expand true pack .ctxmenu.b3 -fill x -expand true + pack .ctxmenu.b8 -fill x -expand true pack .ctxmenu.b4 -fill x -expand true if {$counterpart ne {}} { pack .ctxmenu.b6 -fill x -expand true