global_search is called without query string

Bug #999843 reported by Leopard2A5
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
singlet
New
Undecided
Unassigned

Bug Description

Source: http://askubuntu.com/questions/125121/unity-lens-not-included-in-global-search/125420#comment163274_125420

When searching in the global dash (not with the lens selected) the lens daemon's global_search method is called without/with an empty query string.
I've attached the whole project, you might need pidgin installed and running to debug it, but maybe you don't

P.S.: See project directory/pidgin/__init__.py line 69

Revision history for this message
Leopard2A5 (leopard2a5) wrote :
Revision history for this message
Michael Wild (themiwi) wrote :

The problem is that in /usr/share/pyshared/singlet/lens/base.py in the initializer of class Lens the self._lens.props.search_in_global property is set to False. Hacking around this problem is simple, just override the __init__() method:

class MyLens(SingleScopeLens):
    def __init__(self):
        SingleScopeLens.__init__(self)
        self._lens.props.search_in_global = True

To properly solve this, the property should probably be exposed to child classes.

Revision history for this message
Frederik Elwert (frederik-elwert) wrote :

Okay, I was wondering why the lens is visible in the first place if search_in_global is False.

So currently, results *are* shown in the global dash ("home"), but global_search is always called with an empty search.

I guess there should be a simple boolean property (probably in Meta?) that either shows results in the dash home and passes the search string, or completely excludes the results from the dash home. I had guessed that search_in_global is the property that handles this, but obviously it is possible to have search_in_global be False and still show the results in the dash home.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.