pupup-menu # dynamic items need different callback behaviour


i have a treeview that gets a different count of columns (simple he spreads up a selected database-table) each time coming up, and i have a pupup-menu opening if a row is clicked/activated.

Therein i list down the columns so the user can select which column of the selected row he wants to have copied to the clipboard.

All perfect right now, but i don't know how to pass through the number of the selected item (which would be equal to the wished column) to the defined callback.

It seems strange to me to just alloc an integer for every menu_item, link it up with the menu_item-pointer and take that into a CList to collect the position of each item, and then, in the callback, test the passed menu_item-pointer (passed in the stack of the callback-function) against the CList passed in the gpointer data stack part.

Sorry for complexity...

Is there another way to get the numbering of menuitems??


Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

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