Calculator for OpenMoko

Rodolphe Ortalo rodolphe.ortalo at free.fr
Wed Mar 21 20:35:37 CET 2007


Hello everyone,

the local departement also made a few attempts at building an
application for our favorite hack device.
Have a look at: http://rodolphe.ortalo.free.fr/mokocalc.png for a shot
of the display. That's a simplistic calculator, but well, it can do 4
operations... ;-)

The early source release is available at (.tar.gz format):
http://rodolphe.ortalo.free.fr/mokothings.html

Please note that there are still know issues with the code. It should
work, but don't use it to do important calculations! Especially, the
"backspace" button does not work yet and the fonts could be improved.
I'll try to address i18n afterwards.

Some questions with respect to such coding:
1) what about the name? I called the app openmoko-calculator, but maybe
this name is reserved for the real Phase 2 application I noticed
(afterwards) in the wiki...
2) should we use different buttons style names in such a case? (I have
reused the existing styles: mokofingerbutton-{dialer,orange,black} but
I'd like a bigger font if possible...)
3) Is there a preferred way between pango markup and fonts definition in
theme files?
4) where to place theme-files? I'd like to use one to change the numbers
display font but then I guess I'll need to modify gtkrc-2.0?

And then some detailed questions in case you know:
a) how is it possible to include a real +/- sign?
b) how to include an image in the backspace button without too much
work?
c) is it really allowed to pass a pointer to an enum field entry in C
(look at the way the signal handler is setup)?

Comments welcome of course...

Rodolphe





More information about the openmoko-devel mailing list