summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserwidget.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/gtkfilechooserwidget.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/gtkfilechooserwidget.c')
-rw-r--r--gtk/gtkfilechooserwidget.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index e9fb6cbcab..3551463c23 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -3076,6 +3076,10 @@ gtk_file_chooser_widget_get_property (GObject *object,
g_value_set_object (value, impl->filters);
break;
+ case GTK_FILE_CHOOSER_PROP_SHORTCUT_FOLDERS:
+ g_value_take_object (value, gtk_file_chooser_get_shortcut_folders (GTK_FILE_CHOOSER (impl)));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -5625,6 +5629,9 @@ gtk_file_chooser_widget_add_shortcut_folder (GtkFileChooser *chooser,
GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (chooser);
gtk_places_sidebar_add_shortcut (GTK_PLACES_SIDEBAR (impl->places_sidebar), file);
+
+ g_object_notify (G_OBJECT (chooser), "shortcut-folders");
+
return TRUE;
}
@@ -5636,6 +5643,9 @@ gtk_file_chooser_widget_remove_shortcut_folder (GtkFileChooser *chooser,
GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (chooser);
gtk_places_sidebar_remove_shortcut (GTK_PLACES_SIDEBAR (impl->places_sidebar), file);
+
+ g_object_notify (G_OBJECT (chooser), "shortcut-folders");
+
return TRUE;
}