]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/advprops.cpp
missing header fixed
[wxWidgets.git] / src / propgrid / advprops.cpp
index c151dcb6cd887b86d77434f03845b2c6cae213be..52609a0bf3315f961bcd13b72860bc96e2c9862f 100644 (file)
@@ -619,13 +619,12 @@ wxFontProperty::wxFontProperty( const wxString& label, const wxString& name,
     wxFont font;
     font << m_value;
 
     wxFont font;
     font << m_value;
 
-    SetParentalType(wxPG_PROP_AGGREGATE);
+    AddPrivateChild( new wxIntProperty( _("Point Size"),
+                     wxS("Point Size"),(long)font.GetPointSize() ) );
 
 
-    AddChild( new wxIntProperty( _("Point Size"), wxS("Point Size"),(long)font.GetPointSize() ) );
-
-    AddChild( new wxEnumProperty(_("Family"), wxS("PointSize"),
-              gs_fp_es_family_labels,gs_fp_es_family_values,
-              font.GetFamily()) );
+    AddPrivateChild( new wxEnumProperty(_("Family"), wxS("PointSize"),
+                     gs_fp_es_family_labels,gs_fp_es_family_values,
+                     font.GetFamily()) );
 
     wxString faceName = font.GetFaceName();
     // If font was not in there, add it now
 
     wxString faceName = font.GetFaceName();
     // If font was not in there, add it now
@@ -638,16 +637,18 @@ wxFontProperty::wxFontProperty( const wxString& label, const wxString& name,
 
     p->SetValueFromString(faceName, wxPG_FULL_VALUE);
 
 
     p->SetValueFromString(faceName, wxPG_FULL_VALUE);
 
-    AddChild( p );
+    AddPrivateChild( p );
 
 
-    AddChild( new wxEnumProperty(_("Style"), wxS("Style"),
-              gs_fp_es_style_labels,gs_fp_es_style_values,font.GetStyle()) );
+    AddPrivateChild( new wxEnumProperty(_("Style"), wxS("Style"),
+                     gs_fp_es_style_labels,gs_fp_es_style_values,
+                     font.GetStyle()) );
 
 
-    AddChild( new wxEnumProperty(_("Weight"), wxS("Weight"),
-              gs_fp_es_weight_labels,gs_fp_es_weight_values,font.GetWeight()) );
+    AddPrivateChild( new wxEnumProperty(_("Weight"), wxS("Weight"),
+                     gs_fp_es_weight_labels,gs_fp_es_weight_values,
+                     font.GetWeight()) );
 
 
-    AddChild( new wxBoolProperty(_("Underlined"), wxS("Underlined"),
-              font.GetUnderlined()) );
+    AddPrivateChild( new wxBoolProperty(_("Underlined"), wxS("Underlined"),
+                     font.GetUnderlined()) );
 }
 
 wxFontProperty::~wxFontProperty() { }
 }
 
 wxFontProperty::~wxFontProperty() { }
@@ -1423,8 +1424,6 @@ bool wxSystemColourProperty::DoSetAttribute( const wxString& name, wxVariant& va
     {
         int ival = wxPGVariantToInt(value);
 
     {
         int ival = wxPGVariantToInt(value);
 
-        SetChoicesExclusive(); // Make sure we don't corrupt colour lists of other properties
-
         if ( ival && (m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
         {
             // Show custom choice
         if ( ival && (m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
         {
             // Show custom choice
@@ -2095,7 +2094,9 @@ bool wxDateProperty::StringToValue( wxVariant& variant, const wxString& text,
 {
     wxDateTime dt;
 
 {
     wxDateTime dt;
 
-    const char* c = dt.ParseFormat(text, wxString(wxDefaultDateTimeFormat), wxDefaultDateTime, NULL);
+    // FIXME: do we really want to return true from here if only part of the
+    //        string was parsed?
+    const char* c = dt.ParseFormat(text);
 
     if ( c )
     {
 
     if ( c )
     {