// resources
// --------------------------------------------------------------------------
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
+#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
// application icon
#include "mondrian.xpm"
SetIcon(wxICON(mondrian));
// menu bar
- wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF);
- wxMenu *menuView = new wxMenu("", wxMENU_TEAROFF);
- wxMenu *menuGame = new wxMenu("", wxMENU_TEAROFF);
+ wxMenu *menuFile = new wxMenu(_T(""), wxMENU_TEAROFF);
+ wxMenu *menuView = new wxMenu(_T(""), wxMENU_TEAROFF);
+ wxMenu *menuGame = new wxMenu(_T(""), wxMENU_TEAROFF);
menuFile->Append(ID_NEW, _("&New"), _("Start a new game"));
menuFile->Append(ID_OPEN, _("&Open..."), _("Open an existing Life pattern"));
if (filedlg.ShowModal() == wxID_OK)
{
- wxFileInputStream stream(filedlg.GetFilename());
+ wxFileInputStream stream(filedlg.GetPath());
LifeReader reader(stream);
// the reader handles errors itself, no need to do anything here
bmpe = wxBITMAP(east),
bmps = wxBITMAP(south);
-#if !defined(__WXGTK__) && !defined(__WXMOTIF__)
+#if !defined(__WXGTK__) && !defined(__WXMOTIF__) && !defined(__WXMAC__)
bmpn.SetMask(new wxMask(bmpn, *wxLIGHT_GREY));
bmpw.SetMask(new wxMask(bmpw, *wxLIGHT_GREY));
bmpc.SetMask(new wxMask(bmpc, *wxLIGHT_GREY));
sizer1->Add( sizer2 );
sizer1->Add( bs, 0, wxCENTRE | wxSOUTH, 4 );
- // set the miniframe size
+ // set the panel and miniframe size
panel->SetSizer(sizer1);
panel->SetAutoLayout(TRUE);
- sizer1->Fit(this);
- sizer1->SetSizeHints(this);
+
+ sizer1->Fit(panel);
+ SetClientSize(panel->GetSize());
+ wxSize sz = GetSize();
+ SetSizeHints(sz.x, sz.y, sz.x, sz.y);
// move it to a sensible position
wxRect parentRect = parent->GetRect();