X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7968b5c4c5e953a778708d3b8963db122cf5b3d4..931d6a47c32a5b4c283243cb553ce71ee2b535d5:/src/common/framecmn.cpp?ds=sidebyside diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 29cc46a368..bf310d7f9d 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -3,7 +3,6 @@ // Purpose: common (for all platforms) wxFrame functions // Author: Julian Smart, Vadim Zeitlin // Created: 01/02/97 -// Id: $Id$ // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -41,15 +40,16 @@ extern WXDLLEXPORT_DATA(const char) wxStatusLineNameStr[] = "status_line"; // event table // ---------------------------------------------------------------------------- -#if wxUSE_MENUS && wxUSE_STATUSBAR +#if wxUSE_MENUS + +#if wxUSE_STATUSBAR BEGIN_EVENT_TABLE(wxFrameBase, wxTopLevelWindow) EVT_MENU_OPEN(wxFrameBase::OnMenuOpen) EVT_MENU_CLOSE(wxFrameBase::OnMenuClose) EVT_MENU_HIGHLIGHT_ALL(wxFrameBase::OnMenuHighlight) END_EVENT_TABLE() - -#endif // wxUSE_MENUS && wxUSE_IDLEMENUUPDATES +#endif // wxUSE_STATUSBAR /* static */ bool wxFrameBase::ShouldUpdateMenuFromIdle() @@ -59,7 +59,7 @@ bool wxFrameBase::ShouldUpdateMenuFromIdle() // check if we're using the global menu bar as we don't get EVT_MENU_OPEN // for it and need to fall back to idle time updating even if normally // wxUSE_IDLEMENUUPDATES is set to 0 for wxGTK. -#ifdef __WXGTK__ +#ifdef __WXGTK20__ if ( wxApp::GTKIsUsingGlobalMenu() ) return true; #endif // !__WXGTK__ @@ -67,6 +67,8 @@ bool wxFrameBase::ShouldUpdateMenuFromIdle() return wxUSE_IDLEMENUUPDATES != 0; } +#endif // wxUSE_MENUS + // ============================================================================ // implementation // ============================================================================ @@ -128,7 +130,7 @@ wxEND_FLAGS( wxFrameStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxFrame, wxTopLevelWindow, "wx/frame.h") wxBEGIN_PROPERTIES_TABLE(wxFrame) -wxEVENT_PROPERTY( Menu, wxEVT_COMMAND_MENU_SELECTED, wxCommandEvent) +wxEVENT_PROPERTY( Menu, wxEVT_MENU, wxCommandEvent) wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxString(), 0 /*flags*/, \ wxT("Helpstring"), wxT("group")) @@ -559,7 +561,7 @@ wxToolBar* wxFrameBase::CreateToolBar(long style, // a) this allows us to have different defaults for different // platforms (even if we don't have them right now) // b) we don't need to include wx/toolbar.h in the header then - style = wxBORDER_NONE | wxTB_HORIZONTAL | wxTB_FLAT; + style = wxTB_DEFAULT_STYLE; } SetToolBar(OnCreateToolBar(style, id, name));