forked from AuroraMiddleware/gtk
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:
parent
3e54d374de
commit
59313e1459
@ -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:///");
|
||||
|
Loading…
Reference in New Issue
Block a user