# Menu with preferences
#
# Included in components/desktop/FVWM-Crystal_Functions
# The Music player and Audio mixer prefs menu appears into the Music button menu.  

DestroyMenu /Preferences
AddToMenu /Preferences
+ '%22x22/fvwm-crystal/user-desktop.png%$[gt.Used recipe]'		Popup /Preferences/Recipes
#+ '%22x22/fvwm-crystal/font.png%$[gt.Characters fonts]'		Popup /Preferences/Fonts
#+ '%22x22/fvwm-crystal/font.png%$[gt.Fonts sizes]'		Popup /Preferences/FontSizes
+ '%22x22/fvwm-crystal/font.png%$[gt.Characters fonts]'	Script scripts/FontSelector/FontSelector
+ '%22x22/fvwm-crystal/handles.png%$[gt.Handle width]'	Popup /Preferences/HandleWidth
Test (x xcompmgr) Test (x transset) + '%22x22/fvwm-crystal/fvwm-crystal.png%$[gt.Transparency]'		Popup /Preferences/Transparency
+ '%22x22/fvwm-crystal/utilities-terminal.png%$[gt.Default terminal]'	Popup /Preferences/DefaultTerminal
+ '%22x22/fvwm-crystal/utilities-terminal.png%$[gt.FvwmConsole terminal]'	Popup /Preferences/FvwmConsoleTerminal
+ '%22x22/fvwm-crystal/utilities-terminal.png%$[gt.QuakeConsole terminal]'	Popup /Preferences/QuakeConsoleTerminal
+ '%22x22/fvwm-crystal/system-file-manager.png%$[gt.Desktop manager]'	Popup /Preferences/DesktopManager
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.Notification area manager]'		Popup /preferences/NotificationAreaManager
+ "" Nop
+ '$[gt.Window focus policy]'	Popup /Preferences/FocusPolicy
+ '$[gt.Privileged terminals]'	Popup /Preferences/PrivilegedTerminals
+ "" Nop
+ '$[gt.Generate application menu]'	GenerateApplicationMenu
+ '$[gt.Silent operations]'	Popup /Preferences/SilentOps

#
# Used recipe
#
DestroyMenu /Preferences/Recipes
AddToMenu /Preferences/Recipes
+ MissingSubmenuFunction Recipes-generator
+ '%22x22/categories/directory.png%$[gt.System]' Popup $[FVWM_SYSTEMDIR]/recipes
Test (f $[FVWM_USERDIR]/recipes) + '%22x22/categories/directory.png%$[gt.User]' Popup $[FVWM_USERDIR]/recipes

DestroyFunc Recipes-generator
AddToFunc Recipes-generator
+ I DestroyMenu recreate $0
+ I AddToMenu $0
+ I PipeRead 'for i in $0/*; do \
  name=$(basename "${i}"); \
  echo \"AddToMenu $0 \'${name}\' Recipe-Set \'${i}\'\"; done'

DestroyFunc Recipe-Set
AddToFunc Recipe-Set
+ I InfoStoreAdd Fvwm_Crystal_Recipe "$*"
+ I SavePreferences LastChoosenRecipe "InfoStoreAdd Fvwm_Crystal_Recipe $*"
+ I Module FvwmForm Recipe-Restart-Dialog

