← Back to team overview

ubuntu-phone team mailing list archive

[Scopes] More button | CannedQuery or Result activation

 

Hi

I'm facing a problem with my places scope. I want to have a query result
that acts like a "more" button. Or is there a design for it?

I looked into the following:


   - CannedQuery:

This is working, but the options are very limited. I can only set a query
string and a department. (Which I found weird as the department tutorial
suggests department queries normally don't contain query strings )

I don't want to set a different/strange query string. Cause this is
displayed to the user. And I need to keep reference to a long id of the
current online search (to get the next x results) and that would look
bad/hacky as query string. I would want to avoid having to write it to a
cache dir too.

Is it possible to also set arbitrary data in the canned query? Like I can
do with a CategoryResult. Something with SearchMetadata hints fi.
It would be nice to not discard scope://<id>?*<whatever>* and have the
whatever in SearchMetadata's hints.


   - Deriving ActivationQueryBase

This seems to do nothing. I did:

unity::scopes::ActivationQueryBase::UPtr Scope::activate(const
> unity::scopes::Result &result, const unity::scopes::ActionMetadata
> &metadata)
> {
>     return sc::ActivationQueryBase::UPtr(new Activation(result, metadata));
> }


from my Scope impl. and:


sc::ActivationResponse Activation::activate()
> {
>     cerr << "activate" << endl;
>     return sc::ActivationResponse::NotHandled;
> }


from my ActivationQueryBase impl. but the line is never printed. Only the
preview action is called. (I did mark the result
with set_intercept_activation)

This is done with the unity-scope-tool from the desktop (14.10) if that
makes a difference. (the emulator doesn't run on my laptop)

Regards
Sam Segers

Follow ups