jumping between applications in paroli/tichy

Guillaume Chereau charlie at openmoko.org
Mon Nov 17 09:21:49 CET 2008

On Mon, 2008-11-17 at 08:16 +0100, Mirko Lindner wrote:
> Hash: SHA1
> Hi,
> While looking at the contacts application and defining a sensible
> approach I came across a small problem in my head.
> When I open the contactslist and click a contact in order to call him
> paroli/tichy would have to switch on the dialer application and dial the
> number and show the respective part of the GUI. However there is no way,
> as far as I can tell, in tichy yet that allows the user or even the
> software to jump to any "step" in a plugin.
> The steps here would be:
> open contacts
> chose contact
> switch to dialer application with number dialing in process
> IF successful establish call, on call finish show desktop
> IF NOT successful go back to contacts
> The problem here is that the dialer app, when opened, starts with the
> dialpad in "idle" mode but we need it to dial the number right away.
> Any ideas how to go about this?

There are two applications : 
'Caller', that will call a given number
'Dialer', that let you type a number and then invoke 'Caller'

So in your case you want to use 'Caller' and not 'Dialer'

But in fact you can simply use the 'Caller' service, for example
to call the number '01234' from within a tichy tasklet : 

  yield tichy.Service('Caller').call(window, '01234')

[where window is the parent window you want to use for the dialer, with
etk or gtk backend it will be ignored since all app start in a new

if you don't run from a tasklet, you can still invoke it like this :
  tichy.Service('Caller').call(window, '01234').start(on_return,

[where `on_return` and `on_error`, are two optional callback functions
that will be called when the caller service is done]

But now, to really really do things in a nice way, you can even directly
use the tichy.Contact item, that already defines the 'Call' action.
So if you want to show a contact and let the user being able to initiate
a call, you can write : 

  actor = contact.create_actor()

Now depending of the 'Design' service that may do different things. The
default design will try to show a button with the contact name (plus an
optional icon), when the user click on the contact, it will pop up a
menu with the different possible actions on a contact (including 'Call')

Anyway, depending on what you want to do you can use or not those

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.openmoko.org/pipermail/devel/attachments/20081117/22cfc618/attachment.pgp 

More information about the devel mailing list