[sugar] Native code activity and DBus

Bert Freudenberg bert
Sat Aug 11 12:57:36 EDT 2007

On Aug 10, 2007, at 15:11 , Keith R. Fieldhouse wrote:

> I have an activity the bulk of which is native code.  In the past I
> exce'd the code from a Python activity stub and used the Gtk Socket/ 
> Plug
> stuff to embed  my native window properly.  This however, gave me some
> event wonkiness.
> In reviewing the Wiki I learned about the "exec" termn in my
> activity.info.    I've got my own factory now, passing  
> sugarBundleId and
> sugarActivityId properly.  With these I set the X11 Window properties
> The problem is when I start my activity, my Icon gets placed in the
> circle on the home screen and my app starts and appears to work.  If I
> return to the home screen, though, there's a second "circle" icon that
> appears to be the one connected to the app.  What I consider the real
> app icon is still throbbing.   I must select the circle Icon to return
> to my app.
> One thing that I haven't done, is register my app with DBus.  Is this
> why my icons appear confused?  Or have I done something wrong?  I  
> intend
> to implement a DBus registration (is there an example activity that  
> does
> the minimum necessary here?) but I'm curious as to what effect that  
> will
> have...
> Thanks for any thoughts or suggestions you might have...

Make sure you set the props before opening the window - Sugar  
unfortunately does not track property changes. Neither does it track  
service creation, but that's a different issue.

Also, you might find sugar-native-factory useful, which handles the  
factory-side of dbus for your native activity:


The current (pre-rainbow) activity requirements are documented here:


Hopefully someone will update this with rainbow-specifics.

- Bert -

More information about the Sugar-devel mailing list