All (Recipe-Restart-Dialog) Close
DestroyModuleConfig Recipe-Restart-Dialog: *
*Recipe-Restart-Dialog: Title "$[gt.Restart FVWM-Crystal]"
*Recipe-Restart-Dialog: Text "$[gt.New recipe will be used after next startup]"
*Recipe-Restart-Dialog: Line center
*Recipe-Restart-Dialog: Line center
*Recipe-Restart-Dialog: Button quit " $[gt.Restart] " ^M
*Recipe-Restart-Dialog: Command Restart
*Recipe-Restart-Dialog: Button quit " $[gt.Not now] " ^[
*Recipe-Restart-Dialog: Command Nop
*Recipe-Restart-Dialog: Line center

# Characters fonts, sizes and styles
# Deplaced in scripts/FontSelector/FontSelector
#
# Files that use them:
# decorations/* (theme files: use title_font and title_font_size)
# recipes/* (panel_font panel_font_size)
# components/styles/Menu (menu_font menu_font_size)
#
# Some good UTF-8 fonts are aqua_pfont, aquafont, AR PL Ukai, AR PL Uming, Bitstream Cyberbit,
# Dialog, Dialoginput, IPAGothic, IPAMincho, IPAPGothic, IPAPMincho, M+ 1c *, M+ 1m *, M+ 1mm *,
# M+ 1p, M+ 2c, M+ 2m, M+ 2p, MigMix, Migu, Monospaced, Ricty, Ricty Discord, SansSerif,
# Sazanami, Sazanami Gothic, Serif, TakaoExGothic, TakaoExMincho, TakaoGothic, TakaoMincho,
# TakaoPGothic, TakaoPMincho, UmePlus, unifont, VL Gothic, VL PGothic, WenQuanYi Micro Hey,
# WenQuanYi Micro Hey Mono.

#
# Handles width
#
DestroyMenu /Preferences/HandleWidth
AddToMenu /Preferences/HandleWidth
+ '1' MenuHandleWidth 1
+ '2' MenuHandleWidth 2
+ '3' MenuHandleWidth 3
+ '4' MenuHandleWidth 4
+ '5' MenuHandleWidth 5
+ '6' MenuHandleWidth 6
+ '7' MenuHandleWidth 7

DestroyFunc MenuHandleWidth
AddToFunc MenuHandleWidth
+ I Piperead 'echo InfoStoreAdd handle_width $0'
+ I SavePreferences HandleWidth "InfoStoreAdd handle_width $[0]"
+ I Style * HandleWidth $[0]


#
# Transparency
#
DestroyMenu /Preferences/Transparency
AddToMenu /Preferences/Transparency
+ '%22x22/fvwm-crystal/fvwm-crystal.png%$[gt.Start transparency]' Exec exec xcompmgr
+ '%22x22/fvwm-crystal/fvwm-crystal.png%$[gt.Stop transparency]' Exec exec killall -9 xcompmgr

#
# Default terminal
#
DestroyMenu /Preferences/DefaultTerminal
AddToMenu /Preferences/DefaultTerminal
Test (x gnome-terminal) + '%22x22/apps/gnome-terminal.png%GNOME Terminal' SelectDefaultTerminal gnome-terminal
Test (x multi-gnome-terminal) + '%22x22/apps/multi-gnome-terminal.png%Multi GNOME Terminal' SelectDefaultTerminal multi-gnome-terminal
Test (x xfce4-terminal) + '%22x22/apps/xfce4-terminal.png%XFCE4 Terminal'	SelectDefaultTerminal xfce4-terminal
Test (x terminator) + '%22x22/apps/terminator.png%Terminator'	SelectDefaultTerminal terminator
Test (x mrxvt) + '%22x22/apps/mrxvt.png%MRxvt'	SelectDefaultTerminal mrxvt
Test (x urxvt) + '%22x22/apps/urxvt.png%URxvt'	SelectDefaultTerminal urxvt
Test (x aterm) + '%22x22/apps/aterm.png%Aterm'	SelectDefaultTerminal aterm
Test (x Eterm) + '%22x22/apps/Eterm.png%Eterm'	SelectDefaultTerminal Eterm
Test (x xterm) + '%22x22/apps/xterm.png%XTerm'	SelectDefaultTerminal xterm

DestroyFunc SelectDefaultTerminal
AddToFunc SelectDefaultTerminal
+ I FindCommand DefaultTerminal $0 terminator urxvt Eterm aterm mrxvt xterm gnome-terminal konsole xfce4-terminal
+ I SavePreferences DefaultTerminal "FindCommand DefaultTerminal $0 terminator urxvt Eterm aterm mrxvt xterm gnome-terminal konsole xfce4-terminal"

#
# MiniConsole terminal
#
DestroyMenu /Preferences/FvwmConsoleTerminal
AddToMenu /Preferences/FvwmConsoleTerminal
Test (x mrxvt) + '%22x22/apps/mrxvt.png%MRxvt'	SelectFvwmConsoleTerminal mrxvt
Test (x urxvt) + '%22x22/apps/urxvt.png%URxvt'	SelectFvwmConsoleTerminal urxvt
Test (x aterm) + '%22x22/apps/aterm.png%Aterm'	SelectFvwmConsoleTerminal aterm
Test (x xterm) + '%22x22/apps/xterm.png%XTerm'	SelectFvwmConsoleTerminal xterm

DestroyFunc SelectFvwmConsoleTerminal
AddToFunc SelectFvwmConsoleTerminal
+ I FindCommand FvwmConsoleTerminal $0 mrxvt urxvt aterm xterm
+ I SavePreferences FvwmConsoleTerminal "FindCommand FvwmConsoleTerminal $0 mrxvt urxvt aterm xterm"

#
# QuakeConsole terminal
#
DestroyMenu /Preferences/QuakeConsoleTerminal
AddToMenu /Preferences/QuakeConsoleTerminal
Test (x mrxvt) + '%22x22/apps/mrxvt.png%MRxvt'	SelectQuakeConsoleTerminal mrxvt
Test (x urxvt) + '%22x22/apps/urxvt.png%URxvt'	SelectQuakeConsoleTerminal urxvt
Test (x aterm) + '%22x22/apps/aterm.png%Aterm'	SelectQuakeConsoleTerminal aterm
Test (x xterm) + '%22x22/apps/xterm.png%XTerm'	SelectQuakeConsoleTerminal xterm

DestroyFunc SelectQuakeConsoleTerminal
AddToFunc SelectQuakeConsoleTerminal
+ I FindCommand QuakeConsoleTerminal $0 mrxvt urxvt aterm xterm
+ I SavePreferences QuakeConsoleTerminal "FindCommand QuakeConsoleTerminal $0 mrxvt urxvt aterm xterm"

#
# Desktop manager
#
DestroyMenu /Preferences/DesktopManager
AddToMenu /Preferences/DesktopManager
+ '$[gt.None]' ActivateDesktopManager-None
Test (x thunar) + '%22x22/apps/thunar.png%Thunar' ActivateDesktopManager-Thunar
+ "" Nop
Test (x rox) + '%22x22/apps/rox.png%ROX-Filer' ActivateDesktopManager-ROX
Test (x nautilus) + '%22x22/apps/nautilus.png%Nautilus' ActivateDesktopManager-Nautilus

DestroyFunc ActivateDesktopManager-None
AddToFunc ActivateDesktopManager-None
+ I SavePreferences DefaultDesktopManager "LoadPreferences LastChoosenWallpaper"
Test (!EnvIsSet SESSION_MANAGER) + I Module FvwmForm DesktopManager-Dialog
Test (EnvIsSet SESSION_MANAGER) + I Module FvwmForm DesktopManager-SM-Dialog

DestroyFunc ActivateDesktopManager-Thunar
AddToFunc ActivateDesktopManager-Thunar
+ I SavePreferences DefaultDesktopManager "Include components/apps/Thunar"
Test (!EnvIsSet SESSION_MANAGER) + I Module FvwmForm DesktopManager-Dialog
Test (EnvIsSet SESSION_MANAGER) + I Module FvwmForm DesktopManager-SM-Dialog

DestroyFunc ActivateDesktopManager-ROX
AddToFunc ActivateDesktopManager-ROX
+ I SavePreferences DefaultDesktopManager "Include components/apps/ROX-Filer"
Test (!EnvIsSet SESSION_MANAGER) + I Module FvwmForm DesktopManager-Dialog
Test (EnvIsSet SESSION_MANAGER) + I Module FvwmForm DesktopManager-SM-Dialog

DestroyFunc ActivateDesktopManager-Nautilus
AddToFunc ActivateDesktopManager-Nautilus
+ I SavePreferences DefaultDesktopManager "Include components/apps/Nautilus"
Test (!EnvIsSet SESSION_MANAGER) + I Module FvwmForm DesktopManager-Dialog
Test (EnvIsSet SESSION_MANAGER) + I Module FvwmForm DesktopManager-SM-Dialog

All (DesktopManager-Dialog) Close
DestroyModuleConfig DesktopManager-Dialog: *
*DesktopManager-Dialog: Title "$[gt.Changed desktop manager]"
*DesktopManager-Dialog: Text "$[gt.Selected desktop manager will be used]"
*DesktopManager-Dialog: Line center
*DesktopManager-Dialog: Text "$[gt.at the next start of your X session]"
*DesktopManager-Dialog: Line center
*DesktopManager-Dialog: Line center
*DesktopManager-Dialog: Button quit " $[gt.Logout] " ^M
*DesktopManager-Dialog: Command Quit
*DesktopManager-Dialog: Button quit " $[gt.Not now] " ^[
*DesktopManager-Dialog: Command Nop
*DesktopManager-Dialog: Line center

All (DesktopManager-SM-Dialog) Close
DestroyModuleConfig DesktopManager-SM-Dialog: *
*DesktopManager-SM-Dialog: Title "$[gt.Changed desktop manager]"
*DesktopManager-SM-Dialog: Text "$[gt.Selected desktop manager will be used]"
*DesktopManager-SM-Dialog: Line center
*DesktopManager-SM-Dialog: Text "$[gt.at the next start of your X session]"
*DesktopManager-SM-Dialog: Line center
*DesktopManager-SM-Dialog: Line center
*DesktopManager-SM-Dialog: Button quit " $[gt.Logout] " ^M
*DesktopManager-SM-Dialog: Command QuitSession
*DesktopManager-SM-Dialog: Button quit " $[gt.Not now] " ^[
*DesktopManager-SM-Dialog: Command Nop
*DesktopManager-SM-Dialog: Line center

#
# Notification Area Application
#
DestroyMenu /Preferences/NotificationAreaManager
AddToMenu /Preferences/NotificationAreaManager
Test (x trayer)		+ '%22x22/apps/trayer.png%Trayer' SelectNotificationAreaManager trayer
Test (x stalonetray)	+ '%22x22/apps/stalonetray.png%StaloneTray' SelectNotificationAreaManager stalonetray
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.No notification area]' NotificationAreaWidth 0
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.1 icon width]' NotificationAreaWidth 1
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.2 icons width]' NotificationAreaWidth 2
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.3 icons width]' NotificationAreaWidth 3
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.4 icons width]' NotificationAreaWidth 4
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.5 icons width]' NotificationAreaWidth 5
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.6 icons width]' NotificationAreaWidth 6
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.7 icons width]' NotificationAreaWidth 7
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.8 icons width]' NotificationAreaWidth 8
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.9 icons width]' NotificationAreaWidth 9
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.12 icons width]' NotificationAreaWidth 12
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.15 icons width]' NotificationAreaWidth 15
+ '%22x22/fvwm-crystal/trayer-app.png%$[gt.20 icons width]' NotificationAreaWidth 20


DestroyFunc SelectNotificationAreaManager
AddToFunc SelectNotificationAreaManager
+ I FindCommand NotificationAreaManager $0 trayer stalonetray
+ I SavePreferences NotificationAreaManager "FindCommand NotificationAreaManager $0 trayer stalonetray"
+ I Module FvwmForm NotificationAreaManager-Dialog

All (NotificationAreaManager-Dialog) Close
DestroyModuleConfig NotificationAreaManager-Dialog: *
*NotificationAreaManager-Dialog: Title "$[gt.Restart FVWM-Crystal]"
*NotificationAreaManager-Dialog: Text "$[gt.New notification area setting will be used after next startup]"
*NotificationAreaManager-Dialog: Line center
*NotificationAreaManager-Dialog: Line center
*NotificationAreaManager-Dialog: Button quit " $[gt.Restart] " ^M
*NotificationAreaManager-Dialog: Command Restart
*NotificationAreaManager-Dialog: Button quit " $[gt.Not now] " ^[
*NotificationAreaManager-Dialog: Command Nop
*NotificationAreaManager-Dialog: Line center

DestroyFunc NotificationAreaWidth
AddToFunc NotificationAreaWidth
+ I FindCommand NotificationArea-Width $0 2 3 4 5 6 7 8 9
+ I Piperead `echo SetEnv trayer_width $(($0*24))`
+ I SavePreferences NotificationArea-Width "SetEnv trayer_width $[trayer_width]"
+ I Module FvwmForm NotificationAreaManager-Dialog

#
# Music player
#
DestroyMenu /Preferences/MusicPlayer
AddToMenu /Preferences/MusicPlayer
Test (x alsaplayer)	+ '%22x22/apps/alsaplayer.png%Alsaplayer'	SelectMusicPlayer alsaplayer
Test (x mpc)		+ '%22x22/apps/gmpc.png%MPD'		SelectMusicPlayer mpd
Test (x quodlibet)	+ '%22x22/apps/quodlibet.png%Quod Libet'	SelectMusicPlayer quodlibet
Test (x xmms-shell) 	+ '%22x22/apps/xmms.png%XMMS'	SelectMusicPlayer xmms
Test (x xmms2) 		+ '%22x22/apps/xmms2.png%XMMS2'	SelectMusicPlayer xmms2
Test (x cmus-remote)	+ '%22x22/apps/cmus.png%C Music Player' SelectMusicPlayer cmus
Test (x cdcd) 		+ '%22x22/apps/goobox.png%cdcd'	SelectMusicPlayer cdcd
Test (x mocp) 		+ '%22x22/apps/mocp.png%Music On Console' SelectMusicPlayer mocp
Test (x audacious) 	+ '%22x22/apps/audacious.png%Audacious' SelectMusicPlayer audacious
Test (x mplayer) 	+ '%22x22/apps/mplayer.png%MPlayer' SelectMusicPlayer mplayer
Test (x mplayer2) 	+ '%22x22/apps/mplayer.png%MPlayer2' SelectMusicPlayer mplayer2

DestroyFunc SelectMusicPlayer
AddToFunc SelectMusicPlayer
+ I FindCommand MusicPlayer $0 alsaplayer mpd quodlibet audacious xmms xmm2 cmus mocp cdcd mplayer mplayer2
+ I Include components/functions/Music-$[infostore.MusicPlayer]
+ I SavePreferences DefaultMusicPlayer "InfoStoreAdd MusicPlayer $[infostore.MusicPlayer]"

#
# Mplayer DBD channels list
#
DestroyMenu /Preferences/MplayerChannelList
AddToMenu /Preferences/MplayerChannelList
Test (F /dev/dvb/adapter0/frontend0) + '%22x22/apps/mplayer.png%DVB 1' Module FvwmForm SelectChannelList-Dialog CARD=1
Test (F /dev/dvb/adapter1/frontend0) + '%22x22/apps/mplayer.png%DVB 2' Module FvwmForm SelectChannelList-Dialog CARD=2
Test (F /dev/dvb/adapter2/frontend0) + '%22x22/apps/mplayer.png%DVB 3' Module FvwmForm SelectChannelList-Dialog CARD=3
Test (F /dev/dvb/adapter3/frontend0) + '%22x22/apps/mplayer.png%DVB 4' Module FvwmForm SelectChannelList-Dialog CARD=4

DestroyFunc SelectMplayerChannelList
AddToFunc SelectMplayerChannelList
+ I SavePreferences MplayerChannelList$[0] "InfoStoreAdd MplayerChannelList$[0] '$[1]'"
+ I InfoStoreAdd MplayerChannelList$[0] '$[1]'

All (SelectChannelList-Dialog) Close
DestroyModuleConfig Module SelectChannelList-Dialog: *
*SelectChannelList-Dialog: Title "$[gt.Select channel list]"
*SelectChannelList-Dialog: Text "$[gt.Enter the name of the channel list for the DVB input] $CARD"
*SelectChannelList-Dialog: Line center
*SelectChannelList-Dialog: Line center
PipeRead 'echo "*SelectChannelList-Dialog: Text \\"$[gt.It must be in] /home/$(id -un)/.mplayer/\\""'
*SelectChannelList-Dialog: Line center
*SelectChannelList-Dialog: Line center
PipeRead 'echo "*SelectChannelList-Dialog: Input file 40 \\"/home/$(id -un)/.mplayer/channels.conf\\""'
*SelectChannelList-Dialog: Line center
*SelectChannelList-Dialog: Line center
*SelectChannelList-Dialog: Button quit " $[gt.Save] " ^M
*SelectChannelList-Dialog: Command SelectMplayerChannelList $CARD "$(file)"
*SelectChannelList-Dialog: Button quit " $[gt.No] " ^[
*SelectChannelList-Dialog: Command Nop
*SelectChannelList-Dialog: Line center

#
# Audio mixer
#
DestroyMenu /Preferences/Mixer
AddToMenu /Preferences/Mixer
Test (x amixer)		+ '%22x22/apps/alsamixer.png%ALSA Mixer' SelectMixer amixer
Test (x aumix) 		+ '%22x22/apps/aumix.png%Aumix'	SelectMixer aumix
			+ "" Nop
Test (x mpc)		+ '%22x22/apps/gmpc.png%MPD'		SelectMixer mpd
Test (x quodlibet)	+ '%22x22/apps/quodlibet.png%Quod Libet'	SelectMixer quodlibet
Test (x xmms-shell) 	+ '%22x22/apps/xmms.png%XMMS'	SelectMixer xmms
Test (x xmms2) 		+ '%22x22/apps/xmms2.png%XMMS2'	SelectMixer xmms2
Test (x cmus-remote)	+ '%22x22/apps/cmus.png%C Music Player' SelectMixer cmus
Test (x cdcd) 		+ '%22x22/apps/goobox.png%cdcd'	SelectMixer cdcd
Test (x audacious) 	+ '%22x22/apps/audacious.png%Audacious'	SelectMixer audacious
			+ "" Nop
PipeRead `for i in $(sed -e 's/\\([0-9]*\\).*/\\1/' -e 's/^0//' < /proc/asound/pcm | uniq); \
	    do echo "+ '%22x22/apps/alsamixer.png%Sound Card $i' SelectSoundCard '$i'" ; done`

DestroyFunc SelectMixer
AddToFunc SelectMixer
+ I FindCommand DefaultMixer $0 amixer aumix mpd quodlibet audacious xmms xmms2 cmus cdcd
+ I SavePreferences DefaultMixer "InfoStoreAdd Mixer $[infostore.DefaultMixer]"
+ I PipeRead `echo InfoStoreAdd Mixer $[infostore.DefaultMixer]`
+ I Include components/functions/Mixer

DestroyFunc SelectSoundCard
AddToFunc SelectSoundCard
#+ I FindCommand SoundCard $0 0 1 2 3 4 5 6 7
+ I SavePreferences DefaultSoundCard "InfoStoreAdd SoundCard $0"
+ I PipeRead `echo InfoStoreAdd SoundCard $0`
+ I Include components/functions/Mixer

#
# Window focus policy
#
DestroyMenu /Preferences/FocusPolicy
AddToMenu /Preferences/FocusPolicy
+ 'Amiga'			ActivateFocusPolicy-Amiga
+ 'FVWM-Crystal'		ActivateFocusPolicy-FVWM-Crystal
+ 'FVWM-Crystal with raise'	ActivateFocusPolicy-FVWM-Crystal-Raise
+ 'MS Windows'			ActivateFocusPolicy-MSWindows

DestroyFunc ActivateFocusPolicy-Amiga
AddToFunc ActivateFocusPolicy-Amiga
+ I Include components/styles/FocusPolicy-Amiga
+ I SavePreferences DefaultFocusPolicy "Include components/styles/FocusPolicy-Amiga"

DestroyFunc ActivateFocusPolicy-FVWM-Crystal
AddToFunc ActivateFocusPolicy-FVWM-Crystal
+ I Include components/styles/FocusPolicy-FVWM-Crystal
+ I SavePreferences DefaultFocusPolicy "Include components/styles/FocusPolicy-FVWM-Crystal"

DestroyFunc ActivateFocusPolicy-FVWM-Crystal-Raise
AddToFunc ActivateFocusPolicy-FVWM-Crystal-Raise
+ I Include components/styles/FocusPolicy-FVWM-Crystal-Raise
+ I SavePreferences DefaultFocusPolicy "Include components/styles/FocusPolicy-FVWM-Crystal-Raise"

DestroyFunc ActivateFocusPolicy-MSWindows
AddToFunc ActivateFocusPolicy-MSWindows
+ I Include components/styles/FocusPolicy-MSWindows
+ I SavePreferences DefaultFocusPolicy "Include components/styles/FocusPolicy-MSWindows"

#
# Privileged terminals
#
DestroyMenu /Preferences/PrivilegedTerminals
AddToMenu /Preferences/PrivilegedTerminals
+ '$[gt.On]'	SetPrivilegedTerminals
+ '$[gt.Off]'	UnsetPrivilegedTerminals

DestroyFunc SetPrivilegedTerminals
AddToFunc SetPrivilegedTerminals
+ I SavePreferences PrivilegedTerminals "Style XTerm FPOverrideGrabFocus"
+ I Schedule 333 AppendPreferences PrivilegedTerminals "Style URxvt FPOverrideGrabFocus"
+ I Schedule 666 AppendPreferences PrivilegedTerminals "Style Eterm FPOverrideGrabFocus"
+ I Schedule 1000 LoadPreferences PrivilegedTerminals

DestroyFunc UnsetPrivilegedTerminals
AddToFunc UnsetPrivilegedTerminals
+ I SavePreferences PrivilegedTerminals "Style XTerm !FPOverrideGrabFocus"
+ I Schedule 333 AppendPreferences PrivilegedTerminals "Style URxvt !FPOverrideGrabFocus"
+ I Schedule 666 AppendPreferences PrivilegedTerminals "Style Eterm !FPOverrideGrabFocus"
+ I Schedule 1000 LoadPreferences PrivilegedTerminals

#
# Application menu
#
DestroyFunc GenerateApplicationMenu
AddToFunc GenerateApplicationMenu
+ I A fvwm-crystal.generate-menu $[FVWM_SYSTEMDIR] $[FVWM_USERDIR]

All (Menu-Restart-Dialog) Close
DestroyModuleConfig Menu-Restart-Dialog: *
*Menu-Restart-Dialog: Title "$[gt.Restart FVWM-Crystal]"
*Menu-Restart-Dialog: Text "$[gt.New menu entries will be used after next startup]"
*Menu-Restart-Dialog: Line center
*Menu-Restart-Dialog: Line center
*Menu-Restart-Dialog: Button quit " $[gt.Restart] " ^M
*Menu-Restart-Dialog: Command Restart
*Menu-Restart-Dialog: Button quit " $[gt.Not now] " ^[
*Menu-Restart-Dialog: Command Nop
*Menu-Restart-Dialog: Line center

DestroyFunc Pref-Warning
AddToFunc Pref-Warning
+ I All (Pref-Warning-Dialog) Close
+ I DestroyModuleConfig Pref-Warning-Dialog: *
+ I *Pref-Warning-Dialog: Title "$[gt.Preference Warning]"
+ I *Pref-Warning-Dialog: Text "$[gt.Please edit the following file to suit your need]"
+ I *Pref-Warning-Dialog: Text "$[gt.and restart this tool:]"
+ I *Pref-Warning-Dialog: Text "$[*]"
+ I *Pref-Warning-Dialog: Line center
+ I *Pref-Warning-Dialog: Line center
+ I *Pref-Warning-Dialog: Button quit " $[gt.OK] " ^[
+ I *Pref-Warning-Dialog: Command Nop
+ I *Pref-Warning-Dialog: Line center
+ I Module FvwmForm Pref-Warning-Dialog

#
# Silent operations
#

DestroyMenu /Preferences/SilentOps
AddToMenu /Preferences/SilentOps
+ '$[gt.On]'	SetSilentOps
+ '$[gt.Off]'	UnsetSilentOps

DestroyFunc SetSilentOps
AddToFunc SetSilentOps
+ I SavePreferences SilentOps "InfoStoreAdd SILENT \'2>/dev/null\'"
+ I Schedule 333 Include components/functions/Exec-Accelerator

DestroyFunc UnsetSilentOps
AddToFunc UnsetSilentOps
+ I SavePreferences SilentOps "InfoStoreAdd SILENT \' \'"
+ I Schedule 333 Include components/functions/Exec-Accelerator

# vim:ft=fvwm
