linuxmint/Cinnamon — pull request #3335 by iwis (2014-07-06 16:36:52+00:00)
Title: Added searching for files in Cinnamon Menu

Add possibility to search for files content in Cinnamon Menu using Tracker

Prerequisites:
![screenshot](https://cloud.githubusercontent.com/assets/8080496/3489405/91997ab2-052b-11e4-9a6e-2c4c5540eb39.jpg)

- install Tracker:
sudo apt-get --install-recommends install tracker tracker-gui
- in Menu applet settings check "Enable filesystem path entry in search box" (a new option should be added or text of this option should be edited)

-----

Currently the code is very simple, but the implementation is working and it is very helpful. If the code is accepted we should think
about elements that can be improved.

Problems:
* memory leak when there are many files in the result
If there are more than 500 items returned in Tracker result only the first 500 files are displayed (like in tracker-needle).
I made a test search for situation where Tracker returned 60 thousand items. Displaying result (500 items) takes 8 seconds what is ok.
But unfortunately after every such query Cinnamon (64-bit) is using about 40MB more RAM! So we have a memory leak which has to be fixed.
Maybe old TransientButton objects are not deleted?
* menu applet width is not decreased after displaying a file with a long path in a search result
When a file with a long path is displayed in a search result then Menu applet width is increased to display more information.
After closing menu and opening it again the width of menu should be narrow like at the beginning and increase only if needed.
Second solution: If a found file has a long path maybe it is better to display only a file name and display a full path as a tip?
Another problem: const MAX_BUTTON_WIDTH = "max-width: 75em;" is ok for 1366x768 screen resolution, but not for smaller resolutions.
* After closing menu and opening it again the previous Tracker results are still displayed. It has to be fixed.
All this problems show that probably we have a problem because old unused objects are not deleted.