Menu

Small patch for svn rev 158 (unicode)

Help
2007-05-25
2013-05-22
  • Bjoern Pfeiffer

    Bjoern Pfeiffer - 2007-05-25

    Hi,
    here is a small patch for wxpropgrid to make it compile with wx-2.8 in unicode.

    [START PATCH]
    Index: src/propgrid.cpp
    ===================================================================
    --- src/propgrid.cpp    (revision 158)
    +++ src/propgrid.cpp    (working copy)
    @@ -960,7 +960,7 @@

    wxVariant wxPGProperty::GetDefaultValue() const
    {
    -    wxVariant defVal = GetAttribute("DefaultValue");
    +    wxVariant defVal = GetAttribute(_T("DefaultValue"));
         if ( !defVal.IsNull() )
             return defVal;

    @@ -3602,7 +3602,7 @@
    {
         wxASSERT( p != NULL );
         wxLogError( _("Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT \"%s\"."),
    -        op,p->GetLabel().c_str(),wxPG_TO_WXCHAR_PTR(p->GetValue().GetType()),typestr );
    +        op,p->GetLabel().c_str(),wxPG_TO_WXCHAR_PTR(p->GetValue().GetType()).c_str(),typestr );
    }

    // -----------------------------------------------------------------------
    [END PATCH]

    First fix won't compile in unicode, second my compiler warns that this call will abort at runtime ("compound type wxString can not be passed through varags ("...")).

    Greets,
    Björn Pfeiffer

    mingw with gcc-4.2
    wx-2.8 (CVS stable branch)
    Win XP

     
    • Jaakko Salli

      Jaakko Salli - 2007-05-25

      Applied now.

      Thanks,
      Jaakko

       

Log in to post a comment.