Re: pop menu with a right-click in a gtktreeview




On Jun 25, 2008, at 6:45 PM, Kevin Ryde wrote:

"muppet" <scott asofyet org> writes:

gtk_menu_popup() consumes the menu widget (that is, calls destroy on it) for itself. Click in this window and watch when the lolcat complains on stdout:

Are you sure that's not just the last reference being lost for a local
variable?  A global like below seems ok.

*surprise* I never tried that. I think i misread the calls to gdk_window_destroy() in gtkmenu.c as gtk_window_destroy(), which is very different.

Of course, now that i think of it, how could you set one menu into an OptionMenu if the menu gets destroyed by popup()? I must refrain from answering emails before my morning caffeine kicks in. :-)

anguila, if you can give us a minimal example that exhibits the behavior you're talking about, we won't have to speculate on what you're seeing.


I don't know enough glade to guess which way it happens there.
I thought glade created everything at startup, and then hung onto it
forever, if you know what I mean.

It does, which is why you have to be careful with glade's dialogs; if you let delete-event destroy the widget, the glade object winds up holding on to zombie objects, which are still alive because the object has a reference, but are unusable because they've been destroy-ed.


Blessed are the cheesemakers

Well, obviously, this is not meant to be taken literally. It refers to any manufacturers of dairy products.


--
Diane, ten-oh-three, Great Northern Hotel.
Sheriff Truman and I have just been with the one-armed man, or what's left of him. In another time, another culture, he may have been a seer, or a shaman priest, but in our world, he's a shoe salesman, and lives among the shadows.
-- Special Agent Dale Cooper




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