[Digikam-devel] digikam and can't umount
Kevin Ottens
ervin at kde.org
Wed Jan 11 21:51:12 GMT 2006
Le Mercredi 11 Janvier 2006 12:19, Achim Bohnet a écrit :
> if you can point us to any code example show to best add
> and umount menu item to every mounted camera this
> would be great. (anything less brute force than
> kprocess "df | -q grep /media/whatever" && addmenuitem kprocess\
> "pumount /media/whatever" ;)
Well, you don't need to be brute like this. ;-)
You have two choices IMHO:
1) Call kio_media_mounthelper (using KProcess). That's definitely the easiest
way to do it.
2) Reuse the konq_popupmenu, which is available in libkonq, this way you'll
get automatically the relevant actions for free. That might be a nice way to
be future proof, if a few more servicemenus are added you'll automatically
display them too.
Regards.
--
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20060111/b5038ad8/attachment.sig>
More information about the Digikam-devel
mailing list