From: Stefan Csomor Date: Sat, 6 Sep 2008 16:33:18 +0000 (+0000) Subject: several small fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/36eca861601eb5329d7b87bc6e93cc31c49584f9?ds=sidebyside;hp=e630b0f0249c80d96c59c6f05bf1cfb24da4885e several small fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index c2bf64488a..fcd8f90466 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -451,10 +451,12 @@ void wxFontRefData::MacFindFont() CTFontRef font2 = CTFontCreateCopyWithSymbolicTraits( font, m_pointSize, NULL, traits, 0x03 ); CFRelease(font); m_ctFont.reset( font2 ); +#if 0 // debugging coretext font matching if ( (CTFontGetSymbolicTraits( m_ctFont ) & 0x03) != traits ) { wxMessageBox( wxString::Format( "expected %d but got %d traits" , traits, (CTFontGetSymbolicTraits( m_ctFont ) & 0x03) ) ); } +#endif } } #if wxOSX_USE_ATSU_TEXT diff --git a/src/osx/carbon/utils.cpp b/src/osx/carbon/utils.cpp index 7030447039..e1dd4bcf7d 100644 --- a/src/osx/carbon/utils.cpp +++ b/src/osx/carbon/utils.cpp @@ -62,7 +62,7 @@ void wxBell() else #endif #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - SysBeep(30); + AlertSoundPlay(); #else { } diff --git a/src/osx/cocoa/bmpbuttn.mm b/src/osx/cocoa/bmpbuttn.mm index a6aebc2ad0..3de4eafe5f 100644 --- a/src/osx/cocoa/bmpbuttn.mm +++ b/src/osx/cocoa/bmpbuttn.mm @@ -31,7 +31,7 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, long style, long extraStyle) { - NSView* sv = (wxpeer->GetParent()->GetHandle() ); + NSView* sv = static_cast(wxpeer->GetParent()->GetHandle() ); NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index c31e4e66c3..248075e4e5 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -56,6 +56,8 @@ void wxMacWakeUp() #endif // wxUSE_BASE +#if wxUSE_GUI + bool wxApp::DoInitGui() { [NSApplication sharedApplication]; @@ -67,8 +69,6 @@ void wxApp::DoCleanUp() { } -#if wxUSE_GUI - void wxClientDisplayRect(int *x, int *y, int *width, int *height) { NSRect displayRect = [[NSScreen mainScreen] visibleFrame];