summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNelson Benítez León <nbenitezl@gmail.com>2020-04-19 14:16:02 -0400
committerNelson Benítez León <nbenitezl@gmail.com>2020-04-19 14:16:02 -0400
commitb01f371ce61f8077bb70a2b6024f4163fafffc5c (patch)
tree43c7885813851ed096142c4007ef946ea5fa2c59
parentbcf08abef0981456fd8400707431826e6473a63a (diff)
downloadgtk+-BUG_filechooserbutton_remote_GTK3.tar.gz
FileChooserButton: query 'display name' also for unbookmarked filesBUG_filechooserbutton_remote_GTK3
Do also the async file info query for remote files when they are not bookmarked, because otherwise "None" will be shown as file name (and fallback text generic icon will be used). The remote file was already browsed by the file chooser instance when selecting it, so querying the display name again should be using gio cache and not be slow. Even if it's were slow it's better than showing 'None' which makes it seem as if nothing was selected. Fixes #1966
-rw-r--r--gtk/gtkfilechooserbutton.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index fa9b945b7f..8711385d30 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -2550,7 +2550,8 @@ update_label_and_image (GtkFileChooserButton *button)
}
}
- if (g_file_is_native (file))
+ if (g_file_is_native (file) ||
+ !_gtk_bookmarks_manager_has_bookmark (button->priv->bookmarks_manager, file))
{
priv->update_button_cancellable =
_gtk_file_system_get_info (priv->fs, file,