[maemo-developers] Proper documentation (was Re: [maemo-developers] HildonProgram input to gtk_widget_show()?)

From: Mike Frantzen mike at w4g.org
Date: Wed Nov 29 21:05:11 EET 2006
> > The N770 forces developer do it Nokia's way or not at all.
> What do you mean?
> * Gtk programs work out of the box

Sometimes.  Off the top of my head there were lots of little things
like gtk_arrow's or GTK_STOCK_CONNECT not being there and
gtk_file_choose_button misbehaving (or was it crashing?).

> * For programs which do not use Gtk nor SDL, you need to set
>   one X property
> (these are so that Task Navigator can associate them
> with the correct .desktop file)

Unless you hit one of the little "quirks" about the .desktop files.  Or
you have a script wrapping your application that spawns a small gui
process before the main application (hint the first process will
silently get killed by dbus).  Or you start suid root and privsep.

> And like on other Linux Desktops, you need to have a .desktop
> file so that your program appears in the menus.

And they're much more mature that what we have on the N770.  There was
the recent thread about trailing whitespace being invalid in a .desktop
file.  If you edit the .desktop file on the N770 and use word completion
then it will leave trailing whitespace...
 
> And like on Debian, things need to be in a package so that
> they can be managed.  This is IMHO actually the hardest thing.
> Doesn't sound that much, does it? :-)

Oh, it works great for toy programs.  But the problems snowball for
larger applications.
 
> > The big ones that immedietly come to mind are:
> > 1) gstreamer which I understand if you want to offload multimedia
> >   to the DSP.  It's just too bad that it's not stable.
> Want to != forced to?

Forced to if you want audio input.  No ESD, OSS or ALSA for recording.
Things can get very unstable with multiple processes and gstreamer on
the N770.
 
> > 2) dbus/libosso.  blech, complex solution to a simple problem.
>  very "Windows" like
> If one wants to integrate well to any other Desktop environment, one needs
> to implement some of their stuff too.  I don't see Maemo being more
> difficult in this respect than any other Desktop environment.

Yeah, this one's just me being grumpy.  Libosso hides the dbus
messiness very well.
 
> > 3) hildon-specific gtk widgets instead of just modifying the
> > stock GTK widgets to work well on the N770 platform
> Are you sure the "just modifying the stock GTK widgets to work
> well on the N770 platform" doesn't mean "rewriting the whole
> widget"?  :-)  In that case it's probably easier to make another
> widget, that way you could at least get an API that's designed
> for the job.

GTK is fairly object oriented for C.  It is designed to be able to
derive new widgets from other widgets.  Most of the Nokia-ized widgets
I've used have a close sibling in the traditional GTk library with a
different API.  I would have been more than happy to see the GTK widget
modified for behave better on Nokia and then a very hildon specific
widget derived with a more condusive API.

It all goes to portability.  From a development standpoint the N770
could have been just another linux/GTK target with a few ifdefs.  Making
a complex application "look good" on the N770 doesn't require forking
the UI, just forking a lot of the functions.
 
> If the UI's would be done with something like Glade (like AFAIK most
> Gnome programs are), having two UI XML descriptions shouldn't be that
> bad.  This of course depends on whether the constraints of smaller
> (physical) screen size force larger UI design changes, but that's
> a physical constraint, not a software constraint.  (it also requires
> the UI tool to support Maemo)

The Nokia guys did this very well.  Adapting to the smaller screen has
been near painless.

.mike

More information about the maemo-developers mailing list