After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786367 - add support for starred files in the filechooser
add support for starred files in the filechooser
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
Depends on: 785176
Blocks:
 
 
Reported: 2017-08-16 12:23 UTC by Alexandru Pandelea
Modified: 2018-05-02 18:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
filechooser: add support for starred files (20.92 KB, patch)
2017-08-16 12:24 UTC, Alexandru Pandelea
none Details | Review
filechooser: add support for starred files (20.98 KB, patch)
2017-08-21 09:29 UTC, Alexandru Pandelea
none Details | Review
filechooser: add support for starred files (20.76 KB, patch)
2017-08-23 10:50 UTC, Alexandru Pandelea
none Details | Review
filechooser: add support for starred files (21.63 KB, patch)
2017-12-22 22:53 UTC, Alexandru Pandelea
none Details | Review
filechooser: add support for starred files (21.65 KB, patch)
2017-12-22 22:59 UTC, Alexandru Pandelea
none Details | Review

Description Alexandru Pandelea 2017-08-16 12:23:59 UTC
See patch.
Comment 1 Alexandru Pandelea 2017-08-16 12:24:38 UTC
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.
Comment 2 Matthias Clasen 2017-08-16 18:44:03 UTC
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
Comment 3 Matthias Clasen 2017-08-16 18:46:03 UTC
oh, I missed the dependent bug
Comment 4 Matthias Clasen 2017-08-16 22:21:16 UTC
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...
Comment 5 Matthias Clasen 2017-08-16 22:24:40 UTC
The reason i was trying to remove the stars is that I wanted to see the empty state here. How does it look ?
Comment 6 Alexandru Pandelea 2017-08-17 08:51:25 UTC
(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?
Comment 7 Alexandru Pandelea 2017-08-17 08:56:15 UTC
(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
Comment 8 Alexandru Pandelea 2017-08-21 09:29:32 UTC
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.
Comment 9 Matthias Clasen 2017-08-22 11:27:13 UTC
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.
Comment 10 Alexandru Pandelea 2017-08-23 10:50:42 UTC
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.
Comment 11 Matthias Clasen 2017-08-23 14:10:04 UTC
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.
Comment 12 Alexandru Pandelea 2017-12-22 22:53:22 UTC
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.
Comment 13 Alexandru Pandelea 2017-12-22 22:54:39 UTC
The patch above is updated so that the bug: https://gitlab.gnome.org/GNOME/nautilus/issues/170 no longer occurs.
Comment 14 Alexandru Pandelea 2017-12-22 22:59:22 UTC
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 15 Matthias Clasen 2017-12-28 14:02:48 UTC
Comment 11 would still be nice to address
Comment 16 GNOME Infrastructure Team 2018-05-02 18:52:27 UTC
-- 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.