non-Hildonized v Hildonized Python app

non-Hildonized v Hildonized Python app

Hugo Rabson
Karma: 5
2008-12-25 22:46 UTC
Hi,

Aside from a prettier GUI and Nokia-specific connectivity, what do I
lose if I don't Hildonize a Python (PyGtk) app?

I'm porting an app to Windows and Linux. So far, Python w/ Gtk+Glade
suits my needs best. It must remain a cross-platform app (one codebase,
one embedded database, three executables residing on one directory on
one removable disk). I am trying to find a way to keep the codebase as
non-system-specific as possible. If I start Hildonizing the code, I
think I'll have to either write a one-way automatic Hildonizer or
somehow split the code into modules (one Hildonized, one
non-Hildonized). The program is very GUI-oriented, so I'm really tempted
not to Hildonize it at all and see if that's good enough.

So, I guess my questions are:-
1. Is there a way to automatically Hildonize an app?
2. If not, is there an easy way to keep two codebases (one Hildonized,
one non-Hildonized) in a Python app?
3, Failing that, what do I lose by not Hildonizing the Python app at all
(at least, not in the GUI)?

Thanks for your time. Happy Holidays & all that.

-Hugo
  •  Reply

Re: non-Hildonized v Hildonized Python app

Martin Grimme
Karma: 1317
2008-12-26 00:06 UTC
Hi,

2008/12/25, Rabson, Hugo SPC MIL USA USARPAC <hugo.rabson@us.army.mil>:
> Aside from a prettier GUI and Nokia-specific connectivity, what do I
> lose if I don't Hildonize a Python (PyGtk) app?

Apart from what you've mentioned, you don't lose much else, really.
Maybe you'll lose a few potential users, though.

> 1. Is there a way to automatically Hildonize an app?

Not really. It's usually a major UI redesign to make it fit well on
the small screen.
With small, I don't mean the resolution, but the physical size.

> 2. If not, is there an easy way to keep two codebases (one Hildonized,
> one non-Hildonized) in a Python app?

The main differences are HildonWindow vs GtkWindow and the application menus.
You could abstract from the implementations with a wrapper class and
load the appropriate implementation for the platform. You can detect
if you're running on hildon with:

try:
import hildon
except:
HAVE_HILDON = False
else:
HAVE_HILDON = True

There are other ways for detecting, too. But this is what I prefer.

> 3, Failing that, what do I lose by not Hildonizing the Python app at all
> (at least, not in the GUI)?

See above.


> Thanks for your time. Happy Holidays & all that.

Happy holidays to you, too!


Regards,
Martin
  •  Reply

Re: non-Hildonized v Hildonized Python app

Benoît HERVIER
Karma: 1414
2008-12-30 05:35 UTC
The worst thing to not hildonize Windows and keep gtk is :

on chinook and before :

- windows doesn't look like like other hilon apps (no border on left)
- no menu

on diablo :

- no menu

But there is also some advantage to not use hildon.Window() you will
not get any border around the window border and the gtk container. So
you ll lost less space (if your apps don t have menu :) )

Happy Holidays !


2008/12/26 Martin Grimme <martin.grimme@gmail.com>:
> Hi,
>
> 2008/12/25, Rabson, Hugo SPC MIL USA USARPAC <hugo.rabson@us.army.mil>:
>> Aside from a prettier GUI and Nokia-specific connectivity, what do I
>> lose if I don't Hildonize a Python (PyGtk) app?
>
> Apart from what you've mentioned, you don't lose much else, really.
> Maybe you'll lose a few potential users, though.
>
>> 1. Is there a way to automatically Hildonize an app?
>
> Not really. It's usually a major UI redesign to make it fit well on
> the small screen.
> With small, I don't mean the resolution, but the physical size.
>
>> 2. If not, is there an easy way to keep two codebases (one Hildonized,
>> one non-Hildonized) in a Python app?
>
> The main differences are HildonWindow vs GtkWindow and the application menus.
> You could abstract from the implementations with a wrapper class and
> load the appropriate implementation for the platform. You can detect
> if you're running on hildon with:
>
> try:
> import hildon
> except:
> HAVE_HILDON = False
> else:
> HAVE_HILDON = True
>
> There are other ways for detecting, too. But this is what I prefer.
>
>> 3, Failing that, what do I lose by not Hildonizing the Python app at all
>> (at least, not in the GUI)?
>
> See above.
>
>
>> Thanks for your time. Happy Holidays & all that.
>
> Happy holidays to you, too!
>
>
> Regards,
> Martin
>



--
Benoît HERVIER - http://khertan.net/
  •  Reply