Bug 166879 - Grouping by logical files types, not physical
Summary: Grouping by logical files types, not physical
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 210360 375774 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-17 23:04 UTC by Stéphane Magnenat
Modified: 2022-04-19 20:44 UTC (History)
8 users (show)

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 Stéphane Magnenat 2008-07-17 23:04:10 UTC
Version:           1.0.99 (using 4.00.98 (KDE 4.0.98 (4.1 RC1)), Kubuntu packages)
Compiler:          gcc
OS:                Linux (i686) release 2.6.24-19-rt

In folder view, Dolphin currently provides grouping. This is a nice feature, but we could make it even nicer by adding the possibility to group by logical file types (video/audio/bare text/word processing documents/...). Or at least group the one of logical types that get opened by the same application. In the end, most user do not care if an image is a bmp, a png, or a tiff. In the same idea, when I'm searching for a video on my disk I do not care about its format.
Comment 1 Peter Penz 2008-07-18 08:05:26 UTC
Internally this is technically already possible by using Nepomuk, however this feature is currently still to slow to be able to work with several hundreds of files. I hope we can enable this in KDE 4.2, the performance of Nepomuk increased already very well from KDE 4.0 to 4.1.
Comment 2 Alejandro Exojo 2008-12-02 10:44:52 UTC
What about grouping elements by type, instead of sub-type? I mean, group by video/*, image/*, instead of separating mpeg from avi, and mp3 from ogg. In some cases, you care about the exact subtype (e.g., wav can be the input, and ogg the output of some program), but I think the most common scenario is having all videos together, all images together, etc.

Another possibility is sort by type, and in the same group, sort by subtype.

Thanks.
Comment 3 Dotan Cohen 2009-01-06 13:18:15 UTC
Furthermore, this could be the default type of sorting when filename extensions are hidden. For user who do not care what the filename extension is, sorting by extension is pointless. But sorting by type (audio, video) is very logical.
Comment 4 Frank Reininghaus 2011-01-12 20:02:17 UTC
*** Bug 210360 has been marked as a duplicate of this bug. ***
Comment 5 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:18:39 UTC
Resetting assignee to default as per bug #305719
Comment 6 Christoph Feck 2017-01-31 20:23:16 UTC
*** Bug 375774 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Carmichael 2021-12-22 14:25:41 UTC
I've been having a look into this and I have some ideas. I noticed the sorting difference between the "Type" sorting for Nautilus and Dolphin recently and having a look into this, Nautilus does this by mapping general types to the mime-type Generic Icon Name, basically the Standard MIME Type Icons (Table 10 of the Icon Naming Specifications: https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-0.8.html), where Dolphin uses a human-readable mime-type Comment (see also the Shared MIME-info Database spec (https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-0.21.html).

For instance, with Nautilus the Generic Icon Name of "audio-x-generic" maps to a translatable string "Audio", "image-x-generic" maps to "Image", etc. which groups similar types together. I think this is a workable approach, and then where there is no Generic Icon Name, fallback to the  mime-type Comment.

In consideration for how this could be considered for Dolphin, I noticed that Nemo has both a Type and a Detailed Type sort, where Type is the Generic Icon Name sorting and the Detailed Type sort seems to use the mime-type Comment that Dolphin uses, which raises the question of whether it would be best for another sort type to be created for this, or if it would be acceptable to have a config to change the behavior of the "Type" sorting?

I'm interested in working on this and have tested some changes using the config option approach so far, not that it's what I think is best, but it seemed to require less effort for initial testing. If I understand the code hopefully correctly, an additional sort option ("sort role"), will require changes in KIO as well, though both approaches may benefit from changes in KIO to make the Generic Icon Name available through the KFileItem class.