Bug 178435 - Solid doesn't automatically detect digital camera
Summary: Solid doesn't automatically detect digital camera
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-Gphoto2 (show other bugs)
Version: 0.10.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-22 09:47 UTC by Bobby
Modified: 2017-08-16 06:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bobby 2008-12-22 09:47:59 UTC
Version:            (using Devel)
Compiler:          gcc 4.3 
OS:                Linux
Installed from:    Compiled sources

I have a Canon IXUS 75 digital camera which isn't automatically detected on KDE 4. 
In comparison: on KDE 3.5x, if I plug in the camera then I get a window with a number of choices immediately. I can choose to download my photos using DigiKam or open the device with Konqueor. I can even set the future action so that this window doesn't appear evertime I plug in the camera. 
This however isn't the case on KDE 4. Absolutely nothing happens when I plug in my camera, it's not shown in Dolphin - nowhere and I have to add it to DigiKam manually, which works.
Other USB devices seem to work fine, apart from the camera.
Comment 1 Kevin Ottens 2008-12-22 11:02:07 UTC
This one is probably more for Digikam which is supposed to register itself to the device notifier. I'm adding Alexis in CC who could help if the Digikam people don't know how to do that.
Comment 2 caulier.gilles 2008-12-22 11:15:22 UTC
Question : How to add digiKam is list of application to open with USB device.

For KDE3, digiKam add an action at the right place using customized desktop files:

http://websvn.kde.org/branches/extragear/kde3/graphics/digikam/utilities/hotplug/

How we can do the same with KDE4 ?

Gilles Caulier
Comment 3 Marcel Wiesweg 2008-12-22 16:24:35 UTC
What we do of course is

connect(Solid::DeviceNotifier::instance(), SIGNAL(deviceAdded(const QString&)),
        this, SLOT(slotSolidDeviceChanged(const QString &)));

so if a device is plugged in it will appear in our menus.
Is this the device notifier Kevin speaks about?

I guess the original report is more about the pop up window that we know from KDE3 where a list of actions is displayed. When I was in contact with the Solid people, long ago in the early days of KDE4, such a functionality was not available.
Comment 4 Marcel Wiesweg 2008-12-26 17:51:08 UTC
I now understood that Kevin is speaking about the Device Notifier Plasma applet.
I did not manage to find any official documentation, but scattered bits describing what should be done:

http://apachelog.blogspot.com/2008/08/dragons-dvds-and-new-device-notifiers.html

bug #165544
Comment 5 Marcel Wiesweg 2008-12-30 17:10:43 UTC
SVN commit 903474 by mwiesweg:

Prepare digikam to be able to open a camera gui on a given Solid Device UDI.

- move code to open a usb device and a gphoto2 camera by UDI to separate methods
- add a method that accepts a UDI and determines which of the two above methods to call
- move code to check and create a label for gphoto2 cameras to separate methods
- use queued signals instead of single shot timers to call methods from command line paramters

CCBUG: 178435

 M  +141 -63   digikamapp.cpp  
 M  +12 -1     digikamapp.h  
 M  +0 -2      digikamappprivate.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=903474
Comment 6 Marcel Wiesweg 2008-12-30 17:10:57 UTC
SVN commit 903475 by mwiesweg:

Add downloadFromUdi DBUS method

CCBUG: 178435

 M  +7 -3      org.kde.digikam.xml  


WebSVN link: http://websvn.kde.org/?view=rev&revision=903475
Comment 7 Marcel Wiesweg 2008-12-30 17:11:05 UTC
SVN commit 903476 by mwiesweg:

- Add --download-from-udi command line option.
- the old --album-root option is now --database-directory

CCBUG: 178435

 M  +13 -10    main.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=903476
Comment 8 Marcel Wiesweg 2008-12-30 19:49:27 UTC
SVN commit 903520 by mwiesweg:

Port digikam-camera utility to qdbus

CCBUG: 178435

 M  +18 -11    digikam-camera  


WebSVN link: http://websvn.kde.org/?view=rev&revision=903520
Comment 9 Marcel Wiesweg 2008-12-30 19:49:30 UTC
SVN commit 903521 by mwiesweg:

Add a desktop file intended for the Plasma Device Notifier applet.
May need some testing.

CCBUG: 178435

 A             digikam-opencamera.desktop.cmake  


WebSVN link: http://websvn.kde.org/?view=rev&revision=903521
Comment 10 Marcel Wiesweg 2008-12-30 23:21:15 UTC
SVN commit 903578 by mwiesweg:

Install the .desktop file to the right place (apps/solid/actions)

CCBUG: 178435

 M  +1 -0      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=903578
Comment 11 Marcel Wiesweg 2008-12-30 23:27:42 UTC
This has been quite a lot of work, mostly due to lack of documentation and the need to look at the code to get to know how we are supposed to do things, but it works for me now.
The Device Notifier Plasma applet will show "2 actions for device", and will popup a dialog where digikam can be chosen. The device is specified by UDI and digikam will detect what to do with this.

I did not test this with a gphoto2 camera, so if you have such a device please give it a try.

The load-with-digikam action will be offered for all USB storage devices as I do not know how to distinguish USB mass storage cameras from USB sticks or USB hard disks. In fact I think these are technically the same, and the only thing we could do is use a white list with manufacturers' names. In digikam's menus we offer all USB mass storage devices as well.
Any comments or ideas are welcome.
Comment 12 Nicolas L. 2009-01-16 00:36:46 UTC
There is a little pb with this, Audio cds are detected by it and ask if i want to open them with digikam
Comment 13 Marcel Wiesweg 2009-01-16 17:18:47 UTC
SVN commit 912060 by mwiesweg:

Solid Predicate for Plasma Device Notifier: Filter by usageType as well.
Prevents detection of Audio CDs.

CCBUG: 178435

 M  +1 -1      digikam-opencamera.desktop.cmake  


WebSVN link: http://websvn.kde.org/?view=rev&revision=912060