%
% mediacenter, anyremote configuration file. (Server-mode)
%

% STATUS stable
% XTEST no
% SOUND no
% ENV no

GuiAppName=Mediacenter
GuiAppType=Application
GuiAppBinary=true
GuiAppProtocols=Server
GuiAppDesc=Configuration file with basic mediacenter functionality.

[Protocol]=Server

%    Make(var,mediacenter_audio_backend,by_value,);\
%    Make(var,mediacenter_video_backend,by_value,);\
%    Make(var,mediacenter_pix_backend,by_value,);\
%    Make(var,mediacenter_presentation_backend,by_value,);\
%

(Init)=\
    Include($(CfgDir)/Utils/aliases-server.cfg);\
    Macro(SETUP_DEFAULT_POWER_MANAGEMENT);\
    Macro(TEST_IMAGEMAGIC);\
    Make(var,cover_force,by_value,);\
    Make(var,cover_index,by_value,1);\
    Make(var,cover_size,by_value,64);\
    Make(var,mediacenter_weather_location,by_value,);\
    Make(var,mediacenter_audio_backend,$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_audio_backend);\
    Make(var,mediacenter_video_backend,$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_video_backend);\
    Make(var,mediacenter_pix_backend,$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_pix_backend);\
    Make(var,mediacenter_presentation_backend,$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_presentation_backend);\
    Make(var,mediacenter_activity,\
         V=`$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_activity`;\
         if [ "x$V" = "x" ]; then echo "setup"; else echo $V; fi);

(Exit)=\
    Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set mediacenter_activity $(mediacenter_activity));

(Connect)=\
    Make(mode,mediacenter_chooser);

MEDIACENTER_MENU=\
    Set(menu,add,Mediacenter);

MEDIACENTER_CALLBACK=\
    Set(popup,show,Loading...);\
    Macro(APP_QUIT);\
    Make(flush);\
    Include($(CfgDir)/Server-mode/mediacenter.cfg);\
    Macro((Init));\
    Macro((Connect));\
    Set(popup,hide);\
    Make(mode,mediacenter_chooser)

Mediacenter=\
    Macro(MEDIACENTER_CALLBACK);

Mediacenter($$)=\
    Macro(MEDIACENTER_CALLBACK);

SET_WEATHER_LOCATION=\
    Make(var,mediacenter_weather_location,$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_weather_location);

[Mode]=mediacenter_chooser

(EnterMode)=\
    Set(status,);\
    Set(layout,7x1,choose,3,ticker);\
    Set(icons,Mediacenter,\
        1,rewind,2,stop,3,forward,4,none,5,none,6,none,7,none);\
    Get(cover_size);\
    Get(is_exists,cover,cover-audio);\
    Get(is_exists,cover,cover-computer);\
    Get(is_exists,cover,cover-files);\
    Get(is_exists,cover,cover-pix);\
    Get(is_exists,cover,cover-presentation);\
    Get(is_exists,cover,cover-setup);\
    Get(is_exists,cover,cover-video);\
    Get(is_exists,cover,cover-weather);\
    Macro(MEDIA_LAYOUT);\
    Macro(SET_MENU);

%    Get(is_exists,cover,cover-audio);\
%    Set(layout,7x1,choose,3,ticker,up,NEXT_ACTIVITY,down,PREV_ACTIVITY);\

SET_MENU=\
    Set(menu,replace,Help);

Help=Set(text,replace,Help,Choose what You want);

Back=\
    Set(text,close);
    
CoverExists($$)=\
    Make(none);

CoverSize($$)=\
    Make(var,cover_size,by_value,$(Index));

CoverNotExists(cover-audio)=\
    Set(popup,show,Loading cover (1) ...);\
    Make(var,cover_name,by_value,cover-audio);\
    Macro(MEDIA_COVER_GEN);\
    Set(popup,hide);

CoverNotExists(cover-computer)=\
    Set(popup,show,Loading cover (2) ... );\
    Make(var,cover_name,by_value,cover-computer);\
    Macro(MEDIA_COVER_GEN);\
    Set(popup,hide);

CoverNotExists(cover-files)=\
    Set(popup,show,Loading cover (3) ...);\
    Make(var,cover_name,by_value,cover-files);\
    Macro(MEDIA_COVER_GEN);\
    Set(popup,hide);
    
CoverNotExists(cover-pix)=\
    Set(popup,show,Loading cover (4) ...);\
    Make(var,cover_name,by_value,cover-pix);\
    Macro(MEDIA_COVER_GEN);\
    Set(popup,hide);

CoverNotExists(cover-presentation)=\
    Set(popup,show,Loading cover (5) ...);\
    Make(var,cover_name,by_value,cover-presentation);\
    Macro(MEDIA_COVER_GEN);\
    Set(popup,hide);

CoverNotExists(cover-setup)=\
    Set(popup,show,Loading cover (6) ...);\
    Make(var,cover_name,by_value,cover-setup);\
    Macro(MEDIA_COVER_GEN);\
    Set(popup,hide);

CoverNotExists(cover-video)=\
    Set(popup,show,Loading cover (7) ...);\
    Make(var,cover_name,by_value,cover-video);\
    Macro(MEDIA_COVER_GEN);\
    Set(popup,hide);

CoverNotExists(cover-weather)=\
    Set(popup,show,Loading cover (8) ...);\
    Make(var,cover_name,by_value,cover-weather);\
    Macro(MEDIA_COVER_GEN);\
    Set(popup,hide);

MEDIA_TITLE=\
    ExecAndSet(title,\
        if [ x$(mediacenter_activity) = "xsetup" ]; then echo "Setup"; fi;\
        if [ x$(mediacenter_activity) = "xaudio" ]; then echo "Audio"; fi;\
        if [ x$(mediacenter_activity) = "xvideo" ]; then echo "Video"; fi;\
        if [ x$(mediacenter_activity) = "xpix" ]; then echo "Photo"; fi;\
        if [ x$(mediacenter_activity) = "xpresentation" ]; then echo "Presentation"; fi;\
        if [ x$(mediacenter_activity) = "xweather" ]; then echo "Weather"; fi;\
        if [ x$(mediacenter_activity) = "xfiles" ]; then echo "Files"; fi;\
        if [ x$(mediacenter_activity) = "xcomputer" ]; then echo "Computer"; fi;);

MEDIA_STATUS=\
    Make(var,mediacenter_status_action,\
        if [ "x$(mediacenter_activity)" = "xweather" ]; then echo "WEATHER_STATUS"; else echo "DO_MEDIA_STATUS"; fi);\
    Macro($(mediacenter_status_action));

MEDIA_COVER=\
    Set(cover,by_name,cover-$(mediacenter_activity));

MEDIA_COVER_GEN=\
    Make(var,coverconverted,convert -resize $(cover_size)x$(cover_size) -depth 8 -background transparent \
                                 "$(CfgDir)/Icons/common/$(cover_name).png" "$(TmpDir)"/$(cover_name).png 2> /dev/null;\
                            echo "$(TmpDir)"/$(cover_name).png);\
    Set(image,cover,$(cover_name),$(coverconverted));

WEATHER_STATUS=\
    Macro(SET_WEATHER_LOCATION,if [ "x$(mediacenter_weather_location)" = "x" ]; then echo 0; else echo 1; fi);\
    ExecAndSet(status,$(CfgDir)/Utils/weather.sh -temperature $(mediacenter_weather_location));

DO_MEDIA_STATUS=\
    ExecAndSet(status,\
        if [ x$(mediacenter_activity) = "xaudio" ]; then echo "$(mediacenter_audio_backend)"; fi;\
        if [ x$(mediacenter_activity) = "xvideo" ]; then echo "$(mediacenter_video_backend)"; fi;\
        if [ x$(mediacenter_activity) = "xpix" ]; then echo "$(mediacenter_pix_backend)"; fi;\
        if [ x$(mediacenter_activity) = "xpresentation" ]; then echo "$(mediacenter_presentation_backend)"; fi;);

MEDIA_LAYOUT=\
    Macro(MEDIA_TITLE);\
    Macro(MEDIA_COVER);\
    Macro(MEDIA_STATUS);

VOL+=Macro(NEXT_ACTIVITY);
VOL-=Macro(PREV_ACTIVITY);

SlideLeft =Macro(NEXT_ACTIVITY);
SlideRight=Macro(PREV_ACTIVITY);

1=Macro(PREV_ACTIVITY);
2=Macro(CHOOSE_ACTIVITY);
3=Macro(NEXT_ACTIVITY);
4=Make(none);
5=Make(none);
6=Make(none);
7=Make(none);
8=Make(none);
9=Make(none);
*=Make(none);
0 0=Set(image,remove,covers);
#=Make(none);

COVER=\
    Macro(CHOOSE_ACTIVITY);

CHOOSE_ACTIVITY=\
    Make(mode,mediacenter_$(mediacenter_activity));

NEXT_ACTIVITY=\
    Make(var,mediacenter_activity,\
        if [ x$(mediacenter_activity) = "xsetup" ]; then echo "audio"; fi;\
        if [ x$(mediacenter_activity) = "xaudio" ]; then echo "video"; fi;\
        if [ x$(mediacenter_activity) = "xvideo" ]; then echo "pix"; fi;\
        if [ x$(mediacenter_activity) = "xpix" ]; then echo "presentation"; fi;\
        if [ x$(mediacenter_activity) = "xpresentation" ]; then echo "weather"; fi;\
        if [ x$(mediacenter_activity) = "xweather" ]; then echo "files"; fi;\
        if [ x$(mediacenter_activity) = "xfiles" ]; then echo "computer"; fi;\
        if [ x$(mediacenter_activity) = "xcomputer" ]; then echo "setup"; fi;);\
    Macro(MEDIA_LAYOUT);

PREV_ACTIVITY=\
    Make(var,mediacenter_activity,\
        if [ x$(mediacenter_activity) = "xsetup" ]; then echo "computer"; fi;\
        if [ x$(mediacenter_activity) = "xaudio" ]; then echo "setup"; fi;\
        if [ x$(mediacenter_activity) = "xvideo" ]; then echo "audio"; fi;\
        if [ x$(mediacenter_activity) = "xpix" ]; then echo "video"; fi;\
        if [ x$(mediacenter_activity) = "xpresentation" ]; then echo "pix"; fi;\
        if [ x$(mediacenter_activity) = "xweather" ]; then echo "presentation"; fi;\
        if [ x$(mediacenter_activity) = "xfiles" ]; then echo "weather"; fi;\
        if [ x$(mediacenter_activity) = "xcomputer" ]; then echo "files"; fi;);\
    Macro(MEDIA_LAYOUT);

[ModeEnd]

[Mode]=mediacenter_setup_general

SET_MENU=\
    Set(menu,replace,Back,Help);

Back=\
    Set(text,close);\
    Make(mode,mediacenter_chooser);

Back($$)=\
    Set(list,close);\
    Make(mode,mediacenter_chooser);

Push($$)=\
    Macro(CHOOSE);
    
Choose($$)=\
    Macro(CHOOSE);

[ModeEnd]

[Mode]=mediacenter_setup

(EnterMode)=\
    Macro(SETUP_LIST);\
    Get(is_exists,cover,cover-audio);

SETUP_LIST=\
    Set(list,replace,Choose,Audio,Video,Photo,Presentation,Weather,Client,Disconnect);\
    Set(menu,replace,Choose,Help);

Help($$)=\
    Set(text,replace,Help,Choose subcategory);

Back=\
    Macro(SETUP_LIST);

Back($$)=\
    Set(list,close);\
    Make(mode,mediacenter_chooser);

Push($$)=\
    Macro(CHOOSE);
    
Choose($$)=\
    Macro(CHOOSE);

CHOOSE=\
    Make(var,mediacenter_mode,by_value,mediacenter_setup);\
    Make(var,mediacenter_setup_activity,\
        if [ "x$(Param)" = "xAudio" ]; then echo "audio"; fi;\
        if [ "x$(Param)" = "xVideo" ]; then echo "video"; fi;\
        if [ "x$(Param)" = "xPhoto" ]; then echo "pix"; fi;\
        if [ "x$(Param)" = "xPresentation" ]; then echo "presentation"; fi;\
        if [ "x$(Param)" = "xWeather" ]; then echo "weather"; fi;\
        if [ "x$(Param)" = "xDisconnect" ]; then echo "disconnect"; fi;\
        if [ "x$(Param)" = "xClient" ]; then echo "client"; fi;);\
    Make(mode,mediacenter_setup_$(mediacenter_setup_activity));
    
[ModeEnd]

[Mode]=mediacenter_setup_disconnect

(EnterMode)=\
    Make(disconnect);\
    Make(mode,default);

[ModeEnd]

% rely on $(mediacenter_mode)
[Mode]=mediacenter_setup_audio : mediacenter_setup_general

(EnterMode)=\
    ExecAndSet(list,replace,Choose Backend,$(CfgDir)/Utils/get-installed.sh 'MEDIACENTER audio' cfg-data);\
    Set(menu,replace,Choose,Help);

Help($$)=\
    Set(text,replace,Help,Choose audio backend);

Push($$)=\
    Macro(CHOOSE);
    
Choose($$)=\
    Macro(CHOOSE);

CHOOSE=\
    Make(var,mediacenter_audio_backend,by_value,$(Param));\
    Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set mediacenter_audio_backend $(mediacenter_audio_backend));\
    Make(mode,$(mediacenter_mode));

[ModeEnd]

% rely on $(mediacenter_mode)
[Mode]=mediacenter_setup_video : mediacenter_setup_general

(EnterMode)=\
    ExecAndSet(list,replace,Choose Backend,$(CfgDir)/Utils/get-installed.sh 'MEDIACENTER video' cfg-data);\
    Set(menu,replace,Choose,Help);

Help($$)=\
    Set(text,replace,Help,Choose video backend);

Push($$)=\
    Macro(CHOOSE);
    
Choose($$)=\
    Macro(CHOOSE);

CHOOSE=\
    Make(var,mediacenter_video_backend,by_value,$(Param));\
    Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set mediacenter_video_backend $(mediacenter_video_backend));\
    Make(mode,$(mediacenter_mode));

[ModeEnd]

% rely on $(mediacenter_mode)
[Mode]=mediacenter_setup_pix : mediacenter_setup_general

(EnterMode)=\
    ExecAndSet(list,replace,Choose Backend,$(CfgDir)/Utils/get-installed.sh 'MEDIACENTER photo' cfg-data);\
    Set(menu,replace,Choose,Help);

Help($$)=\
    Set(text,replace,Help,Choose photo viewer backend);

Push($$)=\
    Macro(CHOOSE);
    
Choose($$)=\
    Macro(CHOOSE);

CHOOSE=\
    Make(var,mediacenter_pix_backend,by_value,$(Param));\
    Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set mediacenter_pix_backend $(mediacenter_pix_backend));\
    Make(mode,$(mediacenter_mode));

[ModeEnd]

% rely on $(mediacenter_mode)
[Mode]=mediacenter_setup_presentation : mediacenter_setup_general

(EnterMode)=\
    ExecAndSet(list,replace,Choose Backend,$(CfgDir)/Utils/get-installed.sh 'MEDIACENTER presentation' cfg-data);\
    Set(menu,replace,Choose,Help);

Help($$)=\
    Set(text,replace,Help,Choose presentation viewer backend);

Push($$)=\
    Macro(CHOOSE);
    
Choose($$)=\
    Macro(CHOOSE);

CHOOSE=\
    Make(var,mediacenter_presentation_backend,by_value,$(Param));\
    Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set mediacenter_presentation_backend $(mediacenter_presentation_backend));\
    Make(mode,$(mediacenter_mode));

[ModeEnd]

% rely on $(mediacenter_mode)
[Mode]=mediacenter_setup_weather : mediacenter_setup_general

(EnterMode)=\
	Set(editfield,Enter location or METAR code,Location,);

Ok($$)=\
    Make(var,mediacenter_weather_location,echo "$(Param)"|sed 's/ /%20/g');\
    Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set mediacenter_weather_location $(mediacenter_weather_location));\
	Make(mode,$(mediacenter_mode));

[ModeEnd]

% rely on $(mediacenter_mode)
[Mode]=mediacenter_setup_client : mediacenter_setup_general

(EnterMode)=\
    Set(list,replace,Choose,Layout Setup, Clear Covers,Clear Icons,Clear Cache);\
    Set(menu,replace,Choose,Help);

Help($$)=\
    Set(text,replace,Help,Choose subcategory);

Back($$)=\
    Make(mode,mediacenter_setup);

    
MEDIACENTER_SETUP_LAYOUT=\
    Set(popup,show,Loading...);\
    Make(flush);\
    Include($(CfgDir)/Server-mode/layoutSetup.cfg);\
    Macro((Init));\
    Macro((Connect));\
    Include($(CfgDir)/Server-mode/mediacenter.cfg);\
    Macro(MEDIACENTER_MENU);\
    Set(popup,hide);

MEDIACENTER_CLEAR_COVERS=\
    Set(image,remove,covers);\
    Make(mode,mediacenter_setup);
    
MEDIACENTER_CLEAR_ICONS=\
    Set(image,remove,icons);\
    Make(mode,mediacenter_setup);

MEDIACENTER_CLEAR_CACHE=\
    Set(image,clear_cache);\
    Make(mode,mediacenter_setup);

Push($$)=\
    Macro(CHOOSE);
    
Choose($$)=\
    Macro(CHOOSE);

CHOOSE=\
    Make(var,mediacenter_setup_client_activity,\
        if [ "x$(Param)" = "xLayout Setup" ]; then echo "MEDIACENTER_SETUP_LAYOUT"; fi;\
        if [ "x$(Param)" = "xClear Covers" ]; then echo "MEDIACENTER_CLEAR_COVERS"; fi;\
        if [ "x$(Param)" = "xClear Icons"  ]; then echo "MEDIACENTER_CLEAR_ICONS"; fi;\
        if [ "x$(Param)" = "xClear Cache"  ]; then echo "MEDIACENTER_CLEAR_CACHE"; fi;);\
    Macro($(mediacenter_setup_client_activity));

[ModeEnd]

[Mode]=mediacenter_general

SELECT_GENERAL=\
    Set(popup,show,Loading...);\
    Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set mediacenter_activity $(mediacenter_activity));\
    Make(flush);\
    Include($(CfgDir)/Server-mode/$(mediacenter_backend).cfg);\
    Macro((Init));\
    Macro((Connect));\
    Include($(CfgDir)/Server-mode/mediacenter.cfg);\
    Macro(MEDIACENTER_MENU);\
    Set(popup,hide);

[ModeEnd]

[Mode]=mediacenter_audio : mediacenter_general

(EnterMode)=\
    Macro(LOAD_VAR,if [ "x$(mediacenter_audio_backend)" = "x" ]; then echo 0; else echo 1; fi);\
    Make(var,mediacenter_audio_action,if [ "x$(mediacenter_audio_backend)" = "x" ]; then echo NONE; else echo SELECT; fi);\
    Macro($(mediacenter_audio_action));

LOAD_VAR=\
    Make(var,mediacenter_audio_backend,$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_audio_backend);

NONE=\
    Make(var,mediacenter_mode,by_value,mediacenter_audio);\
    Make(mode,mediacenter_setup_audio);
     
SELECT=\
    Make(var,mediacenter_backend,by_value,$(mediacenter_audio_backend));\
    Macro(SELECT_GENERAL);

[ModeEnd]

[Mode]=mediacenter_video : mediacenter_general

(EnterMode)=\
    Macro(LOAD_VAR,if [ "x$(mediacenter_video_backend)" = "x" ]; then echo 0; else echo 1; fi);\
    Make(var,mediacenter_video_action,if [ "x$(mediacenter_video_backend)" = "x" ]; then echo NONE; else echo SELECT; fi);\
    Macro($(mediacenter_video_action));

LOAD_VAR=\
    Make(var,mediacenter_video_backend,$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_video_backend);

NONE=\
    Make(var,mediacenter_mode,by_value,mediacenter_video);\
    Make(mode,mediacenter_setup_video);
     
SELECT=\
    Make(var,mediacenter_backend,by_value,$(mediacenter_video_backend));\
    Macro(SELECT_GENERAL);

[ModeEnd]

[Mode]=mediacenter_presentation : mediacenter_general

(EnterMode)=\
    Macro(LOAD_VAR,if [ "x$(mediacenter_presentation_backend)" = "x" ]; then echo 0; else echo 1; fi);\
    Make(var,mediacenter_presentation_action,if [ "x$(mediacenter_presentation_backend)" = "x" ]; then echo NONE; else echo SELECT; fi);\
    Macro($(mediacenter_presentation_action));

LOAD_VAR=\
    Make(var,mediacenter_presentation_backend,$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_presentation_backend);

NONE=\
    Make(var,mediacenter_mode,by_value,mediacenter_presentation);\
    Make(mode,mediacenter_setup_presentation);
     
SELECT=\
    Make(var,mediacenter_backend,by_value,$(mediacenter_presentation_backend));\
    Macro(SELECT_GENERAL);

[ModeEnd]

[Mode]=mediacenter_pix : mediacenter_general

(EnterMode)=\
    Macro(LOAD_VAR,if [ "x$(mediacenter_pix_backend)" = "x" ]; then echo 0; else echo 1; fi);\
    Make(var,mediacenter_pix_action,if [ "x$(mediacenter_pix_backend)" = "x" ]; then echo NONE; else echo SELECT; fi);\
    Macro($(mediacenter_pix_action));

LOAD_VAR=\
    Make(var,mediacenter_pix_backend,$(CfgDir)/Utils/registry.sh $(TmpDir) get mediacenter_pix_backend);

NONE=\
    Make(var,mediacenter_mode,by_value,mediacenter_pix);\
    Make(mode,mediacenter_setup_pix);

SELECT=\
    Make(var,mediacenter_backend,by_value,$(mediacenter_pix_backend));\
    Macro(SELECT_GENERAL);

[ModeEnd]

[Mode]=mediacenter_weather : mediacenter_general

(EnterMode)=\
    Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set mediacenter_activity $(mediacenter_activity));\
    Macro(LOAD_VAR,if [ "x$(mediacenter_weather_location)" = "x" ]; then echo 0; else echo 1; fi);\
    Make(var,mediacenter_weather_action,if [ "x$(mediacenter_weather_location)" = "x" ]; then echo NONE; else echo Current; fi);\
    Macro($(mediacenter_weather_action));

%TEST_WEATHER=\
%	Exec(P=`which weather|grep weather|grep -v no|wc -l|tr -d " "`; \
%	     if [ "x$P" != "x1" ]; then \
%	         $(CfgDir)/Utils/message.sh "ERROR: weather 2.0 (from weather-util package) not found"; \
%	     else \
%             V=`weather --version 2> /dev/null|grep 2.0|wc -l|tr -d " "`; \
%             if [ "x$V" != "x1" ]; then \
%                 $(CfgDir)/Utils/message.sh "ERROR: weather 2.0 (from weather-util package) not found"; \
%             fi; \
%         fi);

LOAD_VAR=\
    Macro(SET_WEATHER_LOCATION);

NONE=\
    Make(var,mediacenter_mode,by_value,mediacenter_weather);\
    Make(mode,mediacenter_setup_weather);
     
Current=\
    ExecAndSet(text,replace,Weather,$(CfgDir)/Utils/weather.sh -current $(mediacenter_weather_location));\
    Set(menu,replace,Forecast);

Forecast=\
    ExecAndSet(text,replace,Weather,$(CfgDir)/Utils/weather.sh -forecast $(mediacenter_weather_location));\
    Set(menu,replace,Current);

Back=\
    Set(text,close);\
    Make(mode,mediacenter_chooser);

[ModeEnd]

[Mode]=mediacenter_files

(EnterMode)=\
    Set(popup,show,Loading...);\
    Exec($(CfgDir)/Utils/registry.sh $(TmpDir) set mediacenter_activity $(mediacenter_activity));\
    Make(flush);\
    Include($(CfgDir)/Server-mode/fileManager3.cfg);\
    Macro((Init));\
    Macro((Connect));\
    Include($(CfgDir)/Server-mode/mediacenter.cfg);\
    Macro(MEDIACENTER_MENU);\
    Set(popup,hide);

[ModeEnd]

[Mode]=mediacenter_computer

(EnterMode)=\
     Make(var,return_mode,by_value,mediacenter_chooser);\
     Make(mode,power_manager);

[ModeEnd]

[End]
