%
% anyremote configuration file for digikam/KDE3 (http://www.digikam.org/) management (Server-mode)
%
%  Thanks to Marcus Hardt for this  configuration file
%

% STATUS nonstable
% XTEST yes
% SOUND no
% ENV no

GuiAppName=Digikam/KDE3
GuiAppBinary=digikam
GuiAppVersion=echo 'V=`digikam -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
GuiAppRun=echo 'A=`dcop 2> /dev/null|grep digikam`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=digikam.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=digiKam is an advanced digital photo management application for KDE

[Protocol]=Server

(Init)=Include($(CfgDir)/Utils/aliases-server.cfg);\
	Exec(echo 'V=`digikam -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);

DIGIKAM_SETUP=Set(status,Album Mode);\
	Set(icons,Digikam,1,default,2,up,3,default,4,left,5,default,6,right,7,default,8,down,9,default,0,fullscreen,*,question,#,folder);\
	Set(status, );Set(title, );

(Connect)=Macro(DIGIKAM_SETUP);\
	Exec(echo 'D=`dcop|grep digikam`; if [ "x$D" == "x" ]; then digikam 2> /dev/null & fi'|bash -f -s);

(EnterMode)=Macro(DIGIKAM_SETUP);

Cancel=Exec(echo 'D=`dcop|grep digikam`; if [ "x$D" != "x" ]; then dcop $D MainApplication-Interface quit;sleep 3;pkill digikam; fi'|bash -f -s);
Back=Set(text,close);
%  Back=Exec(konsole);

%  Konsole=Exec(konsole);
%  1=Set(icons, icons, 1,up);
%  3=Set(title, title\n2\n3\n4\n5\n6\n7\n8\n9\n0\n1\n2\n3);
%  5=Set(status,statuus);
%  7=Set(fullscreen,toggle);
%  9=Set(vibrate);

2=Emulate(key,Up)

4=Emulate(key,Left)
6=Emulate(key,Right)

8=Emulate(key,Down)

* *=Set(text,replace,Help,Album Mode\n 2 Up\n 4 Left\n 6 Right\n 8 Down\n 0 Fullscreen view\n * # Run/Quit\n * * - Help\n # Mouse mode)
* #=Exec(echo 'D=`dcop|grep digikam`; if [ "x$D" == "x" ]; then digikam 2> /dev/null & else dcop $D MainApplication-Interface quit;sleep 3;pkill digikam; fi'|bash -f -s)
0=Make(mode,Viewer);
#=Make(mode,Mouse);


[Mode]=Viewer

(EnterMode)=Set(status,Slideshow Mode);\
	Set(icons,SAME,1,prev,2,up,3,next,4,left,5,down,6,right,7,minus,8,fit,9,plus,0,fullscreen,*,question,#,folder);\
	Exec(echo 'D=`dcop|grep digikam`;dcop $D Digikam hide;dcop $D Digikam show;dcop $D Digikam activateAction image_view;dcop $D Digikam activateAction full_screen'|bash -f -s);\
	Emulate(mousermove,10000,10000,mousermove,-20,-20);

% Make sure that we quit from full_screen image_view, when we leave the mode
(ExitMode)=Set(status,Normal);\
	Exec(echo 'D=`dcop|grep digikam`;dcop $D Digikam activateAction image_view;dcop $D Digikam activateAction full_screen' |bash -f -s)

1=Emulate(key,Page_Up)
* 2=Make(none)
3=Emulate(key,Page_Down)

% Scroll the image when we have zoomed in
2=Emulate(mousermove,0,-200,mousedown,2,mousermove,0,200,mouseup,2)
4=Emulate(mousermove,-200,0,mousedown,2,mousermove,200,0,mouseup,2)
5=Emulate(mousedown,2,mousermove,0,-200,mouseup,2,mousermove,0,200)
6=Emulate(mousedown,2,mousermove,-200,0,mouseup,2,mousermove,200,0)

4=Make(none)
5=Make(none)
6=Make(none)

% Size - / fit to window size vs. zoom 100% / Size +
* 7=Emulate(keydown,Control_R,key,minus,keyup,Control_R)
* 8=Emulate(key,O)
* 9=Emulate(keydown,Control_R,keydown,Shift_L,key,plus,keyup,Control_R,keyup,Shift_L)
7=Exec(dcop `dcop|grep digikam` Digikam activateAction album_zoomout)
8=Emulate(keydown,Control_R,keydown,Alt_L,key,0,keyup,Control_R,keyup,Alt_L)
* 8=Exec(dcop `dcop|grep digikam` Digikam activateAction album_zoomfit2window)
9=Exec(dcop `dcop|grep digikam` Digikam activateAction album_zoomin)

* *=Set(text,replace,Help,Image View\n 1 Previous\n 2 Scroll up\n 3 Next\n 4 Scroll left\n 5 Scroll down\n 6 Scroll right\n 7 Size -\n 8 Fit To Window / Zoom 1:1\n 9 Size +\n 0 Album mode\n * * Help\n # Mouse mode)
0=Make(mode,default);
#=Make(mode,Mouse);

[ModeEnd]

[Mode]=Mouse

(EnterMode)=Set(status,Select an album using the mouse);\
	Set(icons,SAME,1,stop,2,up,3,stop,4,left,5,default,6,right,7,default,8,down,9,default,0,fullscreen,*,question,#,folder);Exec(xte 'mousermove -10000 0' 'mousermove 150')
1=Emulate(mousedown,1,sleep,100,mouseup,1)
2=Emulate(mousermove,0,-18)
3=Emulate(mousedown,3,sleep,100,mouseup,3)

4=Emulate(mousermove,-18,0)
5=Make(none)
6=Emulate(mousermove,18,0)

7=Make(none)
8=Emulate(mousermove,0,18)
9=Make(none)

* *=Set(text,replace,Help,This mode is for choosing an album\n 1 LMB\n 2 Move up\n 3 RMB\n 4 Move left\n 6 Move right\n 8 Move down\n 0 Fullscreen view\n * * Help\n # Album view);
0=Make(mode,Viewer);
#=Make(mode,default);

[ModeEnd]

[End]
