%
% anyremote configuration file for kpdf management (Server-mode)
%
% OBSOLETED

% STATUS stable
% XTEST no
% SOUND no
% ENV no
% FBROWSER v.3i

GuiAppName=Kpdf
GuiAppBinary=kpdf
GuiAppRun=echo 'A=`dcop 2> /dev/null|grep kpdf`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=kpdf.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=KPDF is a pdf viewer based on xpdf for KDE.
GuiAppVersion=echo 'V=`kpdf -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" == "x3" ]; then echo OK; else echo NOK; fi'|bash -f -s

[Protocol]=Server

(Init)=Include($(CfgDir)/Utils/aliases-server.cfg);

(Connect)=Make(mode,kpdf);

[Mode]=kpdf

(EnterMode)=Set(layout,default);\
	Set(icons,KPDF,1,folder,2,up,3,default,4,left,5,fullscreen,6,right,7,default,8,down,9,default,*,question,0,default,#,no);\
	Set(font,small);\
	Set(title, );\
	Set(status, KPDF);\
	Macro(ALLIN1MENU);

Back      =Set(text,close);Macro(ALLIN1MENU);
Back($$)  =Set(list,close);Macro(ALLIN1MENU);
UpdateMenu=Set(menu,replace,GoTo,Open,Go Home);

% FBROWSER v.3i 
FillList=Set(iconlist,replace,Files,folder:..);\
	Macro(FillDir);\
        Macro(FillFile);
FillDir =ExecAndSet(iconlist,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep '/'| xargs -d '\n' -i echo "folder:" {});
FillFile=ExecAndSet(iconlist,add,SAME,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";ls -F --quoting-style=shell|sed 's/\*//;s/,/\r/g;s/@//;s/$/,/'|grep -v '/'| xargs -d '\n' -i echo "file:"{});
GoTo($$)=Make(var,goto,by_value,$(Param));\
	ExecAndSet(iconlist,replace,Files,cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";echo "if [ -d $(goto) ]; then cd $(goto);fi;pwd>$HOME/.anyRemote/ar_storedir.tmp;"|bash -f -s;echo "folder:..");\
	Macro(FillDir);\
        Macro(FillFile);
Go Home($$)=ExecAndSet(iconlist,replace,Files,cd;pwd>$HOME/.anyRemote/ar_storedir.tmp;echo "folder:..");\
	Macro(FillDir);\
        Macro(FillFile);
% FBROWSER v.3i 

Open($$)=\
	Set(list,close);\
	Set(title,$(Param));\
	Set(menu,clear);\
	Exec(echo 'D=`dcop|grep kpdf`; if [ "x$D" == "x" ]; then cd "`cat $HOME/.anyRemote/ar_storedir.tmp`";kpdf "$(Param)"& fi'|bash -f -s);\
	Macro(ALLIN1MENU);

Cancel=\
    Exec(echo 'D=`dcop|grep kpdf`; if [ "x$D" != "x" ]; then dcop $D MainApplication-Interface quit; fi'|bash -f -s);	

1=Macro(FillList);Macro(UpdateMenu);
2=Exec(echo 'D=`dcop|grep kpdf`; if [ "x$D" != "x" ]; then dcop $D kpdf slotGotoFirst; fi'|bash -f -s)
3=Make(none)

4=Exec(echo 'D=`dcop|grep kpdf`; if [ "x$D" != "x" ]; then dcop $D kpdf slotPreviousPage; fi'|bash -f -s)
5=Exec(echo 'D=`dcop|grep kpdf`; if [ "x$D" != "x" ]; then dcop $D KPDF::Shell activateAction fullscreen; fi'|bash -f -s)
6=Exec(echo 'D=`dcop|grep kpdf`; if [ "x$D" != "x" ]; then dcop $D kpdf slotNextPage; fi'|bash -f -s)

7=Make(none)
8=Exec(echo 'D=`dcop|grep kpdf`; if [ "x$D" != "x" ]; then dcop $D kpdf slotGotoLast; fi'|bash -f -s)
9=Make(none)

* *=Set(text,replace,Help,1 Choose file\n2 First page\n4 Previous page\n5 Fullscreen\n6 Next page\n8 Last page\n** Help\n# Quit\n);
0=Make(none)
#=Exec(echo 'D=`dcop|grep kpdf`; if [ "x$D" != "x" ]; then dcop $D MainApplication-Interface quit; fi'|bash -f -s);Set(title, );

[ModeEnd]

[End]
