GNOME Bugzilla – Bug 786367
add support for starred files in the filechooser
Last modified: 2018-05-02 18:52:27 UTC
See patch.
Created attachment 357721 [details] [review] filechooser: add support for starred files Update the tracker search engine so that it can also query for the favorite files and add a new operating mode for the filechooserwidget, which will be used for displaying the starred files.
Patch applies cleanly on the 3.22 branch, but I get a warning building it: gtkfilechooserwidget.c: In function ‘update_appearance’: gtkfilechooserwidget.c:3468:7: warning: implicit declaration of function ‘gtk_places_sidebar_set_show_starred_location’; did you mean ‘gtk_places_sidebar_set_show_other_locations’? [-Wimplicit-function-declaration] gtk_places_sidebar_set_show_starred_location (GTK_PLACES_SIDEBAR (priv->places_sidebar), FALSE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gtk_places_sidebar_set_show_other_locations It would be nice to have the patch forward-ported to master as well
oh, I missed the dependent bug
do we want a way to toggle starredness in the file chooser ? I was trying this, and a few files showed up there without me having any idea how they got there, and on way to remove them...
The reason i was trying to remove the stars is that I wanted to see the empty state here. How does it look ?
(In reply to Matthias Clasen from comment #5) > The reason i was trying to remove the stars is that I wanted to see the > empty state here. How does it look ? The empty state is now an empty tree view. Maybe it should be something like when the search has no results?
(In reply to Matthias Clasen from comment #4) > do we want a way to toggle starredness in the file chooser ? I was trying > this, and a few files showed up there without me having any idea how they > got there, and on way to remove them... I don't think we want a way to star/unstar files in the file chooser. You will be able to star/unstar soon in Nautilus, or in other apps that use tracker for favorites, like Photos or Music
Created attachment 358059 [details] [review] filechooser: add support for starred files Update the tracker search engine so that it can also query for the favorite files and add a new operating mode for the filechooserwidget, which will be used for displaying the starred files.
Review of attachment 358059 [details] [review]: We have a search engine and query abstraction. I think it would be nicer to add gtk_query_set_search_favorites() instead of breaking the abstraction and using the tracker search engine directly in the file chooser. This would also give us a change to implement favorites on Quartz, if there is such a concept there.
Created attachment 358226 [details] [review] filechooser: add support for starred files Update the tracker search engine so that it can also query for the favorite files and add a new operating mode for the filechooserwidget, which will be used for displaying the starred files.
Review of attachment 358226 [details] [review]: Thanks, this looks better to me. Good enough to commit, but I'd like to ask for follow-up commits to make GtkSearchEngineQuartz an GtkSearchEngineSimple return empty results for favorite searches.
Created attachment 365889 [details] [review] filechooser: add support for starred files Update the tracker search engine so that it can also query for the favorite files and add a new operating mode for the filechooserwidget, which will be used for displaying the starred files.
The patch above is updated so that the bug: https://gitlab.gnome.org/GNOME/nautilus/issues/170 no longer occurs.
Created attachment 365890 [details] [review] filechooser: add support for starred files Update the tracker search engine so that it can also query for the favorite files and add a new operating mode for the filechooserwidget, which will be used for displaying the starred files.
Comment 11 would still be nice to address
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/879.