treeview, focus and event



Hi !

I am working on a program that should list in many treeviews directories and files.
I have 2 problems with the treeviews :

1 - I coded a function that handles the "cursor_changed" event of a liststore included in a treeview. The functions deletes the selected item in the liststore of the treeview. The thing is that when the treeview gets the focus, my function is called and the focus is automaticaly given to the first item of the list so that each time the treeview loose cursor and get it back, the first item is deleted... For example I have 2 treeviews view1, view2. At starting, view1 has the focus. The first click in view2's liststore body (not on an item) deletes the first item. The second click on view1's liststore body does nothing. The third click on view2 deletes the first. If the click hits an item of view2, are deleted the first item and the item folowing the one i selected.

2 - The second problem also deals with focus and deletion. When an item of the liststore is deleted, the gtk_list_store_remove() function seems to be removing the focus too from the treeview... I thought it was because the destroying of the selected item, but when i tried to select another item before calling the function there where no changes...

Hope someone will help me soon !

_________________________________________________________________
Hotmail : un compte GRATUIT qui vous suit partout et tout le temps ! http://g.msn.fr/FR1000/9493




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]