menuItem->QueryInterface(nsIMenuListener::GetIID(), (void**)&menuListener);
menuItem->QueryInterface(NS_GET_IID(nsIMenuListener), (void**)&menuListener);
void menu_item_activate_handler(GtkWidget *w, gpointer p){  // g_print("menu_item_activate_handler\n");  nsIMenuListener *menuListener = nsnull;  nsIMenuItem *menuItem = (nsIMenuItem *)p;  if (menuItem != nsnull) {    nsMenuEvent mevent;    mevent.message = NS_MENU_SELECTED;    mevent.eventStructType = NS_MENU_EVENT;    mevent.point.x = 0;    mevent.point.y = 0;    // mevent.widget = menuItem;    mevent.widget = nsnull;    menuItem->GetCommand(mevent.mCommand);    mevent.mMenuItem = menuItem;    mevent.time = PR_IntervalNow();    // FIXME - THIS SHOULD WORK.  FIX EVENTS FOR XP CODE!!!!! (pav)    //    nsEventStatus status;    //    mevent.widget->DispatchEvent((nsGUIEvent *)&mevent, status);    menuItem->QueryInterface(nsIMenuListener::GetIID(), (void**)&menuListener);    if(menuListener) {      menuListener->MenuItemSelected(mevent);      NS_IF_RELEASE(menuListener);    }  }}