Bug 143934

Summary: Cannot download all photos from camera
Product: [Applications] digikam Reporter: Dotan Cohen <kde-2011.08>
Component: Import-MainViewAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 0.9.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.3
Sentry Crash Report:

Description Dotan Cohen 2007-04-07 16:55:19 UTC
Version:           0.9.1 (using KDE KDE 3.5.6)
Installed from:    Fedora RPMs
OS:                Linux

In the Import From Camera wizard, the Download All option is greyed out and unusable. The user must select all photos, then choose Download Selected.
Comment 1 Gerhard Kulzer 2007-04-08 18:38:57 UTC
This bug is solved in svn
Comment 2 Dotan Cohen 2007-04-08 18:47:35 UTC
Thanks, Gerhard. Nice work.
Comment 3 Chris Samuel 2007-06-26 13:38:32 UTC
This bug still exists in the 0.9.2-final build for Kubuntu (using KDE 3.5.7). :-(
Comment 4 Achim Bohnet 2007-06-27 18:48:43 UTC
I can not comfirm this (Kubuntu Feisty, KDE 3.5.7, digikam 0.9.2 pkg from my repo).  I've tried downloading via

  o test dir with pictues (Mounted camera type, path set to my ~/examples/pictues
  o Kodak easyshare V610

for both download all, delete all and select all are available.

can you tell us:

o gutsy or feisty?
o self compiled or pkgs?
o camera model and type (is it USB mass storage, PTP type or .. type?)


Achim
Comment 5 Chris Samuel 2007-06-28 13:23:20 UTC
This was with Feisty packages from http://www.mpe.mpg.de/~ach/kubuntu/feisty

Cameras are a Nikon D-100 and a Canon A540 (both PTP).

This was with the packages as on 26th June, there has been an update since which I've not tested - will try now and see what the go is.
Comment 6 Chris Samuel 2007-06-28 13:27:28 UTC
I can confirm that "Download All" is still greyed out with my "Canon PowerShot A540 (PTP Mode)" with the current Feisty package (0.9.2-1~ach0feisty2) from the http://www.mpe.mpg.de/~ach/kubuntu/feisty repository.

But I have just found that if I hit the "Select None" option on the images menu then it magically ungreys itself, very odd!
Comment 7 caulier.gilles 2007-08-30 11:47:03 UTC
SVN commit 706405 by cgilles:

digiKam from KDE3 branch : Camera GUI : always lets "Download All" option availalble
CCBUGS: 143934


 M  +0 -4      cameraui.cpp  


--- branches/extragear/kde3/graphics/digikam/utilities/cameragui/cameraui.cpp #706404:706405
@@ -1547,9 +1547,7 @@
         // for customized names, the downloadNames depend on the selection.
         // So do not allow Download All if there is a selection!
         d->downloadMenu->setItemEnabled(0, hasSelection);
-        d->downloadMenu->setItemEnabled(1, !hasSelection);
         d->downloadMenu->setItemEnabled(2, hasSelection);
-        d->downloadMenu->setItemEnabled(3, !hasSelection);
     }
     else
     {
@@ -1557,9 +1555,7 @@
         // so we can allow Download All.
         // This is the easiest default for new users
         d->downloadMenu->setItemEnabled(0, hasSelection);
-        d->downloadMenu->setItemEnabled(1, true);
         d->downloadMenu->setItemEnabled(2, hasSelection);
-        d->downloadMenu->setItemEnabled(3, true);
     }
 }
 
Comment 8 caulier.gilles 2007-08-30 11:49:45 UTC
SVN commit 706406 by cgilles:

digiKam from trunk (KDE4) :  Camera GUI : always lets "Download All" option availalble
BUG: 143934 


 M  +0 -4      cameraui.cpp  


--- trunk/extragear/graphics/digikam/utilities/cameragui/cameraui.cpp #706405:706406
@@ -1678,9 +1678,7 @@
         // for customized names, the downloadNames depend on the selection.
         // So do not allow Download All if there is a selection!
         d->downloadSelectedAction->setEnabled(hasSelection);
-        d->downloadAllAction->setEnabled(!hasSelection);
         d->downloadDelSelectedAction->setEnabled(hasSelection);
-        d->downloadDelAllAction->setEnabled(!hasSelection);
         d->deleteSelectedAction->setEnabled(hasSelection);
         d->imageViewAction->setEnabled(hasSelection);
     }
@@ -1690,9 +1688,7 @@
         // so we can allow Download All.
         // This is the easiest default for new users
         d->downloadSelectedAction->setEnabled(hasSelection);
-        d->downloadAllAction->setEnabled(true);
         d->downloadDelSelectedAction->setEnabled(hasSelection);
-        d->downloadDelAllAction->setEnabled(true);
         d->deleteSelectedAction->setEnabled(hasSelection);
         d->imageViewAction->setEnabled(hasSelection);
     }
Comment 9 caulier.gilles 2007-08-30 18:16:49 UTC
SVN commit 706515 by cgilles:

digiKam from KDE3 branch : missing to force to selectAll item is DownloadAll or DownloadAndDeleteAll is used
CCBUGS: 143934


 M  +6 -11     cameraui.cpp  


--- branches/extragear/kde3/graphics/digikam/utilities/cameragui/cameraui.cpp #706514:706515
@@ -1080,6 +1080,12 @@
 
 void CameraUI::slotDownload(bool onlySelected, bool deleteAfter, Album *album)
 {
+    // See B.K.O #143934: force to select all items to prevent problem 
+    // when !renameCustomizer->useDefault() ==> iconItem->getDownloadName()
+    // can return an empty string in this case because it depends on selection.
+    if (!onlySelected)
+        d->view->slotSelectAll();
+
     QString   newDirName;
     IconItem* firstItem = d->view->firstItem();
     if (firstItem)
@@ -1169,12 +1175,6 @@
         downloadName                 = iconItem->getDownloadName();
         mtime                        = iconItem->itemInfo()->mtime;
 
-        // occurs if renameCustomizer->useDefault() and Download All is used.
-        // If !useDefault, downloadName depends on selection,
-        // so Download All is disabled! (see slotNewSelection)
-        if (downloadName.isEmpty())
-            downloadName = d->view->defaultDownloadName(iconItem);
-        
         KURL u(url);
         QString errMsg;
         QDateTime dateTime;
@@ -1544,16 +1544,11 @@
 {
     if (!d->renameCustomizer->useDefault())
     {
-        // for customized names, the downloadNames depend on the selection.
-        // So do not allow Download All if there is a selection!
         d->downloadMenu->setItemEnabled(0, hasSelection);
         d->downloadMenu->setItemEnabled(2, hasSelection);
     }
     else
     {
-        // if useDefault, the name can easily be computed without selection context,
-        // so we can allow Download All.
-        // This is the easiest default for new users
         d->downloadMenu->setItemEnabled(0, hasSelection);
         d->downloadMenu->setItemEnabled(2, hasSelection);
     }
Comment 10 caulier.gilles 2007-08-30 18:21:54 UTC
SVN commit 706517 by cgilles:

digiKam from trunk (KDE4) : missing to force to selectAll items when DownloadAll or DownloadAndDeleteAll is used
CCBUGS: 143934



 M  +6 -11     cameraui.cpp  


--- trunk/extragear/graphics/digikam/utilities/cameragui/cameraui.cpp #706516:706517
@@ -1203,6 +1203,12 @@
 
 void CameraUI::slotDownload(bool onlySelected, bool deleteAfter, Album *album)
 {
+    // See B.K.O #143934: force to select all items to prevent problem 
+    // when !renameCustomizer->useDefault() ==> iconItem->getDownloadName()
+    // can return an empty string in this case because it depends on selection.
+    if (!onlySelected)
+        d->view->slotSelectAll();
+
     QString   newDirName;
     IconItem* firstItem = d->view->firstItem();
     if (firstItem)
@@ -1292,12 +1298,6 @@
         downloadName                 = iconItem->getDownloadName();
         mtime                        = iconItem->itemInfo()->mtime;
 
-        // occurs if renameCustomizer->useDefault() and Download All is used.
-        // If !useDefault, downloadName depends on selection,
-        // so Download All is disabled! (see slotNewSelection)
-        if (downloadName.isEmpty())
-            downloadName = d->view->defaultDownloadName(iconItem);
-        
         KUrl u(url);
         QString errMsg;
         QDateTime dateTime;
@@ -1675,8 +1675,6 @@
 {
     if (!d->renameCustomizer->useDefault())
     {
-        // for customized names, the downloadNames depend on the selection.
-        // So do not allow Download All if there is a selection!
         d->downloadSelectedAction->setEnabled(hasSelection);
         d->downloadDelSelectedAction->setEnabled(hasSelection);
         d->deleteSelectedAction->setEnabled(hasSelection);
@@ -1684,9 +1682,6 @@
     }
     else
     {
-        // if useDefault, the name can easily be computed without selection context,
-        // so we can allow Download All.
-        // This is the easiest default for new users
         d->downloadSelectedAction->setEnabled(hasSelection);
         d->downloadDelSelectedAction->setEnabled(hasSelection);
         d->deleteSelectedAction->setEnabled(hasSelection);