GNOME Bugzilla – Bug 740302
We need a way to change defaults in tracker-needle
Last modified: 2015-04-01 18:59:23 UTC
Most people with desktop search try first to find a file by searching by filename. If that does not help they will widen the search criteria to search inside files also. To get to the most useful basic search I now need three clicks every time I start the search: 1. Start Desktop-search by clicking icon 2. Change to "File name view" 3. Change to search from file names only We need a way to change a settings panel in tracker-needle so that these most useful and fastest settings can be set as default. So that they become accessible by one click instead of three. Googling this I found a mod made for Arch Linux: https://aur.archlinux.org/packages/tracker-needle-configurable/ I suggest something like that to be added to the main branch of tracker-needle. My OS: Linux Mint 17 Cinnamon 64 bit.
Thanks for the suggestion. Are you interested in patching Tracker for us to do this? We would certainly accept a patch to do so...
Created attachment 300152 [details] [review] Gsettings for tracker-needle Make tracker-needle use gsettings. Stores the last view user was on before closing tracker-needle. When reopening users gets the last type of view. This way users who use search by file name or by categories won't have to change the view every time they use tracker-needle.
Created attachment 300153 [details] [review] Gsettings for tracker-needle minor indent fixes
Please note that this patch modifies the file for which I have submitted patch here https://bugzilla.gnome.org/show_bug.cgi?id=746194. To avoid conflicts, first apply that patch and then this patch.
Review of attachment 300153 [details] [review]: First, thanks for the patch! OK, so a few things to fix here: 1. schemas should be created from a .xml.in, like we do with other binaries, that way we get content translated. See: a) https://git.gnome.org/browse/tracker/tree/src/tracker-store/org.freedesktop.Tracker.gschema.xml.in b) https://git.gnome.org/browse/tracker/tree/src/tracker-store/Makefile.am#n89 2. instead of "print()", use "debug()" or "message()" to use the GLib APIs... Thanks :)
Created attachment 300183 [details] [review] tracker-needle: use gsettings
Thanks Martyn for review. I have made the changes you mentioned. Took some liberty of reordering and commenting in Makefile.am. :)
Review of attachment 300183 [details] [review]: Good patch. One ting I would say though... it doesn't make sense to have 3 options when the views are exclusively mutual. It would make more sense to store a value, 0/1/2 for whichever view is used. What happens if someone sets all 3 to TRUE? We also have a policy to try to keep the settings down (in number). Everything else is fine. Thanks Kunaal! :)
Created attachment 300539 [details] [review] Gsettings for tracker-needle
Thanks for review and suggestion. I agree three settings for mutually exclusive is waste as well as a source of bug. I have by default set filelist view (value = 2) so even if settings is buggy it will switch to default view.
Created attachment 300710 [details] [review] Gsettings for tracker-needle
Created attachment 300711 [details] [review] Gsettings for tracker-needle
Review of attachment 300711 [details] [review]: Everything looks good except for the default value being 2. The first view should be the default. If you can update that in the GSettings XML file and the .vala, you can go ahead and commit. Thanks :)
Created attachment 300731 [details] [review] Gsettings for tracker-needle Made the first view default (categories view, default-view = 1)
Thanks for review. I have made the changes you asked and committed the patch. Please close the bug.
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.