%
% anyremote configuration file for kview management.
%
% Needs $PHOTO_DIR environment variable
%

% STATUS good
% XTEST yes
% SOUND no
% ENV yes

GuiAppName=Kview
GuiAppBinary=kview
GuiAppRun=echo 'A=`dcop 2> /dev/null|grep kview`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=kview.png
GuiAppType=Application
GuiAppProtocols=AT
GuiAppDesc=KView is an image viewer program for the KDE (a part of the KDE Graphics package)
GuiAppVersion=echo 'V=`kview -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]=AT

(Init)=Include($(CfgDir)/Utils/aliases-at.cfg);\
	Make(var,TwoWayComm,by_value,false);\
	Make(var,Device,by_value,/dev/rfcomm0);\
	Exec(echo 'if [ "x$PHOTO_DIR" == "x" ]; then $(CfgDir)/Utils/message.sh "ERROR: PHOTO_DIR environment variable is not set !"; fi'|bash -f -s);\
	Exec(echo 'V=`amarok -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" == "x4" ]; then $(CfgDir)/Utils/message.sh "ERROR: this configuration file is for KDE3"; fi'|bash -f -s);

% aliased keys
Answer=Make(disconnect);
Cancel=Exec(echo 'KVIEW=`dcop|grep kview`;dcop $KVIEW MainApplication-Interface quit'|bash -f -s);

(Connect)=Exec(echo 'PIX=`ls -1 $PHOTO_DIR|head -1`;kview $PHOTO_DIR/$PIX --nocrashhandler &'|bash -f -s)


1=Exec(echo 'PIX=`ls -1 $PHOTO_DIR|head -1`;kview $PHOTO_DIR/$PIX  --nocrashhandler &'|bash -f -s)

4=Emulate(keydown,Shift_L,key,Left,keyup,Shift_L)
%5=Exec(echo 'K=`dcop|grep kview`;dcop $K KView maximize'|bash -f -s)
5=Exec(echo 'K=`dcop|grep kview`;dcop $K KView activateAction fullscreen'|bash -f -s)
6=Emulate(keydown,Shift_L,key,Right,keyup,Shift_L)

7=Emulate(keydown,Control_L,key,minus,keyup,Control_L)
%8=Exec(echo 'K=`dcop|grep kview`;dcop $K KView setGeometry 300 150 800 600'|bash -f -s)
9=Emulate(keydown,Control_L,key,KP_Add,keyup,Control_L)

* *=Exec(echo 'F="$HOME/.anyRemote/anyrem.hlp";echo "1 - Run kview " > $F;echo "4 - Previous    5 - Toggle Full Screen 6 - Next	" >> $F;echo "7 - Size -                             9 - Size +" >> $F;echo "* * - Help                             # - Quit" >> $F; kdialog -passivepopup "`cat $F`" 7' |bash -f -s)
#=Exec(echo 'K=`dcop|grep kview`;dcop $K MainApplication-Interface quit'|bash -f -s)
[End]
