news
About Elegant Chaos
info
About me and my friends
people
Software from Elegant Chaos
software
Other stuff...
stuff

DL_UpdateFlag

Revision
Revised on

Description


Code

function DL_UpdateFlag flag,mItem,enabled,stackName
  if stackName is empty then
    put the short name of this stack into stackName
  end if
  
  -- get current state of the backup flag in the stack script
  put DL_Flag(flag,stackName) into current
  
  -- change state if the enabled parameter was set
  if enabled is not empty then
    if enabled is "toggle" then
      put not current into current
    else
      put enabled into current
    end if
    
    DL_SetFlag flag,stackName,flags
  end if
  
  DL_UpdateFlagMenu mItem,current
  
  return current
  
end DL_UpdateFlag