Tables don't work with GtkBuilder

Bug #1027609 reported by Thomas Leonard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StoryText
Fix Committed
Undecided
Unassigned

Bug Description

Probably a similar problem to #1022459, but events on GtkTreeView widgets created by GtkBuilder don't seem to work.

The attached test case opens a window showing two rows. Double-clicking on a row prints the values to stdout. StoryText reports:

ERROR: Could not find the relevant column IDs, so cannot describe tree view!

Thanks,

Revision history for this message
Thomas Leonard (talex5) wrote :
Revision history for this message
Geoff Bache (geoff.bache) wrote :

This looks tricky. Problem is that there is all sorts of magic in StoryText to handle gtk.TreeView, whose API has many set- functions and very few get- ones. In particular there seems to be no way to get at the attribute mapping from the cell renderers after the fact. So far it works by monkey-patching the set methods, but that's not an option here, as everything is set up in C code where I can't interfere with it.

The only way I can see to fix this is to actually parse the UI description myself and extract this information. Any better suggestions gratefully received...

Changed in storytext:
status: New → Confirmed
Revision history for this message
Thomas Leonard (talex5) wrote :

Parsing the XML seems like a reasonable solution (the XML looks quite clean).

Revision history for this message
Geoff Bache (geoff.bache) wrote :

Fixed by parsing the XML. Your mileage may vary, but it works with the example you gave now.

There may also be more similar problems, particularly gtk.FileChooser I think may not work, feel free to send more along if and when you encounter them.

Changed in storytext:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.