From e43ba9d726658123036b6c49ee0c2be011adefab Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 8 Jul 2015 17:42:34 -0400 Subject: [PATCH] file chooser: Ensure we update subtitles Notify the ::subtitle property when modes change that may affect it. Also ensure that we update the location mode when we switch back to the pathbar. --- gtk/gtkfilechooserwidget.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 3e943b7037..e7ed0b5071 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -3030,10 +3030,11 @@ operation_mode_set_browse (GtkFileChooserWidget *impl) GtkFileChooserWidgetPrivate *priv = impl->priv; gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_files_stack), "list"); + location_mode_set (impl, LOCATION_MODE_PATH_BAR); gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_header_stack), "pathbar"); gtk_revealer_set_reveal_child (GTK_REVEALER (priv->browse_header_revealer), TRUE); - location_bar_update (impl); gtk_widget_set_sensitive (priv->filter_combo, TRUE); + g_object_notify (G_OBJECT (impl), "subtitle"); } static void @@ -3065,6 +3066,7 @@ operation_mode_set_recent (GtkFileChooserWidget *impl) recent_start_loading (impl); file = g_file_new_for_uri ("recent:///"); gtk_places_sidebar_set_location (GTK_PLACES_SIDEBAR (priv->places_sidebar), file); + g_object_notify (G_OBJECT (impl), "subtitle"); g_object_unref (file); gtk_widget_set_sensitive (priv->filter_combo, TRUE); } @@ -5314,6 +5316,8 @@ update_current_folder_get_info_cb (GCancellable *cancellable, gtk_places_sidebar_set_location (GTK_PLACES_SIDEBAR (priv->places_sidebar), priv->current_folder); + g_object_notify (G_OBJECT (impl), "subtitle"); + g_signal_emit_by_name (impl, "current-folder-changed", 0); check_preview_change (impl); -- 2.30.2