KDEactions

From Alessandro's Wiki
Jump to: navigation, search

File creato da noi contenente le azioni del tasto destro del mouse in KDE

/usr/share/apps/konqueror/servicemenus/video_options.desktop

per modificare il file, spostarsi in services: aprire /usr/share/apps/konqueror/servicemenus/video_options.desktop ( usare Mplayer & Mencoder come aiuto ) e poi da terminale

FILEn=/usr/share/apps/konqueror/servicemenus/video_options.desktop
HOSTS="ingest02 ingest services02 storage"
for a in $HOSTS
do
 scp $FILEn $a:$FILEn
done


http://developer.kde.org/documentation/tutorials/dot/servicemenus.html

Implementazioni

Video

  • Logo e altro in chiave sul video
http://ffmpeg.mplayerhq.hu/hooks.html

Image

File:

image_options.desktop

Descrizione:


kdialog --title "Photo Text Write" --inputbox "Enter the text to add to the image:"
  • Lista di Fonts disponibili nel sistema da ImageMagick
convert -list Font

KDE 4

Guida presa e modificata da: http://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus

da kde 3 al 4 cambia la sintassi ;:

  • da
[Desktop Entry]
ServiceTypes=image/*
  • a
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=image/*;

Dove

/opt/kde4/share/services/ServiceMenus/
/usr/share/kde4/services/ServiceMenus/
/home/*/.kde4/share/kde4/services/ServiceMenus/

Esempio

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=image/png;image/jpeg;
Actions=setAsWallpaper

Conversione (script)

[ -d  /usr/share/kde4/services/ServiceMenus/kde3 ] || mkdir -p  /usr/share/kde4/services/ServiceMenus/kde3
cp -Ra /usr/share/apps/konqueror/servicemenus/*.desktop /usr/share/kde4/services/ServiceMenus/kde3
list=/usr/share/kde4/services/ServiceMenus/kde3/*.desktop
cd /usr/share/kde4/services/ServiceMenus
for filee in `ls $list`
do
 sed -e 's/ServiceTypes\=\(.*\)$/MimeType\=\1;/' $filee | sed -e "s/\[Desktop Entry\]/\[Desktop Entry\]\nType=Service\nServiceTypes\=KonqPopupMenu\/Plugin/" > `basename $filee`
done