← Back to team overview

ubuntu-phone team mailing list archive

Re: [Scopes] Easy (?) questions

 

Hi Robert,

thanks for the feedback, that is really useful!

I can only provide partial answers…

> 1) Can a setting be disabled based on the behavior of another?  I have two boolean settings, but the second only has an effect when the first is enabled.  Can I have the second be greyed out until the first is turned on?

No, there is no provision for this at the moment. I doubt that we'll add this because expressing the relevant constraints in the settings.ini file would rapidly get very complex.

> 2) Is there a way to mark strings in the settings.ini file as translatable, and then to put those strings in the installed settings.ini file?

There is a mechanism with some tools built around gettext. I believe Pete may be able to comment on this. But, in general, you can localize DisplayName and DisplayValues in the settings.ini file directly, without any additional tool support. This is described here:

http://developer.ubuntu.com/scopes/tutorials/adding-settings-to-your-scope/

> 3) Is there a way to put text in the emblem, rather than an image.  Right now, I'm using SVG images to fake it, but the alignment and font size is noticeably off.

I don't think this is possible at the moment.

> 4) Is there any way to run an additional query to load more results when then user scrolls to the bottom of the query page?  I'm purposefully not trying to get all the results at first, but the pull-for-more behavior seems very natural and a compliment to the pull-for-refresh at the top.

There is no support for incremental result delivery such as this. If you have lots of results, the shell will automatically add a "Shore more" button or some such, but there is no way for explicit paging that would fetch more results from the backend in response to a user action right now.

> 5) Is it possible to change the properties of existing results?  I have preview actions that cause a change in the remote resource, but when the user returns to the query page, the result corresponding to that resource has not been updated.

No. The only way to get results updated is to rerun the query, possibly by attaching a CannedQuery to an action. This is deliberate because the aim is for the shell to render things as soon as possible, and any API to update a result "after the fact" would probably end up being rather complex.

> 6) If (5) is not possible, is it possible to mark the query results as invalid, so that the remote server is hit for all the results again?

I believe you can attach a canned query URI to a preview action, in which case the query will be run by the shell.

Cheers,

Michi.

Follow ups

References