Re: gnome_popup_menu_do_popup ()




 James> This function overrides the user data you specified in the GnomeUIInfo
 James> array.  Instead, try using gtk_menu_popup:
  gtk_menu_popup(ggv->popup_zoom_menu, NULL, NULL, NULL, NULL,
                 event->button, event->time);

Hi James,

I am trying to get gtk_menu_popup to work. However, the callback
function gets called, but the value of data is 0 (in the callback).

        GnomeUIInfo popupZoomMenu[] = {
                {GNOME_APP_UI_ITEM, ZoomMagnLabels[0], NULL, 
                 crop_zoom_callback, &temp[4] , NULL,
                 GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL},
                {GNOME_APP_UI_ITEM, ZoomMagnLabels[1], NULL, 
                 crop_zoom_callback, &temp[5], NULL,
                 GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL},
                {GNOME_APP_UI_ITEM, ZoomMagnLabels[2], NULL, 
                 crop_zoom_callback, &temp[6], NULL,
                 GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL},
                ... 
 
void crop_zoom_callback(GtkWidget *widget, gpointer *data)
{
        window_with_data *wwd = (window_with_data *) data;
        ggv_window *ggv = wwd->ggv;

        g_print("Address [%x]\n", data);
        return;
}


Is there anything else I have to do to get it work?

Thanks for any help.

 James> James.

 James> -- 
 James> Email: james daa com au
 James> WWW:   http://www.daa.com.au/~james/



 James> _______________________________________________
 James> gnome-devel-list mailing list
 James> gnome-devel-list gnome org
 James> http://mail.gnome.org/mailman/listinfo/gnome-devel-list

--
Daniel M. German                  "Reading the best writers is not
   The Western Cannon, H. Bloom -> going to make us better citizens"
http://turingmachine.org/
dmg csg uwaterloo ca

 




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