Bug 124952 - digikam "Mount and Download"-Problems
Summary: digikam "Mount and Download"-Problems
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Import-MainView (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-05 08:06 UTC by krienke
Modified: 2017-07-16 18:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description krienke 2006-04-05 08:06:26 UTC
Version:           0.90 svn (using KDE KDE 3.5.2)
Installed from:    SuSE RPMs
Compiler:          4cc 4.0 
OS:                Linux

When inserting a USB card reader with a photo card in it KDE asks what to do with this new mass storage device. One option is "Digikam Mount and Download". When I select this option digikam gets started and the digikam browse massstorage dialog is shown. At the same time I get a KDE  error dialog saying: "Failed to list files in system:/media/sda". When I enter this URL into a konqueror window I see the contents of the card. So the access seems to work. When I click on the MyComputer icon where I can see all drives I see that instead of system:/  media:/ is used there for each drive.  So at the moment I cannot download images automatically from a cardreader device into digikam but have to do this manually using konqueror which can access the card without problems. 

A similar problem is in the "Camera Media-Browse" menu. In this menu I see my USB card reader showing the correct size of the flash card but clicking on this menu does not do anything. I would have expected that a new window should open to show the contents of this "drive" but nothing seems to happen.
Comment 1 Chris Drexler 2006-05-12 02:41:52 UTC
I can confirm this bug and I found the problem, at least for the second part of the problem description above (not being able to use the "Media Browse" menu items.

When the QPopupMenu list is created, the parameters for "Accelerator" and "MenuID" are swapped. See patch extract below for a fix. Now the media browse works fine.

            mCameraMediaList->insertItem( name,  this,
-                              SLOT(slotDownloadImagesFromMedia( int )),i,0);
+                              SLOT(slotDownloadImagesFromMedia( int )),0,i);

Additional Hint: SuSE has the "subfs" automounter installed (at least from version 10.0 on, which I use, but I think earlier version do have it, too) which automatically mounts cdroms, dvd und usb storage devics under the "/media" directory. With this enabled, the scheme of accessing new media via "media:/" KURL doesn't work, but one has to go directly to "/media". 
I don't know whether the media access path would be better a configurable item in digikam, so that the user could change it from "media:/" to "/media" in such situations. I could provide a simple patch for supporting this if someone is interested.

Chris
Comment 2 caulier.gilles 2006-05-12 18:40:23 UTC
SVN commit 540108 by cgilles:

digikam from stable : fix swapped parameters for "Accelerator" and "MenuID" when QPopupMenu list is created .
CCBUGS: 124952

 M  +12 -7     digikamapp.cpp  


--- branches/stable/extragear/graphics/digikam/digikam/digikamapp.cpp #540107:540108
@@ -1050,24 +1050,30 @@
 
 void DigikamApp::slotCameraMediaMenuEntries( Job *, const UDSEntryList & list )
 {
-    int i=0;
-    for(KIO::UDSEntryList::ConstIterator it = list.begin();
-                  it!=list.end(); ++it)
+    int i = 0;
+
+    for(KIO::UDSEntryList::ConstIterator it = list.begin() ; it != list.end(); ++it)
     {
         QString name;
         QString path;
-        bool unmounted=false;
-        for ( UDSEntry::const_iterator et = (*it).begin() ; et !=   (*it).end() ; ++ et ) {
+        bool unmounted = false;
+
+        for ( UDSEntry::const_iterator et = (*it).begin() ; et !=   (*it).end() ; ++ et ) 
+        {
             if ( (*et).m_uds == KIO::UDS_NAME)
                 name = ( *et ).m_str;
+
             if ( (*et).m_uds == KIO::UDS_URL)
                 path = ( *et ).m_str;
+
             if ( (*et).m_uds == KIO::UDS_MIME_TYPE &&
                    ( (*et).m_str == "media/removable_unmounted" || 
                      (*et).m_str == "media/camera_unmounted" ) )
                 unmounted=true;
+
             //kdDebug() << ( *et ).m_str << unmounted << endl;
        }
+
        if (!name.isEmpty() && !path.isEmpty())
        {
             if (i==0)
@@ -1075,8 +1081,7 @@
             
             mMediaItems[i] = qMakePair(path,unmounted);
             
-            mCameraMediaList->insertItem( name,  this, 
-                               SLOT(slotDownloadImagesFromMedia( int )),i,0);
+            mCameraMediaList->insertItem(name, this, SLOT(slotDownloadImagesFromMedia(int)), 0, i);
             mCameraMediaList->setItemParameter(i, i);
             i++;
        }
Comment 3 caulier.gilles 2006-05-12 18:40:48 UTC
SVN commit 540109 by cgilles:

digikam from trunk : fix swapped parameters for "Accelerator" and "MenuID" when QPopupMenu list is created .
CCBUGS: 124952

 M  +8 -7      digikamapp.cpp  


--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #540108:540109
@@ -1032,30 +1032,31 @@
 
 void DigikamApp::slotCameraMediaMenuEntries( Job *, const UDSEntryList & list )
 {
-    int i=0;
-    for(KIO::UDSEntryList::ConstIterator it = list.begin();
-                  it!=list.end(); ++it)
+    int i = 0;
+
+    for(KIO::UDSEntryList::ConstIterator it = list.begin() ; it!=list.end() ; ++it)
     {
         QString name;
         QString path;
-        for ( UDSEntry::const_iterator et = (*it).begin() ; et !=   (*it).end() ; ++ et ) 
+
+        for ( UDSEntry::const_iterator et = (*it).begin() ; et !=   (*it).end() ; ++et ) 
         {
             if ( (*et).m_uds == KIO::UDS_NAME)
                 name = ( *et ).m_str;
             if ( (*et).m_uds == KIO::UDS_URL)
                 path = ( *et ).m_str;
+
             kdDebug() << ( *et ).m_str << endl;
         }
        
         if (!name.isEmpty() && !path.isEmpty())
         {
-            if (i==0)
+            if (i == 0)
                 mCameraMediaList->clear();
             
             mMediaItems[i] = path;
             
-            mCameraMediaList->insertItem( name,  this, 
-                              SLOT(slotDownloadImagesFromMedia( int )),i,0);
+            mCameraMediaList->insertItem(name, this, SLOT(slotDownloadImagesFromMedia(int)), 0, i);
             mCameraMediaList->setItemParameter(i, i);
             i++;
         }
Comment 4 Sputnik 2006-05-18 13:42:58 UTC
I can report the same first problem with the latest Dapper package (digikam 0.8.2-rc1)
Comment 5 krienke 2006-06-09 15:39:38 UTC
For me the mount and download of photos works now using KDE 3.5.2 and suse10.0.