#include <wtime.h>
#endif
-#include "wx/datetime.h"
+#include "wx/time.h"
// the suffix we add to the button to show that the dialog can be expanded
#define EXPAND_SUFFIX wxT(" >>")
// allows to exclude the usage of wxDateTime
static wxString TimeStamp(const wxString& format, time_t t)
{
-#if wxUSE_DATETIME
wxChar buf[4096];
struct tm tm;
if ( !wxStrftime(buf, WXSIZEOF(buf), format, wxLocaltime_r(&t, &tm)) )
wxFAIL_MSG(wxT("strftime() failed"));
}
return wxString(buf);
-#else // !wxUSE_DATETIME
- return wxEmptyString;
-#endif // wxUSE_DATETIME/!wxUSE_DATETIME
}
wxMenuBar *pMenuBar = new wxMenuBar;
wxMenu *pMenu = new wxMenu;
#if CAN_SAVE_FILES
- pMenu->Append(Menu_Save, _("&Save..."), _("Save log contents to file"));
+ pMenu->Append(Menu_Save, _("Save &As..."), _("Save log contents to file"));
#endif // CAN_SAVE_FILES
pMenu->Append(Menu_Clear, _("C&lear"), _("Clear the log contents"));
pMenu->AppendSeparator();
bool bShow,
bool bDoPass)
{
+ // Initialize it to NULL to ensure that we don't crash if any log messages
+ // are generated before the frame is fully created (while this doesn't
+ // happen normally, it might, in principle).
+ m_pLogFrame = NULL;
+
PassMessages(bDoPass);
m_pLogFrame = new wxLogFrame(pParent, this, szTitle);
bool isPda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
// 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
+ // sizers even though our window is not resizable to calculate the size of
// the dialog properly
wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *sizerAll = new wxBoxSizer(isPda ? wxVERTICAL : wxHORIZONTAL);
wxImageList *imageList = new wxImageList(ICON_SIZE, ICON_SIZE);
// order should be the same as in the switch below!
- static const wxChar* const icons[] =
+ static const char* const icons[] =
{
wxART_ERROR,
wxART_WARNING,
// This may very well fail if there are insufficient colours available.
// Degrade gracefully.
- if ( !bmp.Ok() )
+ if ( !bmp.IsOk() )
{
loadedIcons = false;