GNOME Bugzilla – Bug 651262
Gtk fileopen dialog need filetype/mime sort option.
Last modified: 2018-05-02 15:07: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.
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.
Created attachment 192903 [details] [review] type column patch Patch adds new file type column.
Federico, could you review the patch ?
Eeeek, I totally lost the original notification mail in my inbox. Sorry about the delay, Pablo; I'll review this ASAP.
Still needs review...
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..
Created attachment 361599 [details] [review] GtkFileChooser: add a sortable "Type" column
Created attachment 361600 [details] [review] GtkFileChooser: Add new 'type-format' setting To allow for different outputs to be used in "Type" column.
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.
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.
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'
-- 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.