summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooser.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-06 11:03:02 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-06 11:03:48 -0400
commite7b773b03122ac2e36a90bf836f5940e051e68e9 (patch)
tree24011483962fe6771db9bdb633771de16a26f8f1 /gtk/gtkfilechooser.c
parent57a225681c4ae8d2f36ab8e7e65ef1f5df265ac4 (diff)
downloadgtk+-e7b773b03122ac2e36a90bf836f5940e051e68e9.tar.gz
filechooser: Add a readonly :shortcut-folders property
This makes the shortcut folders list accessible in the the inspector.
Diffstat (limited to 'gtk/gtkfilechooser.c')
-rw-r--r--gtk/gtkfilechooser.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c
index 0c42fb8f7b..b77652bd1c 100644
--- a/gtk/gtkfilechooser.c
+++ b/gtk/gtkfilechooser.c
@@ -185,6 +185,22 @@ gtk_file_chooser_default_init (GtkFileChooserInterface *iface)
GTK_PARAM_READABLE));
/**
+ * GtkFileChooser:shortcut-folders:
+ *
+ * A #GListModel containing the shortcut folders that have been
+ * added with gtk_file_chooser_add_shortcut().
+ *
+ * The returned object should not be modified. It may
+ * or may not be updated for later changes.
+ */
+ g_object_interface_install_property (iface,
+ g_param_spec_object ("shortcut-folders",
+ P_("Shortcut Folders"),
+ P_("List model of shortcut folders"),
+ G_TYPE_LIST_MODEL,
+ GTK_PARAM_READABLE));
+
+ /**
* GtkFileChooser:create-folders:
*
* Whether a file chooser not in %GTK_FILE_CHOOSER_ACTION_OPEN mode