Calculator for OpenMoko

Michael 'Mickey' Lauer mickey at openmoko.org
Wed Mar 21 23:37:17 CET 2007


Hi Rodolphe,

> 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... ;-)

Pretty cute -- I like it.

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

Thanks. How do you want to proceed with this application? Do you want
to create a project on projecst.openmoko.org or should we think about
adding it into the official OpenMoko SVN?

> 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.

Sure.

> 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...

openmoko-calculator sounds good. I don't see any value in starting
another application -- if your's will progress nicely, it can be
as well the "official" openmoko-calculator.

> 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...)

I think this should be part of the MokoFingerButton in gtkrc.

> 3) Is there a preferred way between pango markup and fonts definition in
> theme files?

Not yet. We're still experimenting with different approaches.

> 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?

Yeah. Basically the framework widgets should get their styling out of
the gtkrc and application-specific widgets should use custom
<applicationname>rc's which they place in the same directory where gtkrc
lives.

However, I'd like to think about a canonical numerical entry field
that could be shared between (at least) the dialer and the calculator.
Could you have a look at how reusable the dialer's number widget
currently is implemented? Eventually, I want to see such a widget as part of
libmokoui.

> 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?

Please check how the openmoko-dialer does this. Of course, it may not
be the best way to do it, so take it with a grain of salt. I couldn't
work on libmokoui for the past couple of months, but now that
3rd party applications are coming along, I want to have a close dialog
with you guys. Please also feel free to make use of the
framework-devel mailing list.

Best regards,

-- 
- Michael Lauer <mickey at openmoko.org>                   http://openmoko.org/
============================================================================
Software for the worlds' first truly open Free Software mobile phone




More information about the openmoko-devel mailing list