Bug 291397 - Nepomuk coniguration utility does not select parent folder when selecting subfolders to index
Summary: Nepomuk coniguration utility does not select parent folder when selecting sub...
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: kcm (show other bugs)
Version: 4.9
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Nepomuk Bugs Coordination
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-12 21:04 UTC by eric.erfanian
Modified: 2012-12-31 08:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eric.erfanian 2012-01-12 21:04:16 UTC
Version:           unspecified (using KDE 4.7.4) 
OS:                Linux

I was setting up an out of the box Kubuntu 11.10 (with latest updates) for a user. When I selected in the configuration utility folders to index within the Windows partition (automounted), I could check the box next to the folder and all sub-folders would successfully be selected, but when I selected a sub-folder the parent item would not become checked as well.

Reproducible: Didn't try

Steps to Reproduce:
1) Mount Windows Partition
2) Open indexing controls
3) Select a subfolder in user's files to index

Actual Results:  
Parent item remains unchecked.

Expected Results:  
Parent item should become checked when sub-item is checked.

I was successfully able to complete this type of action in Amarok.
Comment 1 Vishesh Handa 2012-12-01 00:17:47 UTC
Could you please elaborate? Perhaps provide a more concrete example?

Example -
DirA/
DirA/Folder1
DirA/Folder2

If DirA is selected then "DirA/Folder1" and "DirA/Folder2" are also selected. That is the correct behavior.

If only "DirA/Folder1" is selected, then why should "DirA" get selected?
Comment 2 eric.erfanian 2012-12-02 23:09:00 UTC
Sure, I'll build off your example:

DirA/
DirA/Folder1
DirA/Folder2

> If DirA is selected then "DirA/Folder1" and "DirA/Folder2" are also
> selected. That is the correct behavior.

I agree. That is the correct behavior.

But, if DirA/Folder1 is selected, I believe there should be some sort of feedback at the parent  level to indicate something is going on with the child items. So if you select a child item (DirA/Folder1) the check box by DirA will have a striped check mark. When all child items are selected, the parent check mark should turn into a solid check mark.

That was I can better tell at a glance where items are selected for indexing, even if a parent folder is collapsed.

Does this make sense?

(In reply to comment #1)
> Could you please elaborate? Perhaps provide a more concrete example?
> 
> Example -
> DirA/
> DirA/Folder1
> DirA/Folder2
> 
> If DirA is selected then "DirA/Folder1" and "DirA/Folder2" are also
> selected. That is the correct behavior.
> 
> If only "DirA/Folder1" is selected, then why should "DirA" get selected?
Comment 3 Vishesh Handa 2012-12-03 06:51:59 UTC
(In reply to comment #2)
> Sure, I'll build off your example:
> 
> DirA/
> DirA/Folder1
> DirA/Folder2
> 
> > If DirA is selected then "DirA/Folder1" and "DirA/Folder2" are also
> > selected. That is the correct behavior.
> 
> I agree. That is the correct behavior.
> 
> But, if DirA/Folder1 is selected, I believe there should be some sort of
> feedback at the parent  level to indicate something is going on with the
> child items. So if you select a child item (DirA/Folder1) the check box by
> DirA will have a striped check mark. When all child items are selected, the
> parent check mark should turn into a solid check mark.
> 
> That was I can better tell at a glance where items are selected for
> indexing, even if a parent folder is collapsed.
> 
> Does this make sense?
> 

Yes. It does.

The problem is that we only have 3 ways of marking a directory - Solid Check Mark, Dotted Check Mark, and Nothing. Currently we use the "Dotted Check Mark" when a selected directory has some sub-directory unchecked.

Eg - 

DirA/               ----> Checked (will be dotted)
DirA/Folder1   ---> Unchecked
DirA/Folder2    ---> Checked (solid)

I'm not sure if we should change the current behavior.
Comment 4 eric.erfanian 2012-12-05 13:11:00 UTC
(In reply to comment #3)

No, please do not!  I think that is the perfect behavior. It just isn't working. That is to say, I do not get a dotted check mark when a sub-directory is unchecked.

> (In reply to comment #2)
> > Sure, I'll build off your example:
> > 
> > DirA/
> > DirA/Folder1
> > DirA/Folder2
> > 
> > > If DirA is selected then "DirA/Folder1" and "DirA/Folder2" are also
> > > selected. That is the correct behavior.
> > 
> > I agree. That is the correct behavior.
> > 
> > But, if DirA/Folder1 is selected, I believe there should be some sort of
> > feedback at the parent  level to indicate something is going on with the
> > child items. So if you select a child item (DirA/Folder1) the check box by
> > DirA will have a striped check mark. When all child items are selected, the
> > parent check mark should turn into a solid check mark.
> > 
> > That was I can better tell at a glance where items are selected for
> > indexing, even if a parent folder is collapsed.
> > 
> > Does this make sense?
> > 
> 
> Yes. It does.
> 
> The problem is that we only have 3 ways of marking a directory - Solid Check
> Mark, Dotted Check Mark, and Nothing. Currently we use the "Dotted Check
> Mark" when a selected directory has some sub-directory unchecked.
> 
> Eg - 
> 
> DirA/               ----> Checked (will be dotted)
> DirA/Folder1   ---> Unchecked
> DirA/Folder2    ---> Checked (solid)
> 
> I'm not sure if we should change the current behavior.
Comment 5 Vishesh Handa 2012-12-05 19:02:25 UTC
(In reply to comment #4)
> 
> No, please do not!  I think that is the perfect behavior. It just isn't
> working. That is to say, I do not get a dotted check mark when a
> sub-directory is unchecked.
> 

Hmm. You're right. It doesn't seem to be working. That's strange.

I'll fix it. Marking this bug as "NEW".
Comment 6 Vishesh Handa 2012-12-31 08:30:18 UTC
Git commit b0c94bceb74643ffdef89e51138f6b072b68a5b6 by Vishesh Handa.
Committed on 31/12/2012 at 09:16.
Pushed by vhanda into branch 'KDE/4.10'.

Nepomuk FolderSelectionModel: Improve checked state

Mark certain folders as PartiallyChecked. We now use the following
criteria -

* Qt::Checked - When the directory and all its subdirectories are
                included
* Qt::PartiallyChecked - When a directory is included but its
                sub-directories contain an excluded directory
* Qt::Unchecked - When a directory is excluded
FIXED-IN: 4.10

M  +7    -0    nepomuk/kcm/folderselectionmodel.cpp

http://commits.kde.org/kde-runtime/b0c94bceb74643ffdef89e51138f6b072b68a5b6