How to corelate gtk.ListStore items with my own models
        Posted  
        
            by Victor Stanciu
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Victor Stanciu
        
        
        
        Published on 2010-06-13T16:09:10Z
        Indexed on 
            2010/06/13
            16:12 UTC
        
        
        Read the original article
        Hit count: 295
        
Hello,
I have a list of Project objects, that I display in a GTK TreeView. I am trying to open a dialog with a Project's details when the user double-clicks on the item's row in the TreeView.
Right now I get the selected value from the TreeView (which is the name of the Project) via get_selection(), and search for that Project by name in my own list to corelate the selection with my own model.
However, this doesn't feel quite right (plus, it assumes that a Project's name is unique), and I was wondering if there is a more elegant way of doing it.
© Stack Overflow or respective owner