@@ -184,7 +184,8 @@ def __init__(self, argv):
184184 self .error_channel .poll ()
185185
186186 # set INI path for INI info class before widgets are loaded
187- INFO = Info (ini = argv [2 ])
187+ self .INFO = Info (ini = argv [2 ])
188+ self .ACTION = Action ()
188189
189190 self .builder = Gtk .Builder ()
190191 # translation of the glade file will be done with
@@ -1353,7 +1354,17 @@ def _make_joints_button(self):
13531354
13541355 # call INI macro (from hal_glib message)
13551356 def request_macro_call (self , data ):
1357+ # if MDI command change to MDI and run
1358+ cmd = self .INFO .get_ini_mdi_command (data )
1359+ print ('MDI command:' ,data ,cmd )
1360+ if not cmd is None :
1361+ self .ACTION .RECORD_CURRENT_MODE ()
1362+ LOG .debug ("INI MDI COMMAND #: {} = {}" .format (data , cmd ))
1363+ self .ACTION .CALL_INI_MDI (data )
1364+ self .ACTION .RESTORE_RECORDED_MODE ()
1365+ return
13561366
1367+ # run Macros
13571368 # some error checking
13581369 if not self .GSTAT .is_mdi_mode ():
13591370 message = _ ("You must be in MDI mode to run macros" )
@@ -6470,6 +6481,7 @@ def __setitem__(self, item, value):
64706481 # Some of these libraries log when imported so logging level must already be set.
64716482 import gladevcp .makepins
64726483 from gladevcp .core import Info , Status
6484+ from gladevcp .core import Info , Status , Action
64736485 from gladevcp .combi_dro import Combi_DRO # we will need it to make the DRO
64746486 from gmoccapy import widgets # a class to handle the widgets
64756487
0 commit comments