Re: treeview: seg fault When Collapsing a Row Containg a Selected Item
On Sat, 2007-06-16 at 12:15 -0400, Marshall Lake wrote: > I have a treeview/treestore containing many top-level rows. Each > top-level row contains many children. The treeview works fine except for > one thing. If the user expands a top-level row, selects a child, and then > collapses that row the program seg faults with the console error: > > gtk_tree_store_get_value: assertion `iter->stamp == GTK_TREE_STORE > (tree_model)->stamp' failed > gtype.c:3351: type id `0' is invalid > can't peek value table for type `' which is not currently referenced > Without seeing the code I can only guess. I seems that the iter your using is invalid -- or no longer valid. This could occur if you used a LOCAL variable to create the iter; then saved the pointer of that inter and tried to use it somewhere else which creates the segfault. To poke around looking for it, use this api to test iters before use: bool=gtk_tree_store_iter_is_valid(GtkTreeStore *tree_model, GtkTreeIter *iter) never trust an iter... James, > The treeview works fine if the user never collapses the row and goes on to > make another selection, either in that same top-level or a different > top-level. Also, if a row is expanded and then collapsed with no child > being selected it works fine. > > As an aside (?), I tried gtk_tree_selection_unselect_iter() on the child > after it was selected and got a seg fault and the same error as noted > above at the point the gtk_tree_selection_unselect_iter() was executed. > > Can someone tell me what might need to be done to avoid the seg fault? > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Disable ALL keybindings for a specific widgit? [SOLVED]
On 6/15/07, Justin Stallard <[EMAIL PROTECTED]> wrote: > On 6/15/07, Eduardo M KALINOWSKI <[EMAIL PROTECTED]> wrote: > > On 6/14/07, Justin Stallard <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I've looked through the tutorial, faq, API doc, and even google and I > > > can't seem to find out if there's some way to unbind all the > > > keybindings associated with a particular widgit. Is there? > > > > > > What I want to have is this: > > > A GtkEntry that does not respond to "Left", "Right", "Insert", or any > > > other keybindings or key presses so that I can handle them myself as > > > key_press_events. > > > > Well, if you connect a function to key-press-event and return TRUE, > > the default handler (that does all that) is not run, and the default > > action does not happen. > > When I return FALSE from my callback function, pressing "Tab" would > cause the "key-press-event" to be first handled by my function, and > then by the default. Returning TRUE gives me the result I want, and > "Tab" is only handled by my function. The following keys, however, > still do not get handled by my signal handler at all, in either case: > BackSpace > Return > Menu > Insert > Delete > Home > End > Left > Right > KP_Enter > > Are these keys handled some other way? What am I not understanding here? I've discovered what my problem was. I was using g_signal_connect_after() instead of g_signal_connect(). Using g_signal_connect() does what I want. -Justin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
treeview: seg fault When Collapsing a Row Containg a Selected Item
I have a treeview/treestore containing many top-level rows. Each top-level row contains many children. The treeview works fine except for one thing. If the user expands a top-level row, selects a child, and then collapses that row the program seg faults with the console error: gtk_tree_store_get_value: assertion `iter->stamp == GTK_TREE_STORE (tree_model)->stamp' failed gtype.c:3351: type id `0' is invalid can't peek value table for type `' which is not currently referenced The treeview works fine if the user never collapses the row and goes on to make another selection, either in that same top-level or a different top-level. Also, if a row is expanded and then collapsed with no child being selected it works fine. As an aside (?), I tried gtk_tree_selection_unselect_iter() on the child after it was selected and got a seg fault and the same error as noted above at the point the gtk_tree_selection_unselect_iter() was executed. Can someone tell me what might need to be done to avoid the seg fault? -- Marshall Lake -- [EMAIL PROTECTED] -- http://mlake.net ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list