The new search for GNOME Files (aka Nautilus)

As some (most? none? who knows =P) of you already know, last cycle I worked as a Google Summer of Code intern with Gtk+ and Nautilus. We saw the very positive results of it. And the picky eyes out there noticed that I wrote with these exact words: “While the project is over, I won’t stop contributing to Nautilus. Even with the interesting code, even with all the strange things surrounding it. Nautilus is like an ugly puppy: it may hurt your eyes, yet you still warmly love it.”

So, did I keep with my promises? Oh yeah, I freakin’ did! And here’s what happened:

Nautilus search reworkThe new search UI

What’s that, my dear lord?!

Exactly what you just saw: a cleaner, saner and more intuitive search filter editor. Nautilus has very complex but powerful internals, which allows us to do many things. And indeed, there is code for the many options in there. So, why did it used to look so poorly implemented/broken/<insert your bad word here>?

In simple terms: there was no UI to handle that up to now. See it in action:

https://www.youtube.com/watch?v=X2sPRXDzmUw

Obviously, it’s still a work in progress. While I did my best to implement it as clean as I could possibly do – I even refactored a whole class for it! – there still is a long road of reviews and cleanups ahead. And I still didn’t implement the full text search for Tracker backend (believe me, it won’t be easy).

Hope you all enjoy it 🙂


25 responses to “The new search for GNOME Files (aka Nautilus)”

  1. The video is marked PRIVATE so it can’t be viewed embedded or on the Youtube site. Still excited for the new Gnome to appear in Manjaro.

    1. That’s fixed now, thanks!

      1. No it’s not fixed

  2. Is it possible to do content search using nautilus (similar to tracker-needle)?

    1. Not yet – but it will be before the merge.

      1. By the way, the first time you open nautilus (this also shows in gtk+ file picker), the path/naviation buttons are not drawn correctly (notice the home button at the beginning of your video when nautilus launches). Something else to fix 🙂

  3. Emmanuel Avatar

    Nautilus search is veey useful to me. I use it daily. There’s just something that confuses me about it: it uses tracker, yet only search on the file names, not file contents. Wouldn’t tracker also suppirt the latter?

    1. Carlos Garnacho Avatar
      Carlos Garnacho

      @Emmanuel , your remark is very confusing. Tracker has supported that for approximately 7 years now.

      1. emmanuel Avatar

        sure tracker supports it but not the GUI frontend from nautilus? if it’s supposed to work, i have a couple of bugs to open….

  4. Is it possible to locate instead of search. Most of the time I just need to quick locate a file.

  5. […] Una di queste è l’arrivo della nuova modalità di ricerca file. L’annuncio arriva dal blog di uno degli sviluppatori che si sta occupando di effettuare il restyling.Ecco come […]

  6. Hi, this looks really great!

    Do you also have an insight why a recursive search in network folders (cifs) is not possible?

    1. Because It’s disabled by defaults starting from GNOME 3.18 (Due to performance issues).

      To enable it, you need to use DConf Editor (I forgot the key 🙁 ).

      1. i have org.gnome.desktop.nautilus.preferences enable-recursive set to true

  7. […] mais semble prometteur. Plus de détails sur la nouvelle interface de recherche pour Nautilus dans ce billet de blog par Georges Stavracas. Source: […]

  8. Thanks for the new Type-Ahead-Navigation in Nautilus 3.18! After the removal of the old Type-Ahead-Navigation the navigation with keyboard was slow, buggy and clumsy and now it is smooth, fast and deterministic. It selects exactly the file I want navigate to and shows me were the file is, especially the current directory.

    I know that it was named Type-Ahead-Find and it is a good search tool too, but the many purpose is fast navigation. Thank you very much! Great work!

    Now the small but nasty bug inside the File-Dialog (not Nautilus):
    You have two known files in your current directory “cstring.cpp” and “cstring.hpp” and lets say your in Gedit, for example:
    1. Ctrl + o
    2. Type: ‘cstring’ # lists cstring.cpp and cstring.hpp
    3. Type: ‘cstring.’ # all chars are delete and there is only the dot remaining
    4. Input field shows only: ‘.’

    Maybe some code interprets the dot as current directory or something else? Nautilus is not affected, what make me wonder. Shouldn’t both use the same logic?

  9. You are on fire! good job, congrats! 🙂

  10. Carlos Garnacho Avatar
    Carlos Garnacho

    Re: fts search, sorry to say I don’t believe you :), please drop by #tracker.

  11. […] Georges Stavracas is working on the new UI and describes the new editor as “cleaner, saner and more […]

  12. Me? I will do so, believe me 😉

  13. https://bugzilla.gnome.org/show_bug.cgi?id=756505

    Could I suggest something the the input field of the search?
    Keep it left aligned and let it use the full available size. A user enters may a long filename or a combination and we start reading/writing on the left hand side. I know that Epiphany centered the address field, which made it smaller which is really a drawback, especially while handling long URLs.

    To make it short: It’s a input field, not a caption. Let it take the space it needs 🙂

  14. Adrien Dorsaz Avatar
    Adrien Dorsaz

    Hello,

    Great idea to improve the integration between Nautilus and Tracker 🙂

    Maybe you’ll be able to fix a bug I’ve opened for tracker-need : I need a simple way to retrieve files by tags (e.g. all bills tagged “to pay”) : https://bugzilla.gnome.org/show_bug.cgi?id=745036 . I was able to do it for tracker-needle and I’ve proposed some patches, but it is still not integrated.

    I think to use Nautilus is also a good option for me, especially because we could search by tags from a specific directory. Maybe you’ll be able to add this functionality on the same time than you add the full text search ?

    Many thanks for your work on Nautilus !
    See you

    Adrien

  15. […] Georges Stavracas is working on the new UI and describes the new editor as “cleaner, saner and more […]

  16. […] Georges Stavracas is working on the new UI and describes the new editor as “cleaner, saner and more […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.