file chooser: Ensure we update subtitles
authorMatthias Clasen <mclasen@redhat.com>
Wed, 8 Jul 2015 21:42:34 +0000 (17:42 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 11 Jul 2015 05:15:41 +0000 (00:15 -0500)
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

index 3e943b7037e967de6a4680861f3b0b144fe4d71a..e7ed0b5071b5386e7a48518e3b2785e70fa9b166 100644 (file)
@@ -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);