Toggle PYVCP panel visibility in axis

More
7 years 11 months ago #120043 by lars
Hello.

I have a small screen (1024x768) and the PYVCP panel in Axis can up take a lot of space. When using bigger GLADEVCP tabs (e.g. a camera view or probe panel) there is not enough space left and the tabs are cut off and only partially visible.

I think it would be a nice to be able to toggle the visibility of the PYVCP panel. I wrote a small patch that adds a keyboard shortcut ('e' because nearly every sensible key is already in use) to do just that. Unfortunately I did not find how to modify the menu in Axis so I could not add a menu entry and submit a proper pull request.

Here is the really small patch for the keyboard shortcut:
Code:
--- axis.orig 2018-06-18 23:26:11.000000000 +0200 +++ axis 2018-11-05 22:34:12.137464149 +0100 @@ -229,6 +229,7 @@ ("#", _("toggle Relative/Machine")), (_("Ctrl-Space"), _("Clear notifications")), (_("Alt-F, M, V"), _("Open a Menu")), + ("E", _("toggle PYVCP panel visibility")), ] @@ -2569,6 +2570,13 @@ else: commands.set_view_z() + def toggle_vcp_frame(*args): + if vcp_frame.winfo_ismapped(): + vcp_frame.grid_remove() + else: + vcp_frame.grid(row=0, column=4, rowspan=6, sticky="nw", padx=4, pady=4) + o.tkRedraw() + def axis_activated(*args): if not hal_present: return # this only makes sense if HAL is present on this machine comp['jog.x'] = vars.current_axis.get() == "x" @@ -3263,6 +3271,8 @@ f.grid(row=0, column=4, rowspan=6, sticky="nw", padx=4, pady=4) vcpparse.filename = vcp vcpparse.create_vcp(f, comp) + vcp_frame = f + root_window.bind("e", commands.toggle_vcp_frame) comp.ready() gladevcp = inifile.find("DISPLAY", "GLADEVCP")

I would appreciate it if someone could tell me where I can find the menu code. I grepped through the whole repository and did not match any menu strings.

Thanks a lot,
Lars

Please Log in to join the conversation.

More
7 years 11 months ago #120050 by lars
Found it in axis.tcl.

I will see if I can understand enough TCL to change this properly.

Please Log in to join the conversation.

More
7 years 7 months ago #127513 by pl7i92
you may think of filing a Git patch to get other users also a benefit of your work if i understand correctly you implemented this function

Please Log in to join the conversation.

More
7 years 7 months ago #127566 by phillc54
This feature does already exist in master branch.

Cheers, Phill

Please Log in to join the conversation.

More
7 years 7 months ago #127571 by pl7i92
that is Best to Know
If You work with it
Can you PLEASE write a wiki entrence of how to do it
wiki.linuxcnc.org

Please Log in to join the conversation.

More
7 years 7 months ago #127644 by phillc54
If you want to try master branch without removing your existing 2.7 installation then you could install a run in place version as described here , there is also a good step by step description here .
Running linuxcnc from a rip build installed as above can also be done by:
Code:
$ ~/linuxcnc-dev/scripts/linuxcnc ~/linuxcnc/configs/name_of_configuration/name_of_ini_file.ini
Or you could make a desktop launcher similar to:
Code:
[Desktop Entry] Version=1.0 Type=Application Terminal=true Exec=/home/username/linuxcnc-dev/scripts/linuxcnc /home/username/linuxcnc/configs/axis/axis_mm.ini Name=My CNC Machine Icon=/home/username/linuxcnc-dev/linuxcncicon.png

Another option is to install a precompiled package from the buildbot as described here . This option will remove your existing 2.7 version.

Cheers, Phill.

Please Log in to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum