gtkfilechooserwidget: Temporarily disable revealer transitions...

... when going between recent and browse. It just looks weird to have
this transition while the treeview model is just cleared/repopulated
without any transition.
This commit is contained in:
Timm Bäder 2019-07-19 09:36:25 +02:00
parent 3e54d374de
commit 59313e1459

View File

@ -3051,12 +3051,20 @@ static void
operation_mode_set_browse (GtkFileChooserWidget *impl)
{
GtkFileChooserWidgetPrivate *priv = gtk_file_chooser_widget_get_instance_private (impl);
GtkRevealerTransitionType old_revealer_transition_type;
gtk_places_sidebar_set_location (GTK_PLACES_SIDEBAR (priv->places_sidebar), priv->current_folder);
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");
old_revealer_transition_type = gtk_revealer_get_transition_type (GTK_REVEALER (priv->browse_header_revealer));
gtk_revealer_set_transition_type (GTK_REVEALER (priv->browse_header_revealer),
GTK_REVEALER_TRANSITION_TYPE_NONE);
gtk_revealer_set_reveal_child (GTK_REVEALER (priv->browse_header_revealer), TRUE);
gtk_revealer_set_transition_type (GTK_REVEALER (priv->browse_header_revealer),
old_revealer_transition_type);
gtk_widget_set_sensitive (priv->filter_combo, TRUE);
g_object_notify (G_OBJECT (impl), "subtitle");
}
@ -3090,10 +3098,19 @@ operation_mode_set_recent (GtkFileChooserWidget *impl)
{
GtkFileChooserWidgetPrivate *priv = gtk_file_chooser_widget_get_instance_private (impl);
GFile *file;
GtkRevealerTransitionType old_revealer_transition_type;
gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_files_stack), "list");
gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_header_stack), "pathbar");
/* Hide browse_header without a transition */
old_revealer_transition_type = gtk_revealer_get_transition_type (GTK_REVEALER (priv->browse_header_revealer));
gtk_revealer_set_transition_type (GTK_REVEALER (priv->browse_header_revealer),
GTK_REVEALER_TRANSITION_TYPE_NONE);
gtk_revealer_set_reveal_child (GTK_REVEALER (priv->browse_header_revealer), FALSE);
gtk_revealer_set_transition_type (GTK_REVEALER (priv->browse_header_revealer),
old_revealer_transition_type);
location_bar_update (impl);
recent_start_loading (impl);
file = g_file_new_for_uri ("recent:///");