[Glade-users] Incompatible Pointer Type

I am new to glade, and I am apparently doing something evil. My app
compiles with warnings:

warning: passing argument 1 of ?gtk_button_get_label? from incompatible pointer type
/usr/include/gtk-2.0/gtk/gtkbutton.h:111: note: expected ?struct GtkButton *? but argument is of type ?struct 
GtkWidget *?

The line being complained about is:

strcpy(function, gtk_button_get_label(widget));

The "widget: is the GtkWidget passed to the function, which is the
signal handler for the button. Now, I know that I am passing a widget to
a function that expects a button. Any ideas on how I can properly do
this? i.e. without any warnings? Thanks!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20100627/15c4fcbb/attachment.html 

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