Re: null parameter warning issue.



David Robin wrote:
>  gtk_menu_popup(
>                 GTK_MENU (context_menu),
>                 GTK_WIDGET (NULL),             // GtkWidget
> *parent_menu_shell,
>                 GTK_WIDGET (NULL),             // GtkWidget
> *parent_menu_item,
>                 GTK_SIGNAL_FUNC(NULL),  // not really GTK_SIGNAL_FUNC
> but works anyway.
>                 NULL,                          // gpointer data,
>                 event->button,
>                 event->time
>                 );
> 
> I get twice "Gtk-WARNING **: invalid cast from (NULL) pointer to
> `GtkWidget'" during execution.

Hi David, try:

gtk_menu_popup( GTK_MENU( popup ), NULL, NULL,
        (GtkMenuPositionFunc) NULL, NULL, 3, ev->button.time );

John




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