Bug 95965 - Unable to download photos in top level album with auto-album creation enabled.
Summary: Unable to download photos in top level album with auto-album creation enabled.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-Albums (show other bugs)
Version: 0.7.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-29 07:14 UTC by lan
Modified: 2017-08-16 09:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lan 2004-12-29 07:14:00 UTC
Version:           0.7.1-beta2 (using KDE KDE 3.2.1)
Installed from:    Compiled From Sources
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.111.5-default

When download photos I am not able to choose top level album as target directory 
for download. I have enabled 'auto album creation' feature and want new albums 
that will be created automaticly placed in the top level album. For now I have 
to create dummy album, download photos to it and them move them in the desired 
locaton. Example: now is 2004-12-29, I made some photos and want to place them 
into <All Albums>/2004-12-29/IMG_00001.jpg, but dialog with destination folder 
selection does not allow me to choose <All Albums>. I have to create album 
'dummy' and then digikam put by image into 
<All Albums>/dummy/2004-12-29/IMG_00001.jpg and then I drag 2004-12-29 album 
into <All Albums> and delete 'dummy'.

Current behavour is correct when 'auto album creation' feature is disbled, but 
should be changed then it is enabled.

If noone is intrested in fixing this I am going to make it during New Year holidays,
if nothing will stop me in this :-)
Comment 1 Renchi Raju 2004-12-29 20:13:47 UTC
CVS commit by pahlibar: 


Allow downloading of albums into sub auto-albums of root album (if and only if
Auto album creation option is checked)
BUG: 95965


  M +2 -1      cameraui.cpp   1.36
  M +13 -7     dirselectdialog.cpp   1.12
  M +5 -2      dirselectdialog.h   1.7


--- kdeextragear-3/digikam/utilities/cameragui/cameraui.cpp  #1.35:1.36
@@ -432,5 +432,6 @@ void CameraUI::slotDownload(bool onlySel
     
     KURL url = DirSelectDialog::selectDir(libPath, currPath,
-                                          this, header, newDirName);
+                                          this, header, newDirName,
+                                          m_autoAlbumCheck->isChecked());
     if (!url.isValid())
         return;

--- kdeextragear-3/digikam/utilities/cameragui/dirselectdialog.cpp  #1.11:1.12
@@ -49,5 +49,6 @@ DirSelectDialog::DirSelectDialog(const Q
                                  QWidget* parent,
                                  const QString& header,
-                                 const QString& newDirString)
+                                 const QString& newDirString,
+                                 bool allowRootSelection)
     : KDialogBase(parent, 0, true, i18n("Select Album"), Help|User1|Ok|Cancel)
 {
@@ -56,4 +57,6 @@ DirSelectDialog::DirSelectDialog(const Q
     enableButtonOK(false);
     
+    m_allowRootSelection = allowRootSelection;
+    
     QFrame *page     = makeMainWidget();
     QVBoxLayout* lay = new QVBoxLayout(page, 5, 5);
@@ -240,5 +243,5 @@ void DirSelectDialog::slotSelectionChang
 
     KFileTreeViewItem* ftvItem = dynamic_cast<KFileTreeViewItem*>(item);
-    if (!ftvItem || ftvItem == m_branch->root())
+    if (!ftvItem || (ftvItem == m_branch->root() && !m_allowRootSelection))
     {
         enableButtonOK(false);
@@ -249,10 +252,13 @@ void DirSelectDialog::slotSelectionChang
 }
 
-KURL DirSelectDialog::selectDir(const QString& rootDir, const QString& startDir,
+KURL DirSelectDialog::selectDir(const QString& rootDir,
+                                const QString& startDir,
                                 QWidget* parent,
-                                const QString& header, const QString& newDirString)
-
+                                const QString& header,
+                                const QString& newDirString,
+                                bool allowRootSelection)
 {
-    DirSelectDialog dlg(rootDir, startDir, parent, header, newDirString);
+    DirSelectDialog dlg(rootDir, startDir, parent, header, newDirString,
+                        allowRootSelection);
 
     if (dlg.exec() != QDialog::Accepted)
@@ -260,5 +266,5 @@ KURL DirSelectDialog::selectDir(const QS
 
     KFileTreeViewItem* ftvItem = (KFileTreeViewItem*) dlg.m_treeView->currentItem();
-    if (!ftvItem || ftvItem == dlg.m_branch->root())
+    if (!ftvItem || (ftvItem == dlg.m_branch->root() && !allowRootSelection))
         return KURL();
 

--- kdeextragear-3/digikam/utilities/cameragui/dirselectdialog.h  #1.6:1.7
@@ -43,5 +43,6 @@ public:
                     QWidget *parent = 0,
                     const QString& header=QString::null,
-                    const QString& newDirString=QString::null);
+                    const QString& newDirString=QString::null,
+                    bool allowRootSelection=false);
     ~DirSelectDialog();
 
@@ -50,5 +51,6 @@ public:
                           QWidget* parent=0,
                           const QString& header=QString::null,
-                          const QString& newDirString=QString::null);
+                          const QString& newDirString=QString::null,
+                          bool allowRootSelection=false);
     
 private:
@@ -63,4 +65,5 @@ private:
     QValueStack<KURL> m_urlsToList;
     QString           m_newDirString;
+    bool              m_allowRootSelection;
 
 private slots:


Comment 2 lan 2004-12-30 04:36:54 UTC
Thanks for quick attention :-)
Happy New Year !