#endif // __WXMSW__
wxButton *btn = new wxButton(this, TextPage_Reset, _T("&Reset"));
- sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
+ sizerLeft->Add(2, 2, 0, wxGROW | wxALL, 1); // spacer
sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
// middle pane
wxSizer *sizerMiddleUp = new wxStaticBoxSizer(box2, wxVERTICAL);
btn = new wxButton(this, TextPage_Set, _T("&Set text value"));
- sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 5);
+ sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
btn = new wxButton(this, TextPage_Add, _T("&Append text"));
- sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 5);
+ sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
btn = new wxButton(this, TextPage_Insert, _T("&Insert text"));
- sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 5);
+ sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
btn = new wxButton(this, TextPage_Load, _T("&Load file"));
- sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 5);
+ sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
btn = new wxButton(this, TextPage_Clear, _T("&Clear"));
- sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 5);
+ sizerMiddleUp->Add(btn, 0, wxALL | wxGROW, 1);
wxStaticBox *box4 = new wxStaticBox(this, -1, _T("&Info:"));
wxSizer *sizerMiddleDown = new wxStaticBoxSizer(box4, wxVERTICAL);
m_sizerText = new wxStaticBoxSizer(box3, wxHORIZONTAL);
Reset();
CreateText();
- m_sizerText->SetMinSize(250, 0);
+ m_sizerText->SetMinSize(150, 0);
// the 3 panes panes compose the upper part of the window
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
{
valueOld = m_text->GetValue();
- m_sizerText->Remove(m_text);
+ m_sizerText->Detach( m_text );
delete m_text;
}
else
valueOld,
wxDefaultPosition, wxDefaultSize,
flags);
+
+ // cast to int needed to silence gcc warning about different enums
m_sizerText->Add(m_text, 1, wxALL |
- (flags & wxTE_MULTILINE ? wxGROW
+ (flags & wxTE_MULTILINE ? (int)wxGROW
: wxALIGN_TOP), 5);
m_sizerText->Layout();
}
if ( m_textLineLast )
{
m_textLineLast->SetValue(
- wxString::Format(_T("%ld"), m_text->GetNumberOfLines()));
+ wxString::Format(_T("%d"), m_text->GetNumberOfLines()) );
}
if ( m_textSelFrom && m_textSelTo )
else
{
long elapsed = sw.Time();
- wxLogMessage(_T("Loaded file '%s' in %u.%us"),
- filename.c_str(), elapsed / 1000, elapsed % 1000);
+ wxLogMessage(_T("Loaded file '%s' in %lu.%us"),
+ filename.c_str(), elapsed / 1000,
+ (unsigned int) elapsed % 1000);
}
}
}