]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/fontdlg.cpp
added wx prefix to wxUSE_NATIVE_SEARCH_CONTROL
[wxWidgets.git] / src / mac / carbon / fontdlg.cpp
index 737176163dbe64b94c221da85ac7a7082f55f544..67b93fb6cb27182e46411518ddcf275cf329a12b 100644 (file)
@@ -20,6 +20,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_FONTDLG
+
 #ifdef __BORLANDC__
     #pragma hdrstop
 #endif
@@ -115,9 +117,9 @@ pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, Eve
                 {
                     fontdata.m_chosenFont.SetFaceName(wxMacCFStringHolder(cfName).AsString(wxLocale::GetSystemEncoding()));
                     fontdata.m_chosenFont.SetPointSize(fontSize);
-                    fontdata.m_chosenFont.SetStyle(fontStyle & italic ? wxFONTSTYLE_ITALIC : 0);
-                    fontdata.m_chosenFont.SetUnderlined(fontStyle & underline ? wxFONTSTYLE_ITALIC : 0);
-                    fontdata.m_chosenFont.SetWeight(fontStyle & bold ? wxBOLD : wxNORMAL);
+                    fontdata.m_chosenFont.SetStyle(fontStyle & italic ? wxFONTSTYLE_ITALIC : wxFONTSTYLE_NORMAL);
+                    fontdata.m_chosenFont.SetUnderlined((fontStyle & underline)!=0);
+                    fontdata.m_chosenFont.SetWeight(fontStyle & bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL);
                 }
             }
 
@@ -286,7 +288,7 @@ class wxFontColourSwatchCtrl: public wxControl
     DECLARE_CLASS(wxFontColourSwatchCtrl)
 public:
     wxFontColourSwatchCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
-    ~wxFontColourSwatchCtrl();
+    virtual ~wxFontColourSwatchCtrl();
 
     void OnPaint(wxPaintEvent& event);
     void OnMouseEvent(wxMouseEvent& event);
@@ -535,18 +537,18 @@ void wxFontDialog::CreateControls()
 
     wxFontEnumerator enumerator;
     enumerator.EnumerateFacenames();
-    wxArrayString* facenames = enumerator.GetFacenames();
+    wxArrayString facenames = enumerator.GetFacenames();
     if (facenames)
     {
-        facenames->Add(_("<Any>"));
-        facenames->Add(_("<Any Roman>"));
-        facenames->Add(_("<Any Decorative>"));
-        facenames->Add(_("<Any Modern>"));
-        facenames->Add(_("<Any Script>"));
-        facenames->Add(_("<Any Swiss>"));
-        facenames->Add(_("<Any Teletype>"));
-        facenames->Sort();
-        m_facenameCtrl->Append(*facenames);
+        facenames.Add(_("<Any>"));
+        facenames.Add(_("<Any Roman>"));
+        facenames.Add(_("<Any Decorative>"));
+        facenames.Add(_("<Any Modern>"));
+        facenames.Add(_("<Any Script>"));
+        facenames.Add(_("<Any Swiss>"));
+        facenames.Add(_("<Any Teletype>"));
+        facenames.Sort();
+        m_facenameCtrl->Append(facenames);
     }
 
     InitializeControls();
@@ -782,4 +784,6 @@ int FontFamilyStringToInt(const wxChar *family)
 
 #endif // !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
 
-#endif
+#endif // wxMAC_USE_EXPERIMENTAL_FONTDIALOG
+
+#endif // wxUSE_FONTDLG