// the suffix we add to the button to show that the dialog can be expanded
#define EXPAND_SUFFIX _T(" >>")
// the suffix we add to the button to show that the dialog can be expanded
#define EXPAND_SUFFIX _T(" >>")
// happens to pop up a Log message while translating this :-)
ms_details = wxTRANSLATE("&Details");
ms_details = wxGetTranslation(ms_details);
// happens to pop up a Log message while translating this :-)
ms_details = wxTRANSLATE("&Details");
ms_details = wxGetTranslation(ms_details);
// create the controls which are always shown and layout them: we use
// sizers even though our window is not resizeable to calculate the size of
// the dialog properly
wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
// create the controls which are always shown and layout them: we use
// sizers even though our window is not resizeable to calculate the size of
// the dialog properly
wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
- wxBoxSizer *sizerButtons = new wxBoxSizer(wxVERTICAL);
- wxBoxSizer *sizerAll = new wxBoxSizer(wxHORIZONTAL);
+#ifndef __SMARTPHONE__
+ wxBoxSizer *sizerButtons = new wxBoxSizer(isPda ? wxHORIZONTAL : wxVERTICAL);
+#endif
+ wxBoxSizer *sizerAll = new wxBoxSizer(isPda ? wxVERTICAL : wxHORIZONTAL);
- sizerButtons->Add(btnOk, 0, wxCENTRE | wxBOTTOM, MARGIN/2);
+ sizerButtons->Add(btnOk, 0, isPda ? wxCENTRE : wxCENTRE|wxBOTTOM, MARGIN/2);
- sizerButtons->Add(m_btnDetails, 0, wxCENTRE | wxTOP, MARGIN/2 - 1);
+ sizerButtons->Add(m_btnDetails, 0, isPda ? wxCENTRE|wxLEFT : wxCENTRE | wxTOP, MARGIN/2 - 1);
+#endif
- sizerAll->Add(new wxStaticBitmap(this, wxID_ANY, bitmap), 0,
+
+ if (!isPda)
+ sizerAll->Add(new wxStaticBitmap(this, wxID_ANY, bitmap), 0,
wxALIGN_CENTRE_VERTICAL);
const wxString& message = messages.Last();
sizerAll->Add(CreateTextSizer(message), 1,
wxALIGN_CENTRE_VERTICAL | wxLEFT | wxRIGHT, MARGIN);
wxALIGN_CENTRE_VERTICAL);
const wxString& message = messages.Last();
sizerAll->Add(CreateTextSizer(message), 1,
wxALIGN_CENTRE_VERTICAL | wxLEFT | wxRIGHT, MARGIN);
- sizerAll->Add(sizerButtons, 0, wxALIGN_RIGHT | wxLEFT, MARGIN);
+#ifndef __SMARTPHONE__
+ sizerAll->Add(sizerButtons, 0, isPda ? wxCENTRE|wxTOP|wxBOTTOM : (wxALIGN_RIGHT | wxLEFT), MARGIN);
+#endif
sizerTop->Add(sizerAll, 0, wxALL | wxEXPAND, MARGIN);
sizerTop->Add(sizerAll, 0, wxALL | wxEXPAND, MARGIN);
m_maxHeight = size.y;
SetSizeHints(size.x, size.y, m_maxWidth, m_maxHeight);
m_maxHeight = size.y;
SetSizeHints(size.x, size.y, m_maxWidth, m_maxHeight);
// create the save button and separator line if possible
#if wxUSE_FILE
m_btnSave = new wxButton(this, wxID_SAVE);
// create the save button and separator line if possible
#if wxUSE_FILE
m_btnSave = new wxButton(this, wxID_SAVE);
// create the list ctrl now
m_listctrl = new wxListCtrl(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
// create the list ctrl now
m_listctrl = new wxListCtrl(this, wxID_ANY,
wxDefaultPosition, wxDefaultSize,
// no need to translate these strings as they're not shown to the
// user anyhow (we use wxLC_NO_HEADER style)
// no need to translate these strings as they're not shown to the
// user anyhow (we use wxLC_NO_HEADER style)
-#if wxUSE_STATLINE
- sizer->Add(m_statline, 0, wxEXPAND | (wxALL & ~wxTOP), MARGIN);
+#if wxUSE_STATLINE && !defined(__SMARTPHONE__)
+ bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
+ if (!isPda)
+ sizer->Add(m_statline, 0, wxEXPAND | (wxALL & ~wxTOP), MARGIN);
#endif // wxUSE_STATLINE
sizer->Add(m_listctrl, 1, wxEXPAND | (wxALL & ~wxTOP), MARGIN);
#endif // wxUSE_STATLINE
sizer->Add(m_listctrl, 1, wxEXPAND | (wxALL & ~wxTOP), MARGIN);
sizer->Add(m_btnSave, 0, wxALIGN_RIGHT | (wxALL & ~wxTOP), MARGIN);
#endif // wxUSE_FILE
}
sizer->Add(m_btnSave, 0, wxALIGN_RIGHT | (wxALL & ~wxTOP), MARGIN);
#endif // wxUSE_FILE
}
SetSizeHints(size.x, size.y, m_maxWidth, m_maxHeight);
SetSizeHints(size.x, size.y, m_maxWidth, m_maxHeight);
// don't change the width when expanding/collapsing
SetSize(wxDefaultCoord, size.y);
// don't change the width when expanding/collapsing
SetSize(wxDefaultCoord, size.y);