Logo Search packages:      
Sourcecode: catfish version File versions  Download package

def catfish::catfish::treeview_get_selection (   self,
  treeview,
  event = None 
)
Retrieve the model and path of the selection.

Definition at line 447 of file catfish.py.

                                                          :
        """Retrieve the model and path of the selection."""

        model = treeview.get_model()
        if event == None:
            try:
                path = treeview.get_cursor()[0]
                return model, path
            except:
                path = None
        if event <> None:
            # Select the entry at the mouse position
            pathinfo = treeview.get_path_at_pos(int(event.x), int(event.y))
            try:
                path, col, cellx, celly = pathinfo
                treeview.set_cursor(path)
            except:
                path = None
        return model, path


Generated by  Doxygen 1.6.0   Back to index