[pygtk] pyjamas-desktop/gtk2
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Wed Aug 13 19:26:07 WST 2008
folks, hi,
i've started the project i promised 2 years ago i would begin: making
apps written for the web development kit, http://code.google.com/p/pyjamas
run unmodified on the desktop.
http://lkcl.net/pyjamas-desktop
applications written for pyjamas, the python-to-AJAX compiler, look so
startlingly similar to desktop apps that it seems blindingly intuitively
obvious that they should be _made_ to run as desktop apps. two attempts
have been started already: apparently there's a wxPython port (but i can't
find it) and llampies - a branch of pyjamas - is an effort to make *pygtk2*
applications run unmodified in a web browser.
progress on pyjamas-desktop has been _real_ quick, thanks to so many
questions on mailing lists having already been asked, i've been able
to find answers to almost everything i've been looking for within
minutes-to-hours. finding TreeView.set_headers_visible() was particularly
painful, though, for the dual-purpose ListBox.
effectively what i'm doing is "emulating" every single HTML widget,
one-for-one, with python-gtk2. some of the classes, unfortunately,
simply don't exist, and/or don't map real well.
* Table is missing an insert_row() function. i've had to keep tabs
on every single widget inserted into the Table, using a dictionary,
and move everything up, one-by-one.
* multi-select ListBox doesn't exist: i had to emulate one using
TreeView with set_headers_visible() and a ScrollingWindow.
* FlowPanel i _really_ don't know what to do about that. a FlowPanel
is where widgets will automatically fill the panel from left to right
until they won't fit and will then fill in a new row. resizing a
FlowPanel results in the widgets "flowing" across rows, automatically.
i've looked quite hard and such a concept really seems to be either
under a very obtuse name or non-existent. i'm not entirely sure how
to go about implementing it, so so hints here would be greatly
appreciated: how to capture "resize" signals etc.
* HTMLPanel i would _like_ to use gtkhtml - but gtk.HTML doesn't exist.
in particular, the "object_requested" signal is *perfect* - but...
i've spent several hours searching for python-gtk-html and all i could
find was python-gtkhtml2. python-gtkhtml2 is completely different,
and doesn't support "object_requested". if you're wondering what i'm
referring to, here it is in perl, which _does_ have Gtk::HTML -
http://search.cpan.org/src/MLEHMANN/Gtk-Perl-0.7009/GtkHTML/samples/test.pl
if gtk.HTML doesn't exist, this is a significant missing bit of
strategically important functionality. if it does, please could
someone tell me where!!
there is much, much more - i'm having to go through literally every single
widget in the entire python-gtk2 toolset _and_ more (python-gtkmozembed
to be able to insert adobe flash plugins into a desktop app).
for those people who have been struggling to implement certain types
of widget-functionality, pyjamas-desktop/gtk2 now contains good examples.
for those people who would like to be able to develop applications for
both desktop and web, without having to modify a single line of code to
do *both* jobs, your help in adding to pyjd/gkt2 would be greatly
appreciated.
l.
More information about the pygtk
mailing list