Re: passing 3 widgets as parameters to g_signal_connect



Leslie Harlley Watter wrote:

I'm having problems with my program. When I pass the structure I have the
following warning

warning: passing arg 1 of `gtk_entry_get_text' from incompatible pointer type

Here is a snippet from my code:

typedef struct
{
  GtkWidget *op1;
  GtkWidget *op2;
  GtkWidget *res;
}CALC;

...

void
on_vezes_clicked                       (GtkButton       *button,
                                        gpointer         user_data)
{
...
  CALC *elem;
  (CALC *) elem = user_data;

  oper1 = gtk_entry_get_text(elem->op1);
  oper2 = gtk_entry_get_text(elem->op2);
> ...
}

do it this way:

oper1 = gtk_wentry_get_text (GTK_ENTRY (elem->op1));
oper2 = gtk_wentry_get_text (GTK_ENTRY (elem->op2));

cheers,
Andrei




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