After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683722 - sorting by Type should group type families
sorting by Type should group type families
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on: 683744
Blocks:
 
 
Reported: 2012-09-10 13:13 UTC by William Jon McCann
Modified: 2012-09-15 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
When sorting by type group into type families (1.75 KB, patch)
2012-09-10 19:19 UTC, William Jon McCann
none Details | Review
When sorting by type group into type families (1.52 KB, patch)
2012-09-10 19:33 UTC, William Jon McCann
none Details | Review
Only show basic type information in type column by default (7.56 KB, patch)
2012-09-10 20:36 UTC, William Jon McCann
none Details | Review
Only show basic type information in type column by default (7.56 KB, patch)
2012-09-10 21:13 UTC, William Jon McCann
reviewed Details | Review
Only show basic type information in type column by default (7.56 KB, patch)
2012-09-10 22:25 UTC, William Jon McCann
committed Details | Review
Fix translation of type column (983 bytes, patch)
2012-09-15 10:29 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-09-10 13:13:43 UTC
When I sort the views by Type I would like to see type families grouped together.

So that, for example, jpeg and png images are located near one another.

Or so that various types of archives are together.

I think we should probably also special case directories to appear on top.
Comment 1 William Jon McCann 2012-09-10 19:19:14 UTC
Created attachment 223949 [details] [review]
When sorting by type group into type families
Comment 2 William Jon McCann 2012-09-10 19:33:20 UTC
Created attachment 223951 [details] [review]
When sorting by type group into type families

Remove spurious paste
Comment 3 William Jon McCann 2012-09-10 20:36:10 UTC
Created attachment 223956 [details] [review]
Only show basic type information in type column by default

Another approach. I think I like this better because it is clearer why 
the items are sorted in the order they are.
Comment 4 William Jon McCann 2012-09-10 21:13:26 UTC
Created attachment 223958 [details] [review]
Only show basic type information in type column by default
Comment 5 Cosimo Cecchi 2012-09-10 21:41:43 UTC
Review of attachment 223958 [details] [review]:

Looks fine, except for these comments below.

::: libnautilus-private/nautilus-file.c
@@ +6171,3 @@
+	{ "text-x-generic-template", N_("Text") },
+	{ "text-x-script", N_("Program") },
+	{ "font-x-generic", N_("Font") },

This appears twice

@@ +6235,3 @@
+
+		description = g_content_type_get_description (mime_type);
+		if (g_strcmp0 (description, NULL) != 0) {

I know this is in the original code too, but why doing this instead of checking for description != NULL? (also below)
Comment 6 Cosimo Cecchi 2012-09-10 21:43:36 UTC
Comment on attachment 223951 [details] [review]
When sorting by type group into type families

If we use the other patch, this is not needed.
Comment 7 Cosimo Cecchi 2012-09-10 21:46:01 UTC
Review of attachment 223958 [details] [review]:

The other thing is that this leaves us with the "Type" column using the new non-detailed MIME description, and another "Mime Type" column that uses the raw content-type string. Is that something that we want, or do you think it's better to change the more advanced column to show the old detailed description instead? (and leave the raw content-type string to the properties dialog)
Comment 8 William Jon McCann 2012-09-10 22:25:36 UTC
Created attachment 223964 [details] [review]
Only show basic type information in type column by default
Comment 9 William Jon McCann 2012-09-10 22:28:02 UTC
(In reply to comment #7)
> Review of attachment 223958 [details] [review]:
> 
> The other thing is that this leaves us with the "Type" column using the new
> non-detailed MIME description, and another "Mime Type" column that uses the raw
> content-type string. Is that something that we want, or do you think it's
> better to change the more advanced column to show the old detailed description
> instead? (and leave the raw content-type string to the properties dialog)

I'm leaning toward leaving the mime-type column in the view and possibly showing the detailed type in the properties.

The mime type is much more compact.
Comment 10 Cosimo Cecchi 2012-09-13 16:59:28 UTC
Review of attachment 223964 [details] [review]:

This looks good now, but we'll need UI and string freeze breaks.
Comment 11 William Jon McCann 2012-09-14 16:03:28 UTC
Cool. This bug is really important to us in order that we can properly prioritize the name field in the list view, easily allow for sorting directories on top, make the type names easier to scan and compare, reduce the need for horizontal scrolling, more easily fit in a side by side mode, add a long requested feature and a very useful sorting mode to complement name sorting.
Comment 12 Gabor Kelemen 2012-09-14 22:37:42 UTC
+				basic_type = g_strdup (mime_type_map[i].display_name);

The inside of g_strdup() needs to be wrapped in a gettext() call to have the localized strings returned. mime_type_map is a static array, we all know what this means:

http://www.gnu.org/software/gettext/manual/gettext.html#Special-cases
Comment 13 William Jon McCann 2012-09-15 10:29:55 UTC
Created attachment 224389 [details] [review]
Fix translation of type column

http://www.gnu.org/software/gettext/manual/gettext.html#Special-cases
Comment 14 Cosimo Cecchi 2012-09-15 14:17:48 UTC
Review of attachment 224389 [details] [review]:

++