add tabs ctx menu `open term in sim directory`

This commit is contained in:
stefan schippers 2023-10-25 16:28:10 +02:00
parent b31358a468
commit 27488a1020
2 changed files with 13 additions and 7 deletions

View File

@ -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

View File

@ -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