[Glade-users] Incompatible Pointer Type

Russ Mannex russ at mannex.com
Sun Jun 27 17:49:51 EDT 2010


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!
-- 
Mannex



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


More information about the Glade-users mailing list