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 651262 - Gtk fileopen dialog need filetype/mime sort option.
Gtk fileopen dialog need filetype/mime sort option.
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
3.22.x
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2011-05-27 15:33 UTC by thambsup
Modified: 2018-05-02 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example (194.89 KB, image/png)
2011-05-27 15:33 UTC, thambsup
  Details
type column patch (13.22 KB, patch)
2011-07-30 11:02 UTC, Pablo Arroyo Loma
none Details | Review
GtkFileChooser: add a sortable "Type" column (16.38 KB, patch)
2017-10-15 09:16 UTC, Nelson Benitez
none Details | Review
GtkFileChooser: Add new 'type-format' setting (5.93 KB, patch)
2017-10-15 09:16 UTC, Nelson Benitez
none Details | Review
GtkFileChooser: New 'description' format for 'type-format' setting (2.60 KB, patch)
2017-10-15 09:17 UTC, Nelson Benitez
none Details | Review
GtkFileChooser: New 'category' format for 'type-format' setting (4.85 KB, patch)
2017-10-15 09:19 UTC, Nelson Benitez
none Details | Review
Screenshot showing the three formats for "type-format" setting. (240.65 KB, image/png)
2017-10-15 10:10 UTC, Nelson Benitez
  Details

Description thambsup 2011-05-27 15:33:23 UTC
Created attachment 188768 [details]
example

When we are using file-roller, geny, gimp or other gtk-program, it is often need sort files in different ways. We can sort by filename, date of modify, size, but the sort by filetype is missing. So, for example, if we have many files with same names but different extensions, and we want to add in archive (via file-roller) only .jpeg but not .png we must look all files in catalog and add only needed files. If we will have this option we can easily select needed files via SHIFT+DOWNARROW, as in qt-based programs.
Comment 1 Federico Mena Quintero 2011-05-27 16:30:34 UTC
I'll gladly review a patch that does either of these:

1. Splits the per-file icon into a separate column, and makes that column sortable by clicking on its header.

2. Adds a "file type" column of its own, as in the provided screenshot.
Comment 2 Pablo Arroyo Loma 2011-07-30 11:02:50 UTC
Created attachment 192903 [details] [review]
type column patch


Patch adds new file type column.
Comment 3 Baptiste Mille-Mathias 2011-11-04 19:58:52 UTC
Federico, 

could you review the patch ?
Comment 4 Federico Mena Quintero 2011-11-05 01:57:51 UTC
Eeeek, I totally lost the original notification mail in my inbox.  Sorry about the delay, Pablo; I'll review this ASAP.
Comment 5 Matthias Clasen 2011-11-30 04:52:39 UTC
Still needs review...
Comment 6 Nelson Benitez 2017-10-15 09:13:04 UTC
I've rebased Pablo's patch on current Gtk 3.22, and of top of that I've added a 'type-format' setting to have different ways to show "Type" information, the last patch adds a "category" format that it's the shortest of all (important for file-chooser dialog scarce width) and it's the same that current Nautilus list view uses, so we improve consistency with Nautilus too.

Patches follow..
Comment 7 Nelson Benitez 2017-10-15 09:16:00 UTC
Created attachment 361599 [details] [review]
GtkFileChooser: add a sortable "Type" column
Comment 8 Nelson Benitez 2017-10-15 09:16:57 UTC
Created attachment 361600 [details] [review]
GtkFileChooser: Add new 'type-format' setting

To allow for different outputs to be used in "Type" column.
Comment 9 Nelson Benitez 2017-10-15 09:17:50 UTC
Created attachment 361601 [details] [review]
GtkFileChooser: New 'description' format for 'type-format' setting

To be used in "Type" column, it uses the output of
g_content_type_get_description(). Set as default also.
Comment 10 Nelson Benitez 2017-10-15 09:19:20 UTC
Created attachment 361602 [details] [review]
GtkFileChooser: New 'category' format for 'type-format' setting

To be used in "Type" column, it uses the corresponding generic
icon of the mime type to group by categories (aka basic types).

This produces a more compact output than other 'type-format'
settings, and allows for type families to be grouped together,
so for example, jpeg and png images are located near one another,
or various types of archiver files are together.

This format was copied from and currently used by Nautilus list view,
so we also improve consistency with Nautilus.

For reference, Nautilus implemented this feature in bug 683722.

Set as default also.
Comment 11 Nelson Benitez 2017-10-15 10:10:25 UTC
Created attachment 361606 [details]
Screenshot showing the three formats for "type-format" setting.

Screenshot showing the three formats for "type-format" setting:
'mime'
'description'
'category'
Comment 12 GNOME Infrastructure Team 2018-05-02 15:07:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/362.