Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 154115
Collapse All | Expand All

(-)kim/install.sh (-11 / +7 lines)
Lines 17-28 Link Here
17
# along with Foobar; if not, write to the Free Software
17
# along with Foobar; if not, write to the Free Software
18
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
20
kdeinstdir=`kde-config --prefix`
20
kdeinstdir=`kde4-config --prefix`
21
21
22
cp src/kim*.desktop $kdeinstdir/share/apps/konqueror/servicemenus/
22
cp src/kim_*.desktop $kdeinstdir/share/kde4/services/ServiceMenus
23
cp src/bin/kim* $kdeinstdir/bin/
23
cp src/bin/kim_* $kdeinstdir/bin/
24
chmod a+rx $kdeinstdir/bin/kim*
24
chmod a+rx $kdeinstdir/bin/kim_*
25
chmod a+r $kdeinstdir/share/apps/konqueror/servicemenus/kim*.desktop
25
chmod a+r $kdeinstdir/share/apps/konqueror/servicemenus/kim_*.desktop
26
26
27
mkdir $kdeinstdir/share/apps/kim
27
mkdir $kdeinstdir/share/apps/kim
28
cp COPYING $kdeinstdir/share/apps/kim/kim_about.txt
28
cp COPYING $kdeinstdir/share/apps/kim/kim_about.txt
Lines 30-40 cp COPYING $kdeinstdir/share/apps/kim/ki Link Here
30
mkdir $kdeinstdir/share/apps/kim/slideshow/
30
mkdir $kdeinstdir/share/apps/kim/slideshow/
31
cp src/slideshow/* $kdeinstdir/share/apps/kim/slideshow/
31
cp src/slideshow/* $kdeinstdir/share/apps/kim/slideshow/
32
32
33
mkdir $kdeinstdir/share/apps/kim/galery
33
mkdir $kdeinstdir/share/apps/kim/gallery
34
cp src/galery/* $kdeinstdir/share/apps/kim/galery
34
cp src/gallery/* $kdeinstdir/share/apps/kim/gallery
35
36
cd $kdeinstdir/share/apps/konqueror/servicemenus/
37
mv imageconverter.desktop imageconverter.desktop~
38
mv jpegorient.desktop jpegorient.desktop~
39
35
40
echo "Installation completed. Good bye."
36
echo "Installation completed. Good bye."
(-)kim/src/bin/kim_album (-21 / +21 lines)
Lines 19-80 Link Here
19
dir="$1";
19
dir="$1";
20
nb=`kdialog --radiolist "Kim - Select album type:" 1 "1x1 portrait album"  off 2 "1x1 landscape album"  off 3 "1x2 landscape album"  off 4 "2x1 portrait album"  off 5 "2x2 landscape album" on 6 "3x2 portrait album"  off 7 "3x4 landscape album" off 8 "4x4 landscape album" off`
20
nb=`kdialog --radiolist "Kim - Select album type:" 1 "1x1 portrait album"  off 2 "1x1 landscape album"  off 3 "1x2 landscape album"  off 4 "2x1 portrait album"  off 5 "2x2 landscape album" on 6 "3x2 portrait album"  off 7 "3x4 landscape album" off 8 "4x4 landscape album" off`
21
21
22
test -n "$KDEHOME" || KDEHOME="`kde-config --localprefix`"; export KDEHOME
22
test -n "$KDEHOME" || KDEHOME="`kde4-config --localprefix`"; export KDEHOME
23
#KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$USER"/kim.XXXXXXXX` || exit 1
23
#KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$USER"/kim.XXXXXXXX` || exit 1
24
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
24
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
25
25
26
dcopRef=`kdialog --progressbar "Kim - Creating miniatures ..." 2`
26
dbusRef=`kdialog --progressbar "Kim - Creating miniatures ..." 2`
27
case "$nb" in
27
case "$nb" in
28
1)	montage -tile 1x1 -geometry 800x600+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg
28
1)	montage -tile 1x1 -geometry 800x600+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg
29
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
29
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
30
	dcop "$dcopRef" setProgress 1
30
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
31
	montage -tile 1x1 -geometry 600x800+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" 
31
	montage -tile 1x1 -geometry 600x800+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" 
32
*.pdf`;;
32
*.pdf`;;
33
33
34
2)	montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
34
2)	montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
35
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
35
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
36
	dcop "$dcopRef" setProgress 1
36
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
37
	montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" 
37
	montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" 
38
*.pdf`;;
38
*.pdf`;;
39
39
40
3)	montage -tile 1x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
40
3)	montage -tile 1x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
41
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
41
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
42
	dcop "$dcopRef" setProgress 1
42
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
43
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
43
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
44
44
45
4)	montage -tile 1x2 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg
45
4)	montage -tile 1x2 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg
46
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
46
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
47
	dcop "$dcopRef" setProgress 1
47
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
48
	montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
48
	montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
49
	
49
	
50
5)	montage -tile 2x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
50
5)	montage -tile 2x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
51
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
51
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
52
	dcop "$dcopRef" setProgress 1
52
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
53
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
53
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
54
	
54
	
55
6)	montage -tile 2x3 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg 
55
6)	montage -tile 2x3 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg 
56
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
56
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
57
	dcop "$dcopRef" setProgress 1
57
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
58
	montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
58
	montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
59
59
60
7)	montage -tile 4x3 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg 
60
7)	montage -tile 4x3 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg 
61
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
61
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
62
	dcop "$dcopRef" setProgress 1
62
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
63
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
63
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
64
	
64
	
65
8)	montage -tile 4x4 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg 
65
8)	montage -tile 4x4 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg 
66
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
66
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
67
	dcop "$dcopRef" setProgress 1
67
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
68
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
68
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
69
69
70
*) kdialog --msgbox "Kim - Unrecognized option ! ";;
70
*) kdialog --msgbox "Kim - Unrecognized option ! ";;
71
esac
71
esac
72
72
73
dcop "$dcopRef" setLabel "Kim - Deleting miniatures ..."
73
qdbus $dbusRef setLabelText "Kim - Deleting miniatures ..."
74
dcop "$dcopRef" setProgress 2
74
qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 2
75
#rm "$KIMDIR"/miniature*.jpg*
75
#rm "$KIMDIR"/miniature*.jpg*
76
rm -rf "$KIMDIR"
76
rm -rf "$KIMDIR"
77
dcop "$dcopRef" close
77
qdbus $dbusRef close
78
78
79
79
80
80
(-)kim/src/bin/kim_compress (-14 / +14 lines)
Lines 28-71 let "nbfiles = ($# -1)/2" Link Here
28
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
28
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
29
case $? in
29
case $? in
30
	0)	# Replace exisiting files !
30
	0)	# Replace exisiting files !
31
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
31
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
32
	dcop "$dcopRef" showCancelButton true
32
	qdbus $dbusRef showCancelButton true
33
	compteur=0
33
	compteur=0
34
	for i in "$@";do
34
	for i in "$@";do
35
		if [ -f "$i" ];then
35
		if [ -f "$i" ];then
36
			#test if cancel button has been pushed
36
			#test if cancel button has been pushed
37
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
37
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
38
				dcop "$dcopRef" close
38
				qdbus $dbusRef close
39
				exit 1
39
				exit 1
40
			fi
40
			fi
41
			let "compteur +=1"
41
			let "compteur +=1"
42
			FILE="$i"
42
			FILE="$i"
43
			qdbus $dbusRef setLabelText "Kim - Compressing file: `basename "$FILE"`"
43
			mogrify -quality $QUALITY "$FILE"
44
			mogrify -quality $QUALITY "$FILE"
44
			dcop "$dcopRef" setLabel "Kim - Compressing file: `basename "$FILE"`"
45
			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value $compteur
45
	 		dcop "$dcopRef" setProgress "$compteur"
46
		fi;
46
		fi;
47
	done
47
	done
48
	dcop "$dcopRef" close;;
48
	qdbus $dbusRef close;;
49
	
49
	
50
	1)
50
	1)
51
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
51
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
52
	dcop "$dcopRef" showCancelButton true
52
	qdbus $dbusRef showCancelButton true
53
	compteur=0
53
	compteur=0
54
	for i in "$@";do
54
	for i in "$@";do
55
		if [ -f "$i" ];then
55
		if [ -f "$i" ];then
56
			#test if cancel button has been pushed
56
			#test if cancel button has been pushed
57
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
57
			if test "true" = `qdbus $dbusRef wasCancelled`;then
58
				dcop "$dcopRef" close
58
				qdbus $dbusRef close
59
				exit 1
59
				exit 1
60
			fi
60
			fi
61
			let "compteur +=1"
61
			let "compteur +=1"
62
			FILE="$i"
62
			FILE="$i"
63
			convert -quality $QUALITY "$FILE" $DIR/compressed_"`basename "$FILE"`"
63
			convert -quality $QUALITY "$FILE" $DIR/compressed_"`basename "$FILE"`"
64
			dcop "$dcopRef" setLabel "Kim - Compressing file: `basename "$FILE"`"
64
			qdbus $dbusRef setLabelText "Kim - Compressing file: `basename "$FILE"`"
65
	 		dcop "$dcopRef" setProgress "$compteur"
65
#	 		qdbus $dbusRef setProgress "$compteur"
66
		fi;
66
		fi;
67
	done
67
	done
68
	dcop "$dcopRef" close;;
68
	qdbus $dbusRef close;;
69
	
69
	
70
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
70
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
71
	exit 1;;
71
	exit 1;;
(-)kim/src/bin/kim_convert (-7 / +7 lines)
Lines 24-46 Link Here
24
FILE="";
24
FILE="";
25
FORMAT="$1";
25
FORMAT="$1";
26
let "nbfiles = $# -1"
26
let "nbfiles = $# -1"
27
dcopRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
27
dbusRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
28
dcop "$dcopRef" showCancelButton true
28
qdbus $dbusRef showCancelButton "true"
29
29
30
compteur=0
30
compteur=0
31
for i in "$@";do
31
for i in "$@";do
32
	if [ -f "$i" ];then
32
	if [ -f "$i" ];then
33
		#test if cancel button has been pushed
33
		#test if cancel button has been pushed
34
		if test "true" = `dcop "$dcopRef" wasCancelled`;then
34
		if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
35
			dcop "$dcopRef" close
35
			qdbus $dbusRef close
36
			exit 1
36
			exit 1
37
		fi
37
		fi
38
		let "compteur +=1"
38
		let "compteur +=1"
39
		FILE="$i"
39
		FILE="$i"
40
		qdbus $dbusRef setLabelText "Kim - Converting file: `basename "$FILE"`"
40
		mogrify -format "$FORMAT" "$FILE"
41
		mogrify -format "$FORMAT" "$FILE"
41
		dcop "$dcopRef" setLabel "Kim - Converting file: `basename "$FILE"`"
42
		qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value $compteur
42
 		dcop "$dcopRef" setProgress "$compteur"
43
	fi;
43
	fi;
44
done
44
done
45
45
46
dcop "$dcopRef" close
46
qdbus $dbusRef close
(-)kim/src/bin/kim_flipflop (-7 / +7 lines)
Lines 24-46 Link Here
24
FILE="";
24
FILE="";
25
ANGLE="$1";
25
ANGLE="$1";
26
let "nbfiles = $# -1"
26
let "nbfiles = $# -1"
27
dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
27
dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
28
dcop "$dcopRef" showCancelButton true
28
qdbus $dbusRef showCancelButton true
29
29
30
compteur=0
30
compteur=0
31
for i in "$@";do
31
for i in "$@";do
32
	if [ -f "$i" ];then
32
	if [ -f "$i" ];then
33
		#test if cancel button has been pushed
33
		#test if cancel button has been pushed
34
		if test "true" = `dcop "$dcopRef" wasCancelled`;then
34
		if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
35
			dcop "$dcopRef" close
35
			qdbus $dbusRef close
36
			exit 1
36
			exit 1
37
		fi
37
		fi
38
		let "compteur +=1"
38
		let "compteur +=1"
39
		FILE="$i"
39
		FILE="$i"
40
		qdbus $dbusRef setLabelText "Kim - Rotating file: `basename "$FILE"`"
40
		mogrify -$ANGLE "$FILE"
41
		mogrify -$ANGLE "$FILE"
41
		dcop "$dcopRef" setLabel "Kim - Rotating file: `basename "$FILE"`"
42
		qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
42
 		dcop "$dcopRef" setProgress "$compteur"
43
	fi;
43
	fi;
44
done
44
done
45
45
46
dcop "$dcopRef" close
46
qdbus $dbusRef close
(-)kim/src/bin/kim_galery (-10 / +10 lines)
Lines 1-9 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# Create a html galery
2
# Create a html gallery
3
FILE="";
3
FILE="";
4
let "nbfiles = $#"
4
let "nbfiles = $#"
5
kdeinstdir=`kde-config --prefix`
5
kdeinstdir=`kde4-config --prefix`
6
KIM_DIR=$kdeinstdir/share/apps/kim/galery
6
KIM_DIR=$kdeinstdir/share/apps/kim/gallery
7
TITLE=`kdialog --inputbox "Kim - Title:" "My title ..."`;
7
TITLE=`kdialog --inputbox "Kim - Title:" "My title ..."`;
8
AUTHOR=`kdialog --inputbox "Kim - Author:" "$USER"`;
8
AUTHOR=`kdialog --inputbox "Kim - Author:" "$USER"`;
9
DATE=`date '+%A %-d %B %Y'`;
9
DATE=`date '+%A %-d %B %Y'`;
Lines 14-21 DIR=`kdialog --getexistingdirectory /hom Link Here
14
W="200";
14
W="200";
15
H="150";
15
H="150";
16
16
17
dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
17
dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
18
dcop "$dcopRef" showCancelButton true
18
qdbus $dbusRef showCancelButton true
19
19
20
# Creation of directories
20
# Creation of directories
21
mkdir $DIR/images;
21
mkdir $DIR/images;
Lines 31-38 tmp=0; Link Here
31
for i in "$@";do
31
for i in "$@";do
32
	if [ -f "$i" ];then
32
	if [ -f "$i" ];then
33
		#test if cancel button has been pushed
33
		#test if cancel button has been pushed
34
		if test "true" = `dcop "$dcopRef" wasCancelled`;then
34
		if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
35
			dcop "$dcopRef" close
35
			qdbus $dbusRef close
36
			exit 1
36
			exit 1
37
		fi
37
		fi
38
		let "compteur +=1"
38
		let "compteur +=1"
Lines 54-65 for i in "$@";do Link Here
54
		then 	echo '</tr><tr>' >> $DIR/index.html;
54
		then 	echo '</tr><tr>' >> $DIR/index.html;
55
			tmp=0;
55
			tmp=0;
56
		fi
56
		fi
57
		dcop "$dcopRef" setLabel "Kim - Treatment of file: "$IMAGE""
57
		qdbus $dbusRef setLabelText "Kim - Treatment of file: "$IMAGE""
58
 		dcop "$dcopRef" setProgress "$compteur"
58
 		qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
59
	fi;
59
	fi;
60
done
60
done
61
61
62
cat $KIM_DIR/index.part2 >> $DIR/index.html;
62
cat $KIM_DIR/index.part2 >> $DIR/index.html;
63
dcop "$dcopRef" close;
63
qdbus $dbusRef close;
64
64
65
konqueror $DIR/index.html;
65
konqueror $DIR/index.html;
(-)kim/src/bin/kim_multiburst (-8 / +8 lines)
Lines 23-35 Link Here
23
#	Mathieu Vilaplana <mathieu@creationgif.com>
23
#	Mathieu Vilaplana <mathieu@creationgif.com>
24
#		Raphaël Pinson <raphink@raphink.net>
24
#		Raphaël Pinson <raphink@raphink.net>
25
25
26
test -n "$KDEHOME" || KDEHOME="`kde-config --localprefix`"; export KDEHOME
26
test -n "$KDEHOME" || KDEHOME="`kde4-config --localprefix`"; export KDEHOME
27
#KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$USER"/kim.XXXXXXXX` || exit 1
27
#KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$USER"/kim.XXXXXXXX` || exit 1
28
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
28
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
29
29
30
let "nbfiles = $# -1"
30
let "nbfiles = $# -1"
31
dcopRef=`kdialog --progressbar "Kim - Initialising compression" "$nbfiles"`
31
dbusRef=`kdialog --progressbar "Kim - Initialising compression" "$nbfiles"`
32
dcop "$dcopRef" showCancelButton true
32
qdbus $dbusRef showCancelButton true
33
33
34
compteur=0
34
compteur=0
35
35
Lines 39-54 do Link Here
39
	for ((j=1;j<=4;j++))
39
	for ((j=1;j<=4;j++))
40
	do
40
	do
41
		#test if cancel button has been pushed
41
		#test if cancel button has been pushed
42
		if test "true" = `dcop "$dcopRef" wasCancelled`;then
42
		if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
43
			dcop "$dcopRef" close
43
			qdbus $dbusRef close
44
			exit 1
44
			exit 1
45
		fi
45
		fi
46
		let "compteur +=1"
46
		let "compteur +=1"
47
		x=$((($j-1)*320));
47
		x=$((($j-1)*320));
48
		y=$((($i-1)*240));
48
		y=$((($i-1)*240));
49
		convert -crop 320x240+$x+$y "$1" "$KIMDIR"/imagette.$i.$j.jpg
49
		convert -crop 320x240+$x+$y "$1" "$KIMDIR"/imagette.$i.$j.jpg
50
		dcop "$dcopRef" setLabel "Kim - Compressing file `basename "$FILE"`"
50
		qdbus $dbusRef setLabelText "Kim - Compressing file `basename "$FILE"`"
51
 		dcop "$dcopRef" setProgress "$compteur"
51
 		qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
52
	done
52
	done
53
done
53
done
54
54
Lines 59-63 convert -adjoin -delay 5 imagette.*.jpg Link Here
59
rm "$KIMDIR"/imagette.*.jpg
59
rm "$KIMDIR"/imagette.*.jpg
60
rm -rf "$KIMDIR"
60
rm -rf "$KIMDIR"
61
61
62
dcop "$dcopRef" close
62
qdbus $dbusRef close
63
63
(-)kim/src/bin/kim_other (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
ATTACHMENTS="";
22
ATTACHMENTS="";
23
ACTION="$1";
23
ACTION="$1";
24
kdeinstdir=`kde-config --prefix`
24
kdeinstdir=`kde4-config --prefix`
25
25
26
case $ACTION in 
26
case $ACTION in 
27
	about) kdialog --textbox "$kdeinstdir/share/apps/kim/kim_about.txt" 600 400;;
27
	about) kdialog --textbox "$kdeinstdir/share/apps/kim/kim_about.txt" 600 400;;
(-)kim/src/bin/kim_pelemele (-8 / +8 lines)
Lines 22-28 Link Here
22
FILE="";
22
FILE="";
23
let "nbfiles = $#"
23
let "nbfiles = $#"
24
24
25
test -n "$KDEHOME" || KDEHOME="`kde-config --localprefix`"; export KDEHOME
25
test -n "$KDEHOME" || KDEHOME="`kde4-config --localprefix`"; export KDEHOME
26
TMPDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
26
TMPDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
27
27
28
SIZE=`kdialog --inputbox "Size of small images:" 400x400`;
28
SIZE=`kdialog --inputbox "Size of small images:" 400x400`;
Lines 33-47 W=`echo $SIZE | sed 's/[^0-9]/ /g' | awk Link Here
33
let "OVER = ($RATIO*$W)/100";
33
let "OVER = ($RATIO*$W)/100";
34
let "BORDER = (2*$W)/100";
34
let "BORDER = (2*$W)/100";
35
35
36
dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
36
dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
37
dcop "$dcopRef" showCancelButton true
37
qdbus $dbusRef showCancelButton true
38
compteur=0
38
compteur=0
39
39
40
for i in "$@";do
40
for i in "$@";do
41
	if [ -f "$i" ];then 
41
	if [ -f "$i" ];then 
42
		#test if cancel button has been pushed
42
		#test if cancel button has been pushed
43
		if test "true" = `dcop "$dcopRef" wasCancelled`;then
43
		if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
44
			dcop "$dcopRef" close
44
			qdbus $dbusRef close
45
			rm -rf "$KDEHOME"/tmp-"$HOST"/kim.*
45
			rm -rf "$KDEHOME"/tmp-"$HOST"/kim.*
46
			exit 1
46
			exit 1
47
		fi
47
		fi
Lines 60-70 for i in "$@";do Link Here
60
			-background  none   -flatten \
60
			-background  none   -flatten \
61
			-depth 8  -quality 95 "$TMPDIR/pelemele_$RANDOM.png"
61
			-depth 8  -quality 95 "$TMPDIR/pelemele_$RANDOM.png"
62
		#	-depth 8  -quality 95 "$TMPDIR/pelemele_$FILE.png"
62
		#	-depth 8  -quality 95 "$TMPDIR/pelemele_$FILE.png"
63
		dcop "$dcopRef" setLabel "Kim - resizing of file: $FILE"
63
		qdbus $dbusRef setLabelText "Kim - resizing of file: $FILE"
64
 		dcop "$dcopRef" setProgress "$compteur"
64
 		qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
65
		fi;
65
		fi;
66
done
66
done
67
dcop "$dcopRef" close;
67
qdbus $dbusRef close;
68
68
69
montage -background $COLOR -tile $TILE -geometry -$OVER-$OVER $TMPDIR/pelemele_*.png `kdialog --getsavefilename ~ *.png`;
69
montage -background $COLOR -tile $TILE -geometry -$OVER-$OVER $TMPDIR/pelemele_*.png `kdialog --getsavefilename ~ *.png`;
70
70
(-)kim/src/bin/kim_print (-25 / +25 lines)
Lines 18-95 Link Here
18
18
19
dir="$1";
19
dir="$1";
20
let "nbfiles = $#"
20
let "nbfiles = $#"
21
test -n "$KDEHOME" || KDEHOME="`kde-config --localprefix`"; export KDEHOME;
21
test -n "$KDEHOME" || KDEHOME="`kde4-config --localprefix`"; export KDEHOME;
22
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1;
22
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1;
23
23
24
nb=`kdialog --radiolist "Kim - Select album type:" 1 "9x13 cm: 2x2 images, landscape"  off 2 "10x15 cm: 1x2 images, portrait"  off 3 "11.5x15 cm: 1x2 images, portrait"  on 4 "13x18 cm: 1x2 images, portrait"  off 5 "20x25 cm: 1 image, landscape" off 6 "3x2 portrait album"  off 7 "Thumbnails: 4x5 images, portrait" off`
24
nb=`kdialog --radiolist "Kim - Select album type:" 1 "9x13 cm: 2x2 images, landscape"  off 2 "10x15 cm: 1x2 images, portrait"  off 3 "11.5x15 cm: 1x2 images, portrait"  on 4 "13x18 cm: 1x2 images, portrait"  off 5 "20x25 cm: 1 image, landscape" off 6 "3x2 portrait album"  off 7 "Thumbnails: 4x5 images, portrait" off`
25
25
26
dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
26
dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
27
dcop "$dcopRef" showCancelButton true
27
qdbus $dbusRef showCancelButton true
28
compteur=0
28
compteur=0
29
29
30
case "$nb" in
30
case "$nb" in
31
1)	for i in "$@";do
31
1)	for i in "$@";do
32
		if [ -f "$i" ];then
32
		if [ -f "$i" ];then
33
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
33
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
34
				dcop "$dcopRef" close
34
				qdbus $dbusRef close
35
				rm -rf "$KDEHOME"/tmp-"$HOST"/kim.*
35
				rm -rf "$KDEHOME"/tmp-"$HOST"/kim.*
36
				exit 1
36
				exit 1
37
			fi
37
			fi
38
			let "compteur +=1"
38
			let "compteur +=1"
39
			FILE=`basename "$i"`;
39
			FILE=`basename "$i"`;
40
			convert -resize 640x480 -rotate '90<' $i "$TMPDIR/mini_$FILE";
40
			convert -resize 640x480 -rotate '90<' $i "$TMPDIR/mini_$FILE";
41
			dcop "$dcopRef" setLabel "Kim - resizing of file: $FILE"
41
			qdbus $dbusRef setLabelText "Kim - resizing of file: $FILE"
42
 			dcop "$dcopRef" setProgress "$compteur"
42
 			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
43
		fi;
43
		fi;
44
	done
44
	done
45
	dcop "$dcopRef" close;
45
	qdbus $dbusRef close;
46
	montage -tile 2x2 -geometry 600x800+5+5 -page 595x842 "$KIMDIR"/mini_* `kdialog --getsavefilename "$dir" *.pdf`;
46
	montage -tile 2x2 -geometry 600x800+5+5 -page 595x842 "$KIMDIR"/mini_* `kdialog --getsavefilename "$dir" *.pdf`;
47
	rm -rf "$KDEHOME"/tmp-"$HOST"/kim.*;;
47
	rm -rf "$KDEHOME"/tmp-"$HOST"/kim.*;;
48
48
49
2)	montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
49
2)	montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
50
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
50
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
51
	dcop "$dcopRef" setProgress 1
51
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
52
	montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" 
52
	montage -tile 1x1 -geometry 800x600+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" 
53
*.pdf`;;
53
*.pdf`;;
54
54
55
3)	montage -tile 1x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
55
3)	montage -tile 1x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
56
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
56
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
57
	dcop "$dcopRef" setProgress 1
57
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
58
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
58
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
59
59
60
4)	montage -tile 1x2 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg
60
4)	montage -tile 1x2 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg
61
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
61
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
62
	dcop "$dcopRef" setProgress 1
62
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
63
	montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
63
	montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
64
	
64
	
65
5)	montage -tile 2x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
65
5)	montage -tile 2x2 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg
66
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
66
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
67
	dcop "$dcopRef" setProgress 1
67
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
68
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
68
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
69
	
69
	
70
6)	montage -tile 2x3 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg 
70
6)	montage -tile 2x3 -geometry 640x480+5+5 -page 842x595 "$@" "$KIMDIR"/miniature.jpg 
71
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
71
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
72
	dcop "$dcopRef" setProgress 1
72
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
73
	montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
73
	montage -tile 1x1 -geometry 480x640+5+5 -page 842x595 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
74
74
75
7)	montage -tile 4x3 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg 
75
7)	montage -tile 4x3 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg 
76
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
76
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
77
	dcop "$dcopRef" setProgress 1
77
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
78
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
78
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
79
	
79
	
80
8)	montage -tile 4x4 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg 
80
8)	montage -tile 4x4 -geometry 640x480+5+5 -page 595x842 "$@" "$KIMDIR"/miniature.jpg 
81
	dcop "$dcopRef" setLabel "Kim - Creating album ..."
81
	qdbus $dbusRef setLabelText "Kim - Creating album ..."
82
	dcop "$dcopRef" setProgress 1
82
	qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 1
83
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
83
	montage -tile 1x1 -geometry 640x480+5+5 -page 595x842 "$KIMDIR"/miniature*.jpg* `kdialog --getsavefilename "$dir" *.pdf`;;
84
84
85
*) kdialog --msgbox "Kim - Unrecognized option ! ";;
85
*) kdialog --msgbox "Kim - Unrecognized option ! ";;
86
esac
86
esac
87
87
88
dcop "$dcopRef" setLabel "Kim - Deleting miniatures ..."
88
qdbus $dbusRef setLabelText "Kim - Deleting miniatures ..."
89
dcop "$dcopRef" setProgress 2
89
qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value 2
90
#rm "$KIMDIR"/miniature*.jpg*
90
#rm "$KIMDIR"/miniature*.jpg*
91
rm -rf "$KIMDIR"
91
rm -rf "$KIMDIR"
92
dcop "$dcopRef" close
92
qdbus $dbusRef close
93
93
94
94
95
95
(-)kim/src/bin/kim_record (-1 / +1 lines)
Lines 20-26 Link Here
20
# Author: Charles Bouveyron <charles.bouveyron@free.fr>
20
# Author: Charles Bouveyron <charles.bouveyron@free.fr>
21
#		Raphaël Pinson <raphink@raphink.net>
21
#		Raphaël Pinson <raphink@raphink.net>
22
22
23
test -n "$KDEHOME" || KDEHOME="`kde-config --localprefix`"; export KDEHOME
23
test -n "$KDEHOME" || KDEHOME="`kde4-config --localprefix`"; export KDEHOME
24
#KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$USER"/kim.XXXXXXXX` || exit 1
24
#KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$USER"/kim.XXXXXXXX` || exit 1
25
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
25
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
26
26
(-)kim/src/bin/kim_record_mpg (-1 / +1 lines)
Lines 20-26 Link Here
20
# Author: Charles Bouveyron <charles.bouveyron@free.fr>
20
# Author: Charles Bouveyron <charles.bouveyron@free.fr>
21
#		Raphaël Pinson <raphink@raphink.net>
21
#		Raphaël Pinson <raphink@raphink.net>
22
22
23
test -n "$KDEHOME" || KDEHOME="`kde-config --localprefix`"; export KDEHOME
23
test -n "$KDEHOME" || KDEHOME="`kde4-config --localprefix`"; export KDEHOME
24
#KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$USER"/kim.XXXXXXXX` || exit 1
24
#KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$USER"/kim.XXXXXXXX` || exit 1
25
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
25
KIMDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
26
26
(-)kim/src/bin/kim_rename (-14 / +14 lines)
Lines 27-41 DIR="$1"; Link Here
27
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
27
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
28
case $? in
28
case $? in
29
	0)	# Replace exisiting files !
29
	0)	# Replace exisiting files !
30
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
30
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
31
	dcop "$dcopRef" showCancelButton true
31
	qdbus $dbusRef showCancelButton true
32
	compteur=0
32
	compteur=0
33
	newname=`kdialog --inputbox "Choose the new name of images:" "wallpaper_"`
33
	newname=`kdialog --inputbox "Choose the new name of images:" "wallpaper_"`
34
	for i in "$@";do
34
	for i in "$@";do
35
		if [ -f "$i" ];then 
35
		if [ -f "$i" ];then 
36
			#test if cancel button has been pushed
36
			#test if cancel button has been pushed
37
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
37
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
38
				dcop "$dcopRef" close
38
				qdbus $dbusRef close
39
				exit 1
39
				exit 1
40
			fi
40
			fi
41
			let "compteur +=1"
41
			let "compteur +=1"
Lines 48-69 case $? in Link Here
48
				fi
48
				fi
49
			fi
49
			fi
50
			mv "$FILE" "$DIR/$newname$suff$compteur.jpg"
50
			mv "$FILE" "$DIR/$newname$suff$compteur.jpg"
51
			dcop "$dcopRef" setLabel "Kim - Renaming file: `basename "$FILE"`"
51
			qdbus $dbusRef setLabelText "Kim - Renaming file: `basename "$FILE"`"
52
 			dcop "$dcopRef" setProgress "$compteur"
52
 			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
53
		fi;
53
		fi;
54
	done
54
	done
55
	dcop "$dcopRef" close;;
55
	qdbus $dbusRef close;;
56
	
56
	
57
	1) 
57
	1) 
58
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
58
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
59
	dcop "$dcopRef" showCancelButton true
59
	qdbus $dbusRef showCancelButton true
60
	compteur=0
60
	compteur=0
61
	newname="`kdialog --inputbox "Choose the new name of images:" "wallpaper_"`"
61
	newname="`kdialog --inputbox "Choose the new name of images:" "wallpaper_"`"
62
	for i in "$@";do
62
	for i in "$@";do
63
		if [ -f "$i" ];then 
63
		if [ -f "$i" ];then 
64
			#test if cancel button has been pushed
64
			#test if cancel button has been pushed
65
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
65
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
66
				dcop "$dcopRef" close
66
				qdbus $dbusRef close
67
				exit 1
67
				exit 1
68
			fi
68
			fi
69
			let "compteur +=1"
69
			let "compteur +=1"
Lines 76-86 case $? in Link Here
76
				fi
76
				fi
77
			fi
77
			fi
78
			cp "$FILE" "$DIR/$newname$suff$compteur.jpg"
78
			cp "$FILE" "$DIR/$newname$suff$compteur.jpg"
79
			dcop "$dcopRef" setLabel "Kim - Renaming file: `basename "$FILE"`"
79
			qdbus $dbusRef setLabelText "Kim - Renaming file: `basename "$FILE"`"
80
 			dcop "$dcopRef" setProgress "$compteur"
80
 			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
81
		fi;
81
		fi;
82
	done
82
	done
83
	dcop "$dcopRef" close;;
83
	qdbus $dbusRef close;;
84
	
84
	
85
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
85
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
86
	exit 1;;
86
	exit 1;;
(-)kim/src/bin/kim_resize (-14 / +14 lines)
Lines 28-71 DIR="$2"; Link Here
28
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
28
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
29
case $? in
29
case $? in
30
	0)	# Replace exisiting files !
30
	0)	# Replace exisiting files !
31
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
31
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
32
	dcop "$dcopRef" showCancelButton true
32
	qdbus $dbusRef showCancelButton true
33
	compteur=0
33
	compteur=0
34
	for i in "$@";do
34
	for i in "$@";do
35
		if [ -f "$i" ];then 
35
		if [ -f "$i" ];then 
36
			#test if cancel button has been pushed
36
			#test if cancel button has been pushed
37
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
37
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
38
				dcop "$dcopRef" close
38
				qdbus $dbusRef close
39
				exit 1
39
				exit 1
40
			fi
40
			fi
41
			let "compteur +=1"
41
			let "compteur +=1"
42
			FILE="$i"
42
			FILE="$i"
43
			mogrify -resize "$SCALE" "$FILE";
43
			mogrify -resize "$SCALE" "$FILE";
44
			dcop "$dcopRef" setLabel "Kim - Resizing file: `basename "$FILE"`"
44
			qdbus $dbusRef setLabelText "Kim - Resizing file: `basename "$FILE"`"
45
 			dcop "$dcopRef" setProgress "$compteur"
45
 			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
46
		fi;
46
		fi;
47
	done
47
	done
48
	dcop "$dcopRef" close;;
48
	qdbus $dbusRef close;;
49
	
49
	
50
	1) 
50
	1) 
51
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
51
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
52
	dcop "$dcopRef" showCancelButton true
52
	qdbus $dbusRef showCancelButton true
53
	compteur=0
53
	compteur=0
54
	for i in "$@";do
54
	for i in "$@";do
55
		if [ -f "$i" ];then 
55
		if [ -f "$i" ];then 
56
			#test if cancel button has been pushed
56
			#test if cancel button has been pushed
57
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
57
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
58
				dcop "$dcopRef" close
58
				qdbus $dbusRef close
59
				exit 1
59
				exit 1
60
			fi
60
			fi
61
			let "compteur +=1"
61
			let "compteur +=1"
62
			FILE="$i"
62
			FILE="$i"
63
			convert -resize "$SCALE" "$FILE" "$DIR/resized_`basename "$FILE"`";
63
			convert -resize "$SCALE" "$FILE" "$DIR/resized_`basename "$FILE"`";
64
			dcop "$dcopRef" setLabel "Kim - Resizing file: `basename "$FILE"`"
64
			qdbus $dbusRef setLabelText "Kim - Resizing file: `basename "$FILE"`"
65
 			dcop "$dcopRef" setProgress "$compteur"
65
 			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
66
		fi;
66
		fi;
67
	done
67
	done
68
	dcop "$dcopRef" close;;
68
	qdbus $dbusRef close;;
69
	
69
	
70
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
70
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
71
	exit 1;;
71
	exit 1;;
(-)kim/src/bin/kim_resizeandsend (-8 / +8 lines)
Lines 21-27 Link Here
21
#		Mathieu Vilaplana <mathieu@creationgif.com>
21
#		Mathieu Vilaplana <mathieu@creationgif.com>
22
#		Raphaël Pinson <raphink@raphink.net>
22
#		Raphaël Pinson <raphink@raphink.net>
23
23
24
test -n "$KDEHOME" || KDEHOME="`kde-config --localprefix`"; export KDEHOME
24
test -n "$KDEHOME" || KDEHOME="`kde4-config --localprefix`"; export KDEHOME
25
TMPDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
25
TMPDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
26
26
27
ATTACHMENTS="";
27
ATTACHMENTS="";
Lines 29-50 ATTACHMENTS=""; Link Here
29
choice=`kdialog --radiolist "Kim - Send by mail:" 1 "Full size"  off 2 "800x600 px"  on 3 "600x450 px" off 4 "300x225 px"  off`;
29
choice=`kdialog --radiolist "Kim - Send by mail:" 1 "Full size"  off 2 "800x600 px"  on 3 "600x450 px" off 4 "300x225 px"  off`;
30
30
31
let "nbfiles = $#" 
31
let "nbfiles = $#" 
32
dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
32
dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
33
dcop $dcopRef showCancelButton true 
33
qdbus $dbusRef showCancelButton true 
34
34
35
compteur=0
35
compteur=0
36
36
37
for i in "$@";do
37
for i in "$@";do
38
	if [ -f "$i" ];then
38
	if [ -f "$i" ];then
39
		#test if cancel button has been pushed
39
		#test if cancel button has been pushed
40
		if test "true" = `dcop $dcopRef wasCancelled`;then
40
		if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
41
			dcop "$dcopRef" close
41
			qdbus $dbusRef close
42
			exit 1
42
			exit 1
43
		fi
43
		fi
44
		ATTACHMENTS="$i"
44
		ATTACHMENTS="$i"
45
		let "compteur +=1"
45
		let "compteur +=1"
46
		dcop "$dcopRef" setLabel "Kim - Resizing and compressing file: `basename "$ATTACHMENTS"`"
46
		qdbus $dbusRef setLabelText "Kim - Resizing and compressing file: `basename "$ATTACHMENTS"`"
47
 		dcop "$dcopRef" setProgress $compteur
47
 		qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value $compteur
48
		case "$choice" in 
48
		case "$choice" in 
49
			1) cp $i $TMPDIR;;
49
			1) cp $i $TMPDIR;;
50
			2) convert -resize 800x800 "$ATTACHMENTS" "$TMPDIR"/`basename "$ATTACHMENTS"`;;
50
			2) convert -resize 800x800 "$ATTACHMENTS" "$TMPDIR"/`basename "$ATTACHMENTS"`;;
Lines 56-61 for i in "$@";do Link Here
56
done
56
done
57
57
58
kmail --attach "$TMPDIR"/*;
58
kmail --attach "$TMPDIR"/*;
59
dcop "$dcopRef" close;
59
qdbus $dbusRef close;
60
kdialog --msgbox "Kim - Send by mail: you can write your message!"
60
kdialog --msgbox "Kim - Send by mail: you can write your message!"
61
rm -rf "$TMPDIR"
61
rm -rf "$TMPDIR"
(-)kim/src/bin/kim_rotate (-7 / +7 lines)
Lines 24-38 Link Here
24
FILE="";
24
FILE="";
25
ANGLE="$1";
25
ANGLE="$1";
26
let "nbfiles = $# -1"
26
let "nbfiles = $# -1"
27
dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
27
dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
28
dcop "$dcopRef" showCancelButton true
28
qdbus $dbusRef showCancelButton true
29
29
30
compteur=0
30
compteur=0
31
for i in "$@";do
31
for i in "$@";do
32
	if [ -f "$i" ];then
32
	if [ -f "$i" ];then
33
		#test if cancel button has been pushed
33
		#test if cancel button has been pushed
34
		if test "true" = `dcop "$dcopRef" wasCancelled`;then
34
		if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
35
			dcop "$dcopRef" close
35
			qdbus $dbusRef close
36
			exit 1
36
			exit 1
37
		fi
37
		fi
38
		let "compteur +=1"
38
		let "compteur +=1"
Lines 41-49 for i in "$@";do Link Here
41
			mogrify -auto-orient "$FILE";
41
			mogrify -auto-orient "$FILE";
42
		else mogrify -rotate $ANGLE "$FILE"
42
		else mogrify -rotate $ANGLE "$FILE"
43
		fi
43
		fi
44
		dcop "$dcopRef" setLabel "Kim - Rotating file: `basename "$FILE"`"
44
		qdbus $dbusRef setLabelText "Kim - Rotating file: `basename "$FILE"`"
45
 		dcop "$dcopRef" setProgress "$compteur"
45
 		qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
46
	fi;
46
	fi;
47
done
47
done
48
48
49
dcop "$dcopRef" close
49
qdbus $dbusRef close
(-)kim/src/bin/kim_rotate~ (-46 lines)
Lines 1-46 Link Here
1
#!/bin/bash
2
#
3
# Copyright (C) 2005,2006  Charles Bouveyron <charles.bouveyron@free.fr>
4
# 
5
# This program is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU General Public License
7
# as published by the Free Software Foundation; either version 2
8
# of the License, or (at your option) any later version.
9
# 
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
14
# 
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, U
18
#
19
# Author : 	Charles Bouveyron <charles.bouveyron@free.fr>
20
#		Alessandro Faggiano <>
21
#		Mathieu Vilaplana <mathieu@creationgif.com>
22
#		Raphaël Pinson <raphink@raphink.net>
23
24
FILE="";
25
ANGLE="$1";
26
let "nbfiles = $# -1"
27
dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
28
dcop "$dcopRef" showCancelButton true
29
30
compteur=0
31
for i in "$@";do
32
	if [ -f "$i" ];then
33
		#test if cancel button has been pushed
34
		if test "true" = `dcop "$dcopRef" wasCancelled`;then
35
			dcop "$dcopRef" close
36
			exit 1
37
		fi
38
		let "compteur +=1"
39
		FILE="$i"
40
		mogrify -rotate $ANGLE "$FILE"
41
		dcop "$dcopRef" setLabel "Kim - Rotating file: `basename "$FILE"`"
42
 		dcop "$dcopRef" setProgress "$compteur"
43
	fi;
44
done
45
46
dcop "$dcopRef" close
(-)kim/src/bin/kim_rotatewithexif (-7 / +7 lines)
Lines 24-46 Link Here
24
FILE="";
24
FILE="";
25
ANGLE="$1";
25
ANGLE="$1";
26
let "nbfiles = $# -1"
26
let "nbfiles = $# -1"
27
dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
27
dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
28
dcop "$dcopRef" showCancelButton true
28
qdbus $dbusRef showCancelButton true
29
29
30
compteur=0
30
compteur=0
31
for i in "$@";do
31
for i in "$@";do
32
	if [ -f "$i" ];then
32
	if [ -f "$i" ];then
33
		#test if cancel button has been pushed
33
		#test if cancel button has been pushed
34
		if test "true" = `dcop "$dcopRef" wasCancelled`;then
34
		if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
35
			dcop "$dcopRef" close
35
			qdbus $dbusRef close
36
			exit 1
36
			exit 1
37
		fi
37
		fi
38
		let "compteur +=1"
38
		let "compteur +=1"
39
		FILE="$i"
39
		FILE="$i"
40
		mogrify -rotate $ANGLE "$FILE"
40
		mogrify -rotate $ANGLE "$FILE"
41
		dcop "$dcopRef" setLabel "Kim - Rotating file: `basename "$FILE"`"
41
		qdbus $dbusRef setLabelText "Kim - Rotating file: `basename "$FILE"`"
42
 		dcop "$dcopRef" setProgress "$compteur"
42
 		qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
43
	fi;
43
	fi;
44
done
44
done
45
45
46
dcop "$dcopRef" close
46
qdbus $dbusRef close
(-)kim/src/bin/kim_slideshow (-8 / +8 lines)
Lines 2-8 Link Here
2
# Create a Flash slideshow
2
# Create a Flash slideshow
3
FILE="";
3
FILE="";
4
let "nbfiles = $#"
4
let "nbfiles = $#"
5
kdeinstdir=`kde-config --prefix`
5
kdeinstdir=`kde4-config --prefix`
6
KIM_DIR=$kdeinstdir/share/apps/kim/slideshow
6
KIM_DIR=$kdeinstdir/share/apps/kim/slideshow
7
TITLE=`kdialog --inputbox "Kim - Title:" "My title ..."`;
7
TITLE=`kdialog --inputbox "Kim - Title:" "My title ..."`;
8
AUTHOR=`kdialog --inputbox "Kim - Author:" "$USER"`;
8
AUTHOR=`kdialog --inputbox "Kim - Author:" "$USER"`;
Lines 12-19 DIR=`kdialog --getexistingdirectory /hom Link Here
12
W=`echo $SCALE | sed 's/[^0-9]/ /g' | awk '{print $1}'`;
12
W=`echo $SCALE | sed 's/[^0-9]/ /g' | awk '{print $1}'`;
13
H=`echo $SCALE | sed 's/[^0-9]/ /g' | awk '{print $2}'`;
13
H=`echo $SCALE | sed 's/[^0-9]/ /g' | awk '{print $2}'`;
14
14
15
dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
15
dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
16
dcop "$dcopRef" showCancelButton true
16
qdbus $dbusRef showCancelButton true
17
17
18
mkdir $DIR/images;
18
mkdir $DIR/images;
19
cp $KIM_DIR/dewslider.swf $DIR;
19
cp $KIM_DIR/dewslider.swf $DIR;
Lines 39-57 compteur=0 Link Here
39
for i in "$@";do
39
for i in "$@";do
40
	if [ -f "$i" ];then
40
	if [ -f "$i" ];then
41
		#test if cancel button has been pushed
41
		#test if cancel button has been pushed
42
		if test "true" = `dcop "$dcopRef" wasCancelled`;then
42
		if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
43
			dcop "$dcopRef" close
43
			qdbus $dbusRef close
44
			exit 1
44
			exit 1
45
		fi
45
		fi
46
		let "compteur +=1"
46
		let "compteur +=1"
47
		FILE="$i"
47
		FILE="$i"
48
		convert -resize $SCALE "$FILE" $DIR/images/`basename "$FILE"`.jpg;
48
		convert -resize $SCALE "$FILE" $DIR/images/`basename "$FILE"`.jpg;
49
		echo '<img src="images/'`basename "$FILE"`'.jpg" title="'`basename "$FILE"`'" />' >> $DIR/dewslider.xml;
49
		echo '<img src="images/'`basename "$FILE"`'.jpg" title="'`basename "$FILE"`'" />' >> $DIR/dewslider.xml;
50
		dcop "$dcopRef" setLabel "Kim - Treatment of file: `basename "$FILE"`"
50
		qdbus $dbusRef setLabelText "Kim - Treatment of file: `basename "$FILE"`"
51
 		dcop "$dcopRef" setProgress "$compteur"
51
 		qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
52
	fi;
52
	fi;
53
done
53
done
54
54
55
echo '</album>' >> $DIR/dewslider.xml;
55
echo '</album>' >> $DIR/dewslider.xml;
56
dcop "$dcopRef" close;
56
qdbus $dbusRef close;
57
konqueror $DIR/index.html;
57
konqueror $DIR/index.html;
(-)kim/src/bin/kim_sortbydate (-15 / +15 lines)
Lines 23-43 FILE=""; Link Here
23
DIR="$1"
23
DIR="$1"
24
let "nbfiles = $#/2"
24
let "nbfiles = $#/2"
25
25
26
test -n "$KDEHOME" || KDEHOME="`kde-config --localprefix`"; export KDEHOME
26
test -n "$KDEHOME" || KDEHOME="`kde4-config --localprefix`"; export KDEHOME
27
TMPDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
27
TMPDIR=`mktemp -d "$KDEHOME"/tmp-"$HOST"/kim.XXXXXXXX` || exit 1
28
28
29
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
29
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
30
30
31
case $? in
31
case $? in
32
	0)	# Replace exisiting files !
32
	0)	# Replace exisiting files !
33
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
33
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." $nbfiles`
34
	dcop "$dcopRef" showCancelButton true
34
	qdbus $dbusRef showCancelButton true
35
	compteur=0
35
	compteur=0
36
	for i in "$@";do
36
	for i in "$@";do
37
		if [ -f "$i" ];then 
37
		if [ -f "$i" ];then 
38
			#test if cancel button has been pushed
38
			#test if cancel button has been pushed
39
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
39
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
40
				dcop "$dcopRef" close
40
				qdbus $dbusRef close
41
				exit 1
41
				exit 1
42
			fi
42
			fi
43
			let "compteur +=1"
43
			let "compteur +=1"
Lines 59-79 case $? in Link Here
59
				NEWNAME="$NAME"_"$tmp.jpg"
59
				NEWNAME="$NAME"_"$tmp.jpg"
60
			done
60
			done
61
			mv "$TMPDIR/$FILE" "$DIR/$NEWNAME"
61
			mv "$TMPDIR/$FILE" "$DIR/$NEWNAME"
62
			dcop "$dcopRef" setLabel "Kim - Renaming file: $FILE"
62
			qdbus $dbusRef setLabelText "Kim - Renaming file: $FILE"
63
 			dcop "$dcopRef" setProgress "$compteur"
63
 			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
64
		fi;
64
		fi;
65
	done
65
	done
66
	dcop "$dcopRef" close;;
66
	qdbus $dbusRef close;;
67
	
67
	
68
	1) # Do not replace exisiting files !
68
	1) # Do not replace exisiting files !
69
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
69
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
70
	dcop "$dcopRef" showCancelButton true
70
	qdbus $dbusRef showCancelButton true
71
	compteur=0
71
	compteur=0
72
	for i in "$@";do
72
	for i in "$@";do
73
		if [ -f "$i" ];then 
73
		if [ -f "$i" ];then 
74
			#test if cancel button has been pushed
74
			#test if cancel button has been pushed
75
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
75
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
76
				dcop "$dcopRef" close
76
				qdbus $dbusRef close
77
				exit 1
77
				exit 1
78
			fi
78
			fi
79
			let "compteur +=1"
79
			let "compteur +=1"
Lines 95-105 case $? in Link Here
95
				NEWNAME="$NAME"_"$tmp.jpg"
95
				NEWNAME="$NAME"_"$tmp.jpg"
96
			done
96
			done
97
			mv "$TMPDIR/$FILE" "$DIR/$NEWNAME"
97
			mv "$TMPDIR/$FILE" "$DIR/$NEWNAME"
98
			dcop "$dcopRef" setLabel "Kim - Renaming file: $FILE"
98
			qdbus $dbusRef setLabelText "Kim - Renaming file: $FILE"
99
 			dcop "$dcopRef" setProgress "$compteur"
99
 			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
100
		fi;
100
		fi;
101
	done
101
	done
102
	dcop "$dcopRef" close;;
102
	qdbus $dbusRef close;;
103
	
103
	
104
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
104
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
105
	exit 1;;
105
	exit 1;;
(-)kim/src/bin/kim_treatment (-14 / +14 lines)
Lines 32-51 esac Link Here
32
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
32
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
33
case $? in
33
case $? in
34
	0)	# Replace exisiting files !
34
	0)	# Replace exisiting files !
35
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
35
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
36
	dcop "$dcopRef" showCancelButton true 
36
	qdbus $dbusRef showCancelButton true 
37
	compteur=0
37
	compteur=0
38
	for i in "$@";do
38
	for i in "$@";do
39
		if [ -f "$i" ];then
39
		if [ -f "$i" ];then
40
			#test if cancel button has been pushed
40
			#test if cancel button has been pushed
41
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
41
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
42
				dcop "$dcopRef" close
42
				qdbus $dbusRef close
43
				exit 1
43
				exit 1
44
			fi
44
			fi
45
			ATTACHMENTS="$i"
45
			ATTACHMENTS="$i"
46
			let "compteur +=1"
46
			let "compteur +=1"
47
			dcop "$dcopRef" setLabel "Kim - Treatment of file: `basename "$ATTACHMENTS"`"
47
			qdbus $dbusRef setLabelText "Kim - Treatment of file: `basename "$ATTACHMENTS"`"
48
			dcop "$dcopRef" setProgress "$compteur"
48
			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
49
			case "$SCELTA" in 
49
			case "$SCELTA" in 
50
				gray)
50
				gray)
51
					mogrify -colorspace gray "$ATTACHMENTS"
51
					mogrify -colorspace gray "$ATTACHMENTS"
Lines 68-90 case $? in Link Here
68
			esac
68
			esac
69
		fi;
69
		fi;
70
	done
70
	done
71
	dcop "$dcopRef" close;;
71
	qdbus $dbusRef close;;
72
	
72
	
73
	1)	# Save files with another name !
73
	1)	# Save files with another name !
74
	dcopRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
74
	dbusRef=`kdialog --progressbar "Kim - Initialising ..." "$nbfiles"`
75
	dcop "$dcopRef" showCancelButton true 
75
	qdbus $dbusRef showCancelButton true 
76
	compteur=0
76
	compteur=0
77
	for i in "$@";do
77
	for i in "$@";do
78
		if [ -f "$i" ];then
78
		if [ -f "$i" ];then
79
			#test if cancel button has been pushed
79
			#test if cancel button has been pushed
80
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
80
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
81
				dcop "$dcopRef" close
81
				qdbus $dbusRef close
82
				exit 1
82
				exit 1
83
			fi
83
			fi
84
			ATTACHMENTS="$i"
84
			ATTACHMENTS="$i"
85
			let "compteur +=1"
85
			let "compteur +=1"
86
			dcop "$dcopRef" setLabel "Kim - Treatment of file: `basename "$ATTACHMENTS"`"
86
			qdbus $dbusRef setLabelText "Kim - Treatment of file: `basename "$ATTACHMENTS"`"
87
			dcop "$dcopRef" setProgress "$compteur"
87
			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
88
			case "$SCELTA" in 
88
			case "$SCELTA" in 
89
				gray)
89
				gray)
90
					convert -colorspace gray "$ATTACHMENTS" "$DIR/gray_`basename "$ATTACHMENTS"`"
90
					convert -colorspace gray "$ATTACHMENTS" "$DIR/gray_`basename "$ATTACHMENTS"`"
Lines 107-113 case $? in Link Here
107
			esac
107
			esac
108
		fi;
108
		fi;
109
	done
109
	done
110
	dcop "$dcopRef" close;;
110
	qdbus $dbusRef close;;
111
	
111
	
112
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
112
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
113
	exit 1;;
113
	exit 1;;
(-)kim/src/bin/kim_webexport (-14 / +14 lines)
Lines 28-71 let "nbfiles = ($# -1)/2" Link Here
28
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
28
kdialog --title "Kim" --yesnocancel "Do you want to replace exisiting files ?"
29
case $? in
29
case $? in
30
	0)	# Replace exisiting files !
30
	0)	# Replace exisiting files !
31
	dcopRef=`kdialog --progressbar "Kim - Initialising compression" "$nbfiles"`
31
	dbusRef=`kdialog --progressbar "Kim - Initialising compression" "$nbfiles"`
32
	dcop "$dcopRef" showCancelButton true
32
	qdbus $dbusRef showCancelButton true
33
	compteur=0
33
	compteur=0
34
	for i in "$@";do
34
	for i in "$@";do
35
		if [ -f "$i" ];then
35
		if [ -f "$i" ];then
36
			#test if cancel button has been pushed
36
			#test if cancel button has been pushed
37
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
37
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
38
				dcop "$dcopRef" close
38
				qdbus $dbusRef close
39
				exit 1
39
				exit 1
40
			fi
40
			fi
41
			let "compteur +=1"
41
			let "compteur +=1"
42
			FILE="$i"
42
			FILE="$i"
43
			mogrify -resize "$SCELTA" -quality 75 "$FILE"
43
			mogrify -resize "$SCELTA" -quality 75 "$FILE"
44
			dcop "$dcopRef" setLabel "Kim - Compressing file `basename "$FILE"`"
44
			qdbus $dbusRef setLabelText "Kim - Compressing file `basename "$FILE"`"
45
			dcop "$dcopRef" setProgress "$compteur"
45
			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
46
		fi;
46
		fi;
47
	done
47
	done
48
	dcop "$dcopRef" close;;
48
	qdbus $dbusRef close;;
49
	
49
	
50
	1)
50
	1)
51
	dcopRef=`kdialog --progressbar "Kim - Initialising compression" "$nbfiles"`
51
	dbusRef=`kdialog --progressbar "Kim - Initialising compression" "$nbfiles"`
52
	dcop "$dcopRef" showCancelButton true
52
	qdbus $dbusRef showCancelButton true
53
	compteur=0
53
	compteur=0
54
	for i in "$@";do
54
	for i in "$@";do
55
		if [ -f "$i" ];then
55
		if [ -f "$i" ];then
56
			#test if cancel button has been pushed
56
			#test if cancel button has been pushed
57
			if test "true" = `dcop "$dcopRef" wasCancelled`;then
57
			if [[ "$(qdbus $dbusRef wasCancelled)" == "true" ]] ; then
58
				dcop "$dcopRef" close
58
				qdbus $dbusRef close
59
				exit 1
59
				exit 1
60
			fi
60
			fi
61
			let "compteur +=1"
61
			let "compteur +=1"
62
			FILE="$i"
62
			FILE="$i"
63
			convert -resize $SCELTA -quality 75 "$FILE" "$DIR/web_`basename "$FILE"`"
63
			convert -resize $SCELTA -quality 75 "$FILE" "$DIR/web_`basename "$FILE"`"
64
			dcop "$dcopRef" setLabel "Kim - Compressing file `basename "$FILE"`"
64
			qdbus $dbusRef setLabelText "Kim - Compressing file `basename "$FILE"`"
65
			dcop "$dcopRef" setProgress "$compteur"
65
			qdbus $dbusRef org.freedesktop.DBus.Properties.Set org.kde.kdialog.ProgressDialog value "$compteur"
66
		fi;
66
		fi;
67
	done
67
	done
68
	dcop "$dcopRef" close;;
68
	qdbus $dbusRef close;;
69
	
69
	
70
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
70
	2) kdialog --title "Kim" --msgbox "The action was cancelled by user !"
71
	exit 1;;
71
	exit 1;;
(-)kim/src/galery/index.part1 (-34 lines)
Lines 1-34 Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html>
3
<head>
4
<meta http-equiv="content-type" content="text/html; charset=utf-8">
5
<title>Image gallery (Kde Image Menu)</title>
6
<style type="text/css">
7
body {
8
	background:#eee;
9
	text-align:center;
10
	height:100%;
11
	padding-top:1em;
12
}
13
a,p {
14
	color:#aaa;
15
	font-family:Verdana,Arial,Helvetica,Sans-serif;
16
	text-decoration:none;
17
	font-size:xx-small;
18
}
19
a:hover {
20
	color:#666;
21
	text-decoration:underline;
22
}
23
img.photo { 
24
	border: 5px solid #ffffff; 
25
}
26
table {
27
	text-align: center;
28
	margin-left: auto;
29
	margin-right: auto;
30
}
31
</style>
32
</style>
33
</head>
34
<body>
(-)kim/src/galery/index.part2 (-9 lines)
Lines 1-9 Link Here
1
</tr></table>
2
3
<p style="margin-top:4em;">
4
Galery created with <a href="http://bouveyron.free.fr/kim">Kde Image Menu</a>
5
</p>
6
7
</body>
8
</html>
9
(-)kim/src/gallery/index.part1 (+34 lines)
Line 0 Link Here
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
<html>
3
<head>
4
<meta http-equiv="content-type" content="text/html; charset=utf-8">
5
<title>Image gallery (Kde Image Menu)</title>
6
<style type="text/css">
7
body {
8
	background:#eee;
9
	text-align:center;
10
	height:100%;
11
	padding-top:1em;
12
}
13
a,p {
14
	color:#aaa;
15
	font-family:Verdana,Arial,Helvetica,Sans-serif;
16
	text-decoration:none;
17
	font-size:xx-small;
18
}
19
a:hover {
20
	color:#666;
21
	text-decoration:underline;
22
}
23
img.photo { 
24
	border: 5px solid #ffffff; 
25
}
26
table {
27
	text-align: center;
28
	margin-left: auto;
29
	margin-right: auto;
30
}
31
</style>
32
</style>
33
</head>
34
<body>
(-)kim/src/gallery/index.part2 (+9 lines)
Line 0 Link Here
1
</tr></table>
2
3
<p style="margin-top:4em;">
4
Galery created with <a href="http://bouveyron.free.fr/kim">Kde Image Menu</a>
5
</p>
6
7
</body>
8
</html>
9
(-)kim/src/kim_compressandresize.desktop (-1 / +2 lines)
Lines 17-23 Link Here
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, U
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, U
18
18
19
[Desktop Entry]
19
[Desktop Entry]
20
ServiceTypes=image/*
20
Type=Service
21
ServiceTypes=KonqPopupMenu/Plugin,image/*
21
Actions=Rcprs75;Rcprs80;Rcprs90;RcprsCustom;_SEPARATOR_;Rsize300;Rsize600;Rsize800;Rsize1024;Rsize1200;Rsize1400;RsizeCustom;_SEPARATOR_;WebExp75640;WebExp75800;WebExp751024
22
Actions=Rcprs75;Rcprs80;Rcprs90;RcprsCustom;_SEPARATOR_;Rsize300;Rsize600;Rsize800;Rsize1024;Rsize1200;Rsize1400;RsizeCustom;_SEPARATOR_;WebExp75640;WebExp75800;WebExp751024
22
Encoding=UTF-8
23
Encoding=UTF-8
23
X-KDE-Submenu=Kim - Compress and Resize
24
X-KDE-Submenu=Kim - Compress and Resize
(-)kim/src/kim_convertandrotate.desktop (-1 / +2 lines)
Lines 17-23 Link Here
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, U
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, U
18
18
19
[Desktop Entry]
19
[Desktop Entry]
20
ServiceTypes=image/*
20
Type=Service
21
ServiceTypes=KonqPopupMenu/Plugin,image/*
21
Actions=JPEG;PNG;GIF;TIF;PDF;ConvCustom;_SEPARATOR_;GrayScale;Sepia;_SEPARATOR_;AutoRot;Rot90;Rot180;Rot270;RotCustom;_SEPARATOR_;Flip;Flop
22
Actions=JPEG;PNG;GIF;TIF;PDF;ConvCustom;_SEPARATOR_;GrayScale;Sepia;_SEPARATOR_;AutoRot;Rot90;Rot180;Rot270;RotCustom;_SEPARATOR_;Flip;Flop
22
Encoding=UTF-8
23
Encoding=UTF-8
23
X-KDE-Submenu=Kim - Convert and Rotate
24
X-KDE-Submenu=Kim - Convert and Rotate
(-)kim/src/kim_convertandrotate.desktop~ (-114 lines)
Lines 1-114 Link Here
1
# Servicemenu image converter
2
#
3
# Copyright (C) 2005,2006  Charles Bouveyron <charles.bouveyron@free.fr>
4
# 
5
# This program is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU General Public License
7
# as published by the Free Software Foundation; either version 2
8
# of the License, or (at your option) any later version.
9
# 
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
14
# 
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, U
18
19
[Desktop Entry]
20
ServiceTypes=image/*
21
Actions=JPEG;PNG;GIF;TIF;PDF;ConvCustom;_SEPARATOR_;GrayScale;Sepia;_SEPARATOR_;Rot90;Rot180;Rot270;RotCustom;_SEPARATOR_;Flip;Flop
22
Encoding=UTF-8
23
X-KDE-Submenu=Kim - Convert and Rotate
24
X-KDE-Submenu[fr]=Kim - Convertir et tourner
25
26
[Desktop Action JPEG]
27
Name=Convert to JPEG
28
Name[fr]=Convertir en JPEG
29
Icon=image
30
Exec=kim_convert jpg %U
31
32
[Desktop Action PNG]
33
Name=Convert to PNG
34
Name[fr]=Convertir en PNG
35
Icon=image
36
Exec=kim_convert png %U
37
38
[Desktop Action GIF]
39
Name=Convert to GIF
40
Name[fr]=Convertir en GIF
41
Icon=image
42
Exec=kim_convert gif %U
43
44
[Desktop Action TIF]
45
Name=Convert to TIF
46
Name[fr]=Convertir en TIF
47
Icon=image
48
Exec=kim_convert tiff %U
49
50
[Desktop Action PDF]
51
Name=Convert to PDF
52
Name[fr]=Convertir en PDF
53
Icon=image
54
Exec=kim_convert pdf %U
55
56
[Desktop Action ConvCustom]
57
Name=Convert custom ...
58
Name[fr]=Conversion personnalisée
59
Icon=image
60
Exec=kim_convert `kdialog --inputbox "Choose format to convert:" ` %U;
61
62
[Desktop Action GrayScale]
63
Name=Convert to graysale
64
Name[fr]=Convertir en échelle de gris
65
Icon=image
66
Exec=kim_treatment gray %D %U
67
68
[Desktop Action Sepia]
69
Name=Convert in sepia tone
70
Name[fr]=Convertir en sépia
71
Icon=image
72
Exec=kim_treatment sepia %D %U
73
74
[Desktop Action Rot90]
75
Name=Rotate (90°)
76
Name[fr]=Tourner de 90°
77
Icon=rotate_cw
78
Exec=kim_rotate 90 %U
79
80
[Desktop Action Rot180]
81
Name=Rotate (180°)
82
Name[fr]=Tourner de 180°
83
Icon=rotate_cw
84
Exec=kim_rotate 180 %U
85
86
[Desktop Action Rot270]
87
Name=Rotate (270°)
88
Name[fr]=Tourner de 270°
89
Icon=rotate_cw
90
Exec=kim_rotate 270 %U
91
92
[Desktop Action RotCustom]
93
Name=Rotate custom...
94
Name[fr]=Rotation personnalisée
95
Icon=rotate_cw
96
Exec=kim_rotate `kdialog --inputbox "Rotate x degrees:" 45` %U;
97
98
[Desktop Action Flip]
99
Name=Verticaly
100
Name[es]=Verticalmente
101
Name[fr]=Verticalement
102
Name[hu]=Tükrözés vízszintesen
103
Name[de]=Vertikal spiegeln
104
Icon=2uparrow
105
Exec=kim_flipflop flip %U 
106
107
[Desktop Action Flop]
108
Name=Horizontaly
109
Name[es]=Horizontalmente
110
Name[fr]=Horizontalement
111
Name[hu]=Tükrözés függőlegesen
112
Name[de]=Horizontal spiegeln
113
Icon=2rightarrow
114
Exec=kim_flipflop flop %U 
(-)kim/src/kim_publication.desktop (-1 / +2 lines)
Lines 17-23 Link Here
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, U
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, U
18
18
19
[Desktop Entry]
19
[Desktop Entry]
20
ServiceTypes=image/*
20
Type=Service
21
ServiceTypes=KonqPopupMenu/Plugin,image/*
21
Actions=Rename;SortByDate;SendByMail;_SEPARATOR_;PeleMele;Slideshow;Galery;_SEPARATOR_;Watermark;Border;_SEPARATOR_;Animation;Multiburst;Adjoin;_SEPARATOR_;Apropos;
22
Actions=Rename;SortByDate;SendByMail;_SEPARATOR_;PeleMele;Slideshow;Galery;_SEPARATOR_;Watermark;Border;_SEPARATOR_;Animation;Multiburst;Adjoin;_SEPARATOR_;Apropos;
22
Encoding=UTF-8
23
Encoding=UTF-8
23
X-KDE-Submenu=Kim - Treatment and publication
24
X-KDE-Submenu=Kim - Treatment and publication
(-)kim/uninstall.sh (-7 / +2 lines)
Lines 19-31 Link Here
19
19
20
kdeinstdir=`kde-config --prefix`
20
kdeinstdir=`kde-config --prefix`
21
21
22
rm $kdeinstdir/share/apps/konqueror/servicemenus/kim*.desktop
22
rm $kdeinstdir/share/apps/konqueror/servicemenus/kim_*.desktop
23
rm $kdeinstdir/bin/kim*
23
rm $kdeinstdir/bin/kim_*
24
25
cd $kdeinstdir/share/apps/konqueror/servicemenus/
26
mv imageconverter.desktop~ imageconverter.desktop
27
mv jpegorient.desktop~ jpegorient.desktop
28
29
rm -rf $kdeinstdir/share/apps/kim
24
rm -rf $kdeinstdir/share/apps/kim
30
25
31
echo "Kim is removed. Good bye."
26
echo "Kim is removed. Good bye."

Return to bug 154115