Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions docs/src/gui/gladevcp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,25 @@ POSTGUI_HALFILE = ./manual-example.hal
# gladevcp Demo specific Oword subs live here
SUBROUTINE_PATH = ../../nc_files/gladevcp_lib
----
The HAL component name of a GladeVCP application started with the GLADEVCP option is fixed: +gladevcp+.
The default HAL component name of a GladeVCP application started with the GLADEVCP option is: +gladevcp+.

The command line actually run by Axis in the above configuration is as follows:

halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -x {XID} <arguments to GLADEVCP>
halcmd loadusr -Wn gladevcp gladevcp -c gladevcp -x {XID} -u ./hitcounter.py ./manual-example.ui

You may add arbitrary gladevcp options here, as long as they dont collide with
the above command line options.

It is possible to create a custom HAL component name by adding the +-c+ option:
[source,{ini}]
----
[DISPLAY]
# add GladeVCP panel where PyVCP used to live:
GLADEVCP= -c example -u ./hitcounter.py ./manual-example.ui
----
The command line actually run by Axis for the above is:

This means you may add arbitrary gladevcp options here, as long as
they dont collide with the above command line options.
halcmd loadusr -Wn example gladevcp -c example -x {XID} -u ./hitcounter.py ./manual-example.ui

[NOTE]
The file specifiers like ./hitcounter.py, ./manual-example.ui, etc. indicate that the files
Expand Down
14 changes: 10 additions & 4 deletions src/emc/usr_intf/axis/scripts/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3845,13 +3845,19 @@ def select_run_from(e):
def load_gladevcp_panel():
gladevcp = inifile.find("DISPLAY", "GLADEVCP")
if gladevcp:
gladecmd = gladevcp.split()
if '-c' in gladecmd:
gladename = gladecmd[gladecmd.index('-c') + 1]
del gladecmd[gladecmd.index('-c') + 1]
del gladecmd[gladecmd.index('-c')]
else:
gladename = 'gladevcp'
from subprocess import Popen

xid = gladevcp_frame.winfo_id()
cmd = "halcmd loadusr -Wn gladevcp gladevcp -c gladevcp".split()
cmd += ['-x', str(xid)] + gladevcp.split()
cmd = "halcmd loadusr -Wn {0} gladevcp -c {0}".format(gladename).split()
cmd += ['-x', str(xid)] + gladecmd
child = Popen(cmd)
_dynamic_childs['gladevcp'] = (child, cmd, True)
_dynamic_childs['{}'.format(gladename)] = (child, cmd, True)

notifications = Notification(root_window)

Expand Down