×
×

How to easily enable a third-party lens to respect Unity's online-search default approach

Unity offers (by default) both locally-based and online search results, meaning, typing a word in the search area (under places like Dash home, --being summoned by hitting the keyboard's Super key--), exposes (as matched results) local images, local video clips, local previously-installed applications, as well as items from Amazon (such as available-for-purchase tablets, processors, etc) and Ubuntu One Music Store.

By default, Ubuntu 12.10 comes with an ON/OFF switch, allowing users to disable the online search, in the sense of completely disabling online-based results to appear in the Dash home, lenses, etc.

Nevertheless, while the default (and various third-party) lenses have been created and implemented to obey the mentioned ON/OFF switch, there are third-party lenses unreachable by the ON/OFF switch; consequently, turning the switch OFF (under System Settings-->Privacy-->Search Results-->Include online search results OFF), still displays online-based results from non-optimized lenses.

Ubuntu's Michael Hall has put together a simplistic yet effective guide on how to adapt a lens/scope to respect the mentioned privacy settings (if they are in an OFF state).

The presented method is as simple as adding a couple of lines of code (recommended for Ubuntu 12.10), action that aligns third-party lenses to Unity's default approach (generating use cases like turning the switch OFF, automatically disables Dash's online search results capabilities for all the installed lenses).

Further details are available on http://mhall119.com/2012/12/adding-privacy-setting-support-to-your-unity...