[maemo-developers] PyGTK upgrade
From: Lauro Moura lauro.neto at openbossa.orgDate: Thu Oct 2 01:55:34 EEST 2008
- Previous message: PyGTK upgrade
- Next message: PyGTK upgrade
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Oct 1, 2008 at 6:19 PM, Jeffrey Barish <jeff_barish at earthlink.net> wrote: > Lauro Moura wrote: > >> On Wed, Oct 1, 2008 at 1:36 AM, Jeffrey Barish >> <jeff_barish at earthlink.net> wrote: >>> When is PyGTK going to be upgraded to 2.12? gtk.CellLayout has 7 methods >>> that all require the cellrenderer. gtk.ComboBoxEntry creates and packs >>> the cellrenderer automatically, so without the get_cells method there >>> doesn't appear to be a way to use any of those methods nor to change >>> attributes of >>> the cellrenderer. get_cells is available only in PyGTK version >= 2.12. >>> I've been waiting since April for the upgrade. >> >> Jeffrey, PyGtk 2.12 is available in Diablo extras since early July[1] >> and in chinook since last october[2], but maybe these functions aren't >> exported. Could you provide a more detailed list of these functions? >> >> >> [1] http://repository.maemo.org/extras/pool/diablo/free/p/python-gtk2/ >> [2] http://repository.maemo.org/extras/pool/chinook/free/p/python-gtk2/ > > First, I learned a better way to get version information. Here's what I > have: > > gtk.gtk_version = 2.10.12 > gtk.pygtk_version = 2.12.1 > > It appears that the implementation of gtk.CellLayout is incomplete: > > import gtk > c = gtk.CellLayout() > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > NotImplementedError: gtk.CellLayout can not be constructed > > According to the documentation, CellLayout has been available since version > 2.4 of PyGTK. > > I am actually using a ComboBoxEntry, but it inherits from CellLayout. The 7 > methods that I mentioned are pack_start, pack_end, set_attributes, > add_attributes, clear_attributes, set_cell_data_func, and reorder. They > all appear as methods of ComboBoxEntry, although they are actually supposed > to be methods of CellLayout. The one method of CellLayout that is missing > from ComboBoxEntry is get_cells. My point in the previous message was that > the 7 extant methods of CellLayout all require a cell as an argument. > Normally, one would get the cell by calling get_cells, but get_cells is not > extant. Although CellLayout has supposedly been available since version > 2.4, get_cells has been available only since 2.12. I mistakenly believed > that I had version 2.10 of PyGTK, hence my eagerness for version 2.12. > However, assuming that gtk.pygtk_version is the reliable way to get the > version of PyGTK, it seems that I do, in fact, have version 2.12 already. > Accordingly, it seems that get_cells should be available. After looking the gtk headers and GTK docs, get_cells is available only in GTK 2.12 and upper, while the GTK+ provided in maemo is 2.10. So, pygtk checks for it but as it can't be found, bypasses it. -- Lauro Moura INdT - Instituto Nokia de Tecnologia
- Previous message: PyGTK upgrade
- Next message: PyGTK upgrade
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]