Hi, I've been trying to figure this out all day and I've about reached the end of my rope. I'm writing a widget similar to a GtkCombo, but instead of having a button next to the entry, it catches a keystroke then pops up a window with a tree view. I've gotten it to work with just combining widgets together, but I'm getting strange problems in trying to make it an actual widget. The source files are as follows:
< the link to main.c is no longer valid, and pupwin.c and .h are no longer the problem ones, see this post: http://www.gtkforums.com/viewtopic.php?p=2215#2215
pupwin.c is the source for my widget
pupwin.h is the header for my widget
main.c is a program that uses my widget
the problem that I'm getting is that in connecting the "focus_in_event" for the PupWin's parent window (in pupwin_set_parent_win()), the pupwin variable is valid, but once it calls pupwin_popdown(), the passed PupWin is corrupt. In GDB the value of pupwin->popped is 0 in pupwin_set_parent_win() but as soon as it's passed to pupwin_popdown() it's set to something like 375621, also, pupwin->keyletter is set to '\0' when it's passed to pupwin_popdown(). Forgive my oddly commented code , I wasn't really planning on releasing this. Also, forgive me if this is something stupidly easy. Thank you for any help that you can give...