[sugar] Native code activity and DBus

Albert Cahalan acahalan
Sun Aug 12 23:27:27 EDT 2007


Keith R. Fieldhouse writes:

> I have an activity the bulk of which is native code.

Same here. I've been trying to port Tux Paint -- not that porting
should be required for a full-screen X app. For a good while I just
put it aside mainly because nobody was willing to document anything.
(Also: Sugar ate most of the RAM I needed, and my B2 XO is no longer
useful for judging performance on the production machine. I have
since added an SD card for swap.)

Things have changed a tad though, thanks mainly to wiki user "Bert".
The Activity_DBus_API wiki page, though wrong in spots and lacking
some "rainbow" thing, has been a vast leap forward in documentation.

> 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
> _SUGAR_ACTIVITY_ID and _SUGAR_BUNDLE_ID.
...
> 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...

Seeing the same need, I just threw together a demo app. Mind helping?
http://wiki.laptop.org/images/e/ea/Hello-1.0.0.tar.gz

Status:

It builds a *.xo file. When the binary is run on a GNOME desktop,
it gives a 1200x900 window that says hello. There is some commented
out code to do dbus stuff. Most of this was written prior to Bert's
documentation, so perhaps that will help.

Patches are very welcome. If this toy app were to work, then I think
Tux Paint could be fixed as well.



More information about the Sugar-devel mailing list