Simple applet segfault



I know that people generally don't post questions about writing code here but
I'll give it a try. I'm just learning the gtk/gnome widget hierarchy so I need
some help. I'm writing a simple applet that doesn't do anything yet other than
display a button in an hbox.

When I run it, it segfaults. From gdb,

Program received signal SIGSEGV, Segmentation fault.
#0  0x40022150 in applet_widget_add () from /usr/lib/libpanel_applet.so.0
#1  0x8048df1 in main (argc=1, argv=0xbffff8a4) at printer_applet.c:79

This only happens when I add a callback on the button (the handler function is
empty),

gtk_signal_connect (GTK_OBJECT (button), "clicked",
  		    GTK_SIGNAL_FUNC (button_clicked),
  		    "ANYTHING");

If someone could look at this code and see if I'm doing something wrong, I'd
appreciate it. I'm using gnome-core-1.0.55-12.

Thanks,
Anthony



____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.

printer_applet.c



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