diff --git a/widget/src/gtk/Makefile.in b/widget/src/gtk/Makefile.in index a2364771dbb..c9b03eb1bb9 100644 --- a/widget/src/gtk/Makefile.in +++ b/widget/src/gtk/Makefile.in @@ -45,6 +45,7 @@ CPPSRCS = \ nsMenuBar.cpp \ nsMenuItem.cpp \ nsPopUpMenu.cpp \ + nsContextMenu.cpp \ nsRadioButton.cpp \ nsScrollbar.cpp \ nsSound.cpp \ diff --git a/widget/src/gtk/nsContextMenu.cpp b/widget/src/gtk/nsContextMenu.cpp index 31763b8490f..7336405f5f7 100644 --- a/widget/src/gtk/nsContextMenu.cpp +++ b/widget/src/gtk/nsContextMenu.cpp @@ -437,10 +437,10 @@ nsEventStatus nsContextMenu::MenuItemSelected(const nsMenuEvent & aMenuEvent) return nsEventStatus_eIgnore; } -void nsContextMenu::MenuPosFunc(GtkMenu *menu, - gint *x, - gint *y, - gpointer data) +void menu_popup_position(GtkMenu *menu, + gint *x, + gint *y, + gpointer data) { nsContextMenu *cm = (nsContextMenu*)data; *x = cm->GetX(); @@ -452,7 +452,7 @@ nsEventStatus nsContextMenu::MenuSelected(const nsMenuEvent & aMenuEvent) GtkWidget *parent = GTK_WIDGET(mParent->GetNativeData(NS_NATIVE_WIDGET)); gtk_menu_popup (GTK_MENU(mMenu), parent, NULL, - nsContextMenu::MenuPosFunc, + menu_popup_position, this, 1, GDK_CURRENT_TIME); if (nsnull != mListener) { diff --git a/widget/src/gtk/nsContextMenu.h b/widget/src/gtk/nsContextMenu.h index 922864552ae..7b3cdfc57fa 100644 --- a/widget/src/gtk/nsContextMenu.h +++ b/widget/src/gtk/nsContextMenu.h @@ -89,11 +89,6 @@ protected: nsIWidget * GetParentWidget(); char* GetACPString(nsString& aStr); - void MenuPosFunc(GtkMenu *menu, - gint *x, - gint *y, - gpointer data); - void LoadMenuItem(nsIMenu * pParentMenu, nsIDOMElement * menuitemElement, nsIDOMNode * menuitemNode, diff --git a/widget/src/gtk/nsWidgetFactory.cpp b/widget/src/gtk/nsWidgetFactory.cpp index 66bca695d01..2bb89304e86 100644 --- a/widget/src/gtk/nsWidgetFactory.cpp +++ b/widget/src/gtk/nsWidgetFactory.cpp @@ -41,9 +41,7 @@ #include "nsMenu.h" #include "nsMenuItem.h" #include "nsPopUpMenu.h" -#if 0 #include "nsContextMenu.h" -#endif #include "nsTabWidget.h" #include "nsFontRetrieverService.h" @@ -236,11 +234,9 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter, else if (mClassID.Equals(kCPopUpMenu)) { inst = (nsISupports*)new nsPopUpMenu(); } -#if 0 else if (mClassID.Equals(kCContextMenu)) { inst = (nsISupports*)(nsIContextMenu*)new nsContextMenu(); } -#endif else if (mClassID.Equals(kCSound)) { nsISound* aSound = nsnull; NS_NewSound(&aSound);