X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..d7c37bdf337d7ca687263520de432eee4a3722db:/samples/propgrid/sampleprops.cpp diff --git a/samples/propgrid/sampleprops.cpp b/samples/propgrid/sampleprops.cpp index d5e7c8189d..20778a9673 100644 --- a/samples/propgrid/sampleprops.cpp +++ b/samples/propgrid/sampleprops.cpp @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: 2006-03-05 -// RCS-ID: $Id$ // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -22,6 +21,8 @@ #include "wx/wx.h" #endif +#include "wx/fontdlg.h" + // ----------------------------------------------------------------------- @@ -46,8 +47,6 @@ bool operator == (const wxFontData&, const wxFontData&) // Custom version of wxFontProperty that also holds colour in the value. // Original version by Vladimir Vainer. -#include - IMPLEMENT_VARIANT_OBJECT_SHALLOWCMP(wxFontData) WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFontDataProperty,wxFontProperty, @@ -60,7 +59,7 @@ wxFontDataProperty::wxFontDataProperty( const wxString& label, const wxString& n // Fix value. fontData.SetChosenFont(value.GetInitialFont()); - if ( !fontData.GetColour().Ok() ) + if ( !fontData.GetColour().IsOk() ) fontData.SetColour(*wxBLACK); // Set initial value - should be done in a simpler way like this @@ -113,7 +112,7 @@ void wxFontDataProperty::OnSetValue() fontData << m_value_wxFontData; wxFont font = fontData.GetChosenFont(); - if ( !font.Ok() ) + if ( !font.IsOk() ) font = wxFont(10,wxSWISS,wxNORMAL,wxNORMAL); m_value = WXVARIANT(font); @@ -618,7 +617,7 @@ bool wxArrayDoubleProperty::StringToValue( wxVariant& variant, const wxString& t WX_PG_TOKENIZER1_BEGIN(text,delimiter) - if ( token.length() ) + if ( !token.empty() ) { // If token was invalid, exit the loop now