Re: Destroy signal not working on GtkMenuItem?
- From: learfox furry ao net
- To: Manuel Menal <mmenal ifrance com>
- Cc: GTK Application Development List <gtk-app-devel-list gnome org>
- Subject: Re: Destroy signal not working on GtkMenuItem?
- Date: Fri, 10 Nov 2000 15:23:53 -0800 (PST)
lfan> I tried to use the "destroy" signal handling in the same situation for a
lfan> GtkMenuItem, however it segfaults and gdb seems to show the inputs are no
lfan> the same to the signal handler function.
That's a strange behaviour. Here is an example which shows that
the "destroy" signal is sent to the GtkMenuItem when you
gtk_widget_destroy it:
# include <gtk/gtk.h>
void warn (GtkWidget *);
int
main (int argc, char **argv)
{
GtkWidget *win, *menubar, *file;
gtk_init (&argc, &argv);
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
menubar = gtk_menu_bar_new ();
file = gtk_menu_item_new_with_label ("File");
gtk_signal_connect (GTK_OBJECT (file),
"destroy",
GTK_SIGNAL_FUNC (warn),
NULL);
gtk_signal_connect_object (GTK_OBJECT (win),
"delete_event",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (file));
Here's something interesting, what's the difference between
gtk_signal_connect() and gtk_signal_connect_object()? Which one should I
use under what circumstances?
I think the problem is that I was using gtk_signal_connect_object()
for the "destroy" event.
--
Sincerely, ,"-_ \|/
-Capt. Taura M. , O=__ --X--
..__ ,_JNMNNEO=_ /|\
OMNOUMmnne. {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn. 'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe. "7OMMMMNNNNNWWEEEEOOOOOO" "'.
EEBNNMMMNWNWWEEIMMNe. __ 7EMMMNNNNNWWWEEEEEEEOO. " .
NNMMMMWWWMMMWEINMMMNn "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._ .
http://furry.ao.net/~learfox/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]