summaryrefslogtreecommitdiff
path: root/gtk/ui
diff options
context:
space:
mode:
authorNelson Benítez León <nbenitezl@gmail.com>2019-06-06 19:02:11 -0400
committerNelson Benítez León <nbenitezl@gmail.com>2019-06-22 13:22:59 -0400
commitc789a396607a3e2cef84c6dd55f45c566a2a19c7 (patch)
tree6d455bb8106033d6a9f59e0df0ec948f49cf22f2 /gtk/ui
parent3c6045e300f9d4ead188c4490f8ef29340a2083c (diff)
downloadgtk+-c789a396607a3e2cef84c6dd55f45c566a2a19c7.tar.gz
GtkFileChooser: add a sortable "Type" column
along with a new 'type-format' setting that allows to choose the output format for the "Type" column. The options implemented for this setting are: 'mime' : Output from g_content_type_get_mime_type(). 'description' : Output from g_content_type_get_description(). 'category' : It uses the corresponding generic icon of the mime type to group by categories (aka basic types). This produces a more compact output than previous options, and allows for type families to be grouped together, so eg. after sorting by "Type" column, jpeg and png images will be placed together, or the various types of archiver files will also be grouped together. This format was copied from and currently used by Nautilus list view, so we also improve consistency with Nautilus. Bugzilla entry for Nautilus implementation is: https://bugzilla.gnome.org/show_bug.cgi?id=683722 The list of type families or categories can be checked on: https://developer.gnome.org/icon-naming-spec/#mimetypes This 'category' format is set as default. Issue #362
Diffstat (limited to 'gtk/ui')
-rw-r--r--gtk/ui/gtkfilechooserwidget.ui12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/ui/gtkfilechooserwidget.ui b/gtk/ui/gtkfilechooserwidget.ui
index 07c64ffd4f..623bd86aec 100644
--- a/gtk/ui/gtkfilechooserwidget.ui
+++ b/gtk/ui/gtkfilechooserwidget.ui
@@ -218,6 +218,18 @@
</object>
</child>
<child>
+ <object class="GtkTreeViewColumn" id="list_type_column">
+ <property name="title" translatable="yes">Type</property>
+ <property name="resizable">1</property>
+ <child>
+ <object class="GtkCellRendererText" id="list_type_renderer">
+ <property name="xalign">0</property>
+ <property name="xpad">6</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
<object class="GtkTreeViewColumn" id="list_time_column">
<property name="title" translatable="yes">Modified</property>
<property name="sizing">fixed</property>