Bug 56778 - Project won't add empty directories
Summary: Project won't add empty directories
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: 3.1.1
Platform: Mandrake RPMs Linux
: LO minor
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-03 07:51 UTC by Jay R. Camp
Modified: 2003-04-25 22: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 Jay R. Camp 2003-04-03 07:51:48 UTC
Version:           3.1.1 (using KDE 3.1.0)
Installed from:    Mandrake Linux Cooker i586 - Cooker
Compiler:          gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
OS:          Linux (i686) release 2.4.21-0.13mdk

If you try to add an empty directory to a project through the project creation, insert directory command, or project rescan, it won't add an empty directory to the project.  It'll only do it after there is at least one file in that directory.  I don't see any logical reasoning for this, so I'm figuring it is a bug.  If not, I stand corrected!
Comment 1 Eric Laffoon 2003-04-24 10:18:43 UTC
I will leave it to Andras whether to accept this as a bug vs a wishlist item. Whether it is 
proper bahavior is debatable. It would seem it should not discriminate against a 
directory. OTOH projects are to manage files. Other than as a place holder I cannot 
see a functional reason for an empty directory, except perhaps as a temporary file 
directory. In any case there is no reason to track or update an empty container. For 
now I have lowered the severity and priority as I can't see where it constitues a real 
problem, only a rare and minor irritant. 
Comment 2 András Manţia 2003-04-25 22:33:53 UTC
Subject: QUANTA_3_1_BRANCH: quanta

CVS commit by amantia: 

Allow selection of empty directories in Rescan/Upload/New project dialogs.  [#56778]

CCMAIL: 56778-done@bugs.kde.org


  M +2 -0      ChangeLog   1.90.2.58
  M +31 -6     quanta/treeviews/uploadtreeview.cpp   1.11.2.6


--- quanta/ChangeLog  #1.90.2.57:1.90.2.58
@@ -17,4 +17,6 @@
     - don't use the preview prefix after the project is closed
     - show the directory selection dialogs in the project options [#56698]
+    - allow selection of empty directories in Rescan/Upload/New project dialogs
+      [#56778]
  - usability enhancements:
     - bring up the message output window, when and action/plugin wants to printed

--- quanta/quanta/treeviews/uploadtreeview.cpp  #1.11.2.5:1.11.2.6
@@ -108,4 +108,21 @@ int UploadTreeView::checkboxTree( QListV
     }
     retVal = bitFlags;
+  } else
+  {
+    if ( dynamic_cast<UploadTreeFolder *>(it) )
+    {
+        UploadTreeFolder *itF = static_cast<UploadTreeFolder *>(it);
+        if ( itF->isSelected() )
+        {
+          itF->setWhichPixmap("check");
+          retVal = 2;
+        }
+        else
+        {
+          itF->setWhichPixmap("check_clear");
+          retVal = 1;
+        }
+
+    }
   } 
 
@@ -136,4 +153,5 @@ void UploadTreeView::slotSelectFile( QLi
   if ( itF )
   {
+    itF->setSelected(it->isSelected());
     selectAllUnderNode( it, it->isSelected() );
   }
@@ -367,5 +385,7 @@ void UploadTreeView::invertAll( QListVie
   for( ; itIter != 0; itIter = itIter->nextSibling() )
   {
-    if ( dynamic_cast<UploadTreeFile *>(itIter) )
+    if ( dynamic_cast<UploadTreeFile *>(itIter) ||
+       ( dynamic_cast<UploadTreeFolder *>(itIter) &&
+         !itIter->firstChild()) )
     {
       itIter->setSelected( !itIter->isSelected() );
@@ -385,4 +405,9 @@ void UploadTreeView::selectAll( bool sel
   {
     if ( dynamic_cast<UploadTreeFile *>(it.current()) )
+    {
+      it.current()->setSelected( select);
+    } else
+    if ( dynamic_cast<UploadTreeFolder *>(it.current()) &&
+         !it.current()->firstChild() )
     {
       it.current()->setSelected( select);