From: Nelson Benítez León Date: Sun, 19 Apr 2020 20:57:56 +0000 (-0400) Subject: FileChooserButton: query 'display name' also for unbookmarked files X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~16^2~125^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=13506e36aa48bc9f195f59930cbb3816e37a1350;p=gtk4.git FileChooserButton: query 'display name' also for unbookmarked files 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 --- diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index d509b86990..848c78732d 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -2266,7 +2266,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->bookmarks_manager, file)) { button->update_button_cancellable = _gtk_file_system_get_info (button->fs, file,