Changeset 3878cbc in git


Ignore:
Timestamp:
17/06/10 17:26:07 (9 years ago)
Author:
Olly Betts <olly@…>
Branches:
svn/1.0, svn/tags/1.0.40
Children:
e7c04bc
Parents:
e30c2a3
Message:

src/mainfrm.cc,src/wx.h: Fix to compile with wx2.8.

git-svn-id: file:///home/survex-svn/survex/branches/1.0@3448 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    re30c2a3 r3878cbc  
     1Thu Jun 17 16:25:40 GMT 2010  Olly Betts <olly@survex.com>
     2
     3        * src/mainfrm.cc,src/wx.h: Fix to compile with wx2.8.
     4
    15Thu Jun 17 15:44:48 GMT 2010  Olly Betts <olly@survex.com>
    26
  • src/mainfrm.cc

    re30c2a3 r3878cbc  
    55//
    66//  Copyright (C) 2000-2002 Mark R. Shinwell
    7 //  Copyright (C) 2001-2003,2004,2005 Olly Betts
     7//  Copyright (C) 2001-2003,2004,2005,2010 Olly Betts
    88//  Copyright (C) 2004 Philip Underwood
    99//
     
    2020//  You should have received a copy of the GNU General Public License
    2121//  along with this program; if not, write to the Free Software
    22 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     22//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2323//
    2424
     
    463463    find_button = new wxButton(find_panel, button_FIND, msg(/*Find*/332));
    464464    find_button->SetDefault();
     465    // SetDefaultItem() was moved from wxPanel to wxTopLevelWindow in wx2.8.
     466    // No idea how to work around that, but it doesn't seem to be needed with
     467    // wx2.8 (at least with wxGTK - perhaps the SetDefault() call above does
     468    // the trick.  Seems safest to still call this for older version in case
     469    // they need it.
     470#if !wxCHECK_VERSION(2,8,0)
    465471    find_panel->SetDefaultItem(find_button);
     472#endif
    466473    hide_button = new wxButton(find_panel, button_HIDE, msg(/*Hide*/333));
    467474    m_RegexpCheckBox = new wxCheckBox(find_panel, -1,
     
    11181125                                      msg(/*All files*/208),
    11191126                                      wxFileSelectorDefaultWildcardStr),
    1120                      wxOPEN);
     1127                     wxFD_OPEN);
    11211128#endif
    11221129    if (dlg.ShowModal() == wxID_OK) {
     
    11441151                     wxString(baseleaf),
    11451152                     "DXF files|*.dxf|SVG files|*.svg|Sketch files|*.sk|EPS files|*.eps|Compass PLT for use with Carto|*.plt",
    1146                      wxSAVE|wxOVERWRITE_PROMPT);
     1153                     wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
    11471154    free(baseleaf);
    11481155    if (dlg.ShowModal() == wxID_OK) {
  • src/wx.h

    re30c2a3 r3878cbc  
    99#endif
    1010
     11// These were renamed in wx 2.7.
     12#if !wxCHECK_VERSION(2,7,0)
     13# define wxFD_OPEN wxOPEN
     14# define wxFD_OVERWRITE_PROMPT wxOVERWRITE_PROMPT
     15# define wxFD_SAVE wxSAVE
     16# define wxFD_FILE_MUST_EXIST wxFILE_MUST_EXIST
     17#endif
     18
    1119#include <wx/splitter.h>
    1220#include <wx/treectrl.h>
Note: See TracChangeset for help on using the changeset viewer.