Re: about menu item callback



Once upon a time wangtao wrote @ Fri, 14 Mar 2003 12:47:45 -0800

Hi!

    How can I pass parameter to the callback function of a menu item?
    For example:    
      In callback function:
   void on_view_refresh_activate(GtkMenuItem     *menuitem,
                                        gpointer         user_data) ;
    Where to pass user_data?
                              

gchar *foo = g_strdup("fo");
g_signal_connect(G_OBJECT(gtkitem), "activate", G_CALLBACK(on_view_refresh_activate), foo);

-- 
----------------
-- Katoob Main Developer
Linux registered user # 224950
ICQ # 58475622
FIRST  make  it  run, THEN make it run fast "Brian Kernighan".

Attachment: pgpCKYskO2U5R.pgp
Description: PGP signature



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