// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "menu.h"
-#pragma implementation "menuitem.h"
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+ #pragma implementation "menu.h"
+ #pragma implementation "menuitem.h"
#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/app.h"
return TRUE;
}
-bool wxMenu::DoAppend(wxMenuItem *mitem)
+wxMenuItem* wxMenu::DoAppend(wxMenuItem *mitem)
{
- return GtkAppend(mitem) && wxMenuBase::DoAppend(mitem);
+ if (!GtkAppend(mitem))
+ return NULL;
+ return wxMenuBase::DoAppend(mitem);
}
-bool wxMenu::DoInsert(size_t pos, wxMenuItem *item)
+wxMenuItem* wxMenu::DoInsert(size_t pos, wxMenuItem *item)
{
if ( !wxMenuBase::DoInsert(pos, item) )
- return FALSE;
+ return NULL;
// GTK+ doesn't have a function to insert a menu using GtkItemFactory (as
// of version 1.2.6), so we first append the item and then change its
// index
if ( !GtkAppend(item) )
- return FALSE;
+ return NULL;
if ( m_style & wxMENU_TEAROFF )
{
menu_shell->children = g_list_remove(menu_shell->children, data);
menu_shell->children = g_list_insert(menu_shell->children, data, pos);
- return TRUE;
+ return item;
}
wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
hotkey << wxT("Down" );
break;
case WXK_PAGEUP:
+ case WXK_PRIOR:
hotkey << wxT("Prior" );
break;
case WXK_PAGEDOWN:
+ case WXK_NEXT:
hotkey << wxT("Next" );
break;
case WXK_LEFT: