# FVWM-Crystal - ApplicationPanel
# Written by: Maciej Delmanowski <harnir@linux.net.pl>

# Default name, just in case it hasn't been set
SetEnv DesktopLayout-Name "1.0"

DestroyFunc Generate-Applications
AddToFunc Generate-Applications
#+ I Test (f $[FVWM_USERDIR]/user-preferences/ApplicationPanels/$[DesktopLayout-Name]) Break
+ I Exec exec mkdir -p $[FVWM_USERDIR]/user-preferences/ApplicationPanels
+ I PipeRead 'fvwm-crystal.apps $[ApplicationPanel-Command] -m $[FVWM_CONFIGDIR]/ApplicationDatabase -u $[FVWM_USERDIR]/user-preferences/ApplicationDatabase -o $[FVWM_USERDIR]/user-preferences/ApplicationPanels/$[DesktopLayout-Name] && echo "Application-Panel-Reload"'

DestroyFunc Find-Applications
AddToFunc Find-Applications
+ I Exec exec mkdir -p $[FVWM_USERDIR]/user-preferences/ApplicationPanels
+ I PipeRead 'fvwm-crystal.apps $[ApplicationPanel-Command] -m $[FVWM_CONFIGDIR]/ApplicationDatabase -u $[FVWM_USERDIR]/user-preferences/ApplicationDatabase -o $[FVWM_USERDIR]/user-preferences/ApplicationPanels/$[DesktopLayout-Name] && echo "Application-Panel-Reload"'

DestroyFunc Read-Applications
AddToFunc Read-Applications
+ I Test (f $[FVWM_USERDIR]/user-preferences/ApplicationPanels/$[DesktopLayout-Name]) Read $[FVWM_USERDIR]/user-preferences/ApplicationPanels/$[DesktopLayout-Name]
+ I TestRc (NoMatch) *ApplicationPanel: (1x1, Size 22 22, Icon "defaulticon.png", Action Find-Applications)

