]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/props.cpp
Corrected some wxMac images
[wxWidgets.git] / src / propgrid / props.cpp
index cb75c68e1f648f461c90457e1dfa0be0653bf8bb..2d2890df7302555907df26eacf21ff62dc033291 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     2005-05-14
-// RCS-ID:      $Id:
+// RCS-ID:      $Id$
 // Copyright:   (c) Jaakko Salli
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
@@ -49,9 +49,9 @@
     #include "wx/intl.h"
 #endif
 
-#include <wx/filename.h>
+#include "wx/filename.h"
 
-#include <wx/propgrid/propgrid.h>
+#include "wx/propgrid/propgrid.h"
 
 #define wxPG_CUSTOM_IMAGE_WIDTH     20 // for wxColourProperty etc.
 
@@ -747,10 +747,10 @@ const wxPGEditor* wxBoolProperty::DoGetEditorClass() const
     // Select correct editor control.
 #if wxPG_INCLUDE_CHECKBOX
     if ( !(m_flags & wxPG_PROP_USE_CHECKBOX) )
-        return wxPG_EDITOR(Choice);
-    return wxPG_EDITOR(CheckBox);
+        return wxPGEditor_Choice;
+    return wxPGEditor_CheckBox;
 #else
-    return wxPG_EDITOR(Choice);
+    return wxPGEditor_Choice;
 #endif
 }
 
@@ -1545,8 +1545,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxDirProperty, wxLongStringProperty)
 wxDirProperty::wxDirProperty( const wxString& name, const wxString& label, const wxString& value )
   : wxLongStringProperty(name,label,value)
 {
-    m_flags |= wxPG_NO_ESCAPE;
+    m_flags |= wxPG_PROP_NO_ESCAPE;
 }
+
 wxDirProperty::~wxDirProperty() { }
 
 wxValidator* wxDirProperty::DoGetValidator() const
@@ -1556,6 +1557,7 @@ wxValidator* wxDirProperty::DoGetValidator() const
 
 bool wxDirProperty::OnButtonClick( wxPropertyGrid* propGrid, wxString& value )
 {
+    // Update property value from editor, if necessary
     wxSize dlg_sz(300,400);
 
     wxDirDialog dlg( propGrid,
@@ -1883,9 +1885,9 @@ bool wxLongStringProperty::OnEvent( wxPropertyGrid* propGrid, wxWindow* WXUNUSED
     if ( propGrid->IsMainButtonEvent(event) )
     {
         // Update the value
-        PrepareValueForDialogEditing(propGrid);
+        wxVariant useValue = propGrid->GetUncommittedPropertyValue();
 
-        wxString val1 = GetValueAsString(0);
+        wxString val1 = useValue.GetString();
         wxString val_orig = val1;
 
         wxString value;
@@ -1997,7 +1999,7 @@ END_EVENT_TABLE()
 
 IMPLEMENT_ABSTRACT_CLASS(wxArrayEditorDialog, wxDialog)
 
-#include <wx/statline.h>
+#include "wx/statline.h"
 
 // -----------------------------------------------------------------------
 
@@ -2485,7 +2487,7 @@ bool wxArrayStringProperty::OnButtonClick( wxPropertyGrid* propGrid,
                                            const wxChar* cbt )
 {
     // Update the value
-    PrepareValueForDialogEditing(propGrid);
+    wxVariant useValue = propGrid->GetUncommittedPropertyValue();
 
     if ( !propGrid->EditorValidate() )
         return false;
@@ -2502,7 +2504,7 @@ bool wxArrayStringProperty::OnButtonClick( wxPropertyGrid* propGrid,
     if ( strEdDlg )
         strEdDlg->SetCustomButton(cbt, this);
 
-    dlg->SetDialogValue( wxVariant(m_value) );
+    dlg->SetDialogValue( useValue );
     dlg->Create(propGrid, wxEmptyString, m_label);
 
 #if !wxPG_SMALL_SCREEN