long ret = 0;
if (item > 0) ret = item;
if(ret >= GetItemCount()) return -1;
- wxNode *node = m_lines.Nth( (size_t)ret );
+ wxNode *node = m_lines.Nth( (size_t)++ret );
while (node)
{
wxListLineData *line = (wxListLineData*)node->Data();
m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, style );
if (HasFlag(wxLC_REPORT))
+ {
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23), wxTAB_TRAVERSAL );
+ if (HasFlag(wxLC_NO_HEADER))
+ m_headerWin->Show( FALSE );
+ }
else
+ {
m_headerWin = (wxListHeaderWindow *) NULL;
+ }
SetBackgroundColour( *wxWHITE );
const wxArrayLong& times,
const wxString& caption,
long style)
- : wxDialog(parent, -1, caption),
+ : wxDialog(parent, -1, caption ),
m_messages(messages), m_severity(severity), m_times(times)
{
m_showingDetails = FALSE; // not initially
// create it now
m_listctrl = new wxListCtrl(this, -1,
wxDefaultPosition, wxDefaultSize,
- wxLC_REPORT | wxLC_NO_HEADER);
+ wxLC_REPORT | wxLC_NO_HEADER );
m_listctrl->InsertColumn(0, _("Message"));
m_listctrl->InsertColumn(1, _("Time"));
m_showingDetails = !m_showingDetails;
// in any case, our size changed - update
+ sizer->SetSizeHints(this);
sizer->Fit(this);
}
#include "wx/font.h"
#include "wx/colour.h"
#include "wx/settings.h"
+#include "wx/log.h"
#endif
#include "wx/generic/panelg.h"
// thread so we must lock it here ourselves
gdk_threads_enter();
- /* sent idle event to all who request them */
- while (wxTheApp->ProcessIdle()) { }
-
/* we don't want any more idle events until the next event is
sent to wxGTK */
gtk_idle_remove( wxTheApp->m_idleTag );
emptied */
g_isIdle = TRUE;
+ /* sent idle event to all who request them */
+ while (wxTheApp->ProcessIdle()) { }
+
// release lock again
gdk_threads_leave();
void wxApp::OnIdle( wxIdleEvent &event )
{
static bool s_inOnIdle = FALSE;
-
+
/* Avoid recursion (via ProcessEvent default case) */
if (s_inOnIdle)
return;
-
+
s_inOnIdle = TRUE;
/* Resend in the main thread events which have been prepared in other
/* 'Garbage' collection of windows deleted with Close(). */
DeletePendingObjects();
- /* flush the logged messages if any */
-#if wxUSE_LOG
- wxLog *log = wxLog::GetActiveTarget();
- if (log != NULL && log->HasPendingMessages())
- log->Flush();
-#endif // wxUSE_LOG
-
/* Send OnIdle events to all windows */
bool needMore = SendIdleEvents();
event.RequestMore(TRUE);
s_inOnIdle = FALSE;
+
+ /* flush the logged messages if any */
+#if wxUSE_LOG
+ wxLog *log = wxLog::GetActiveTarget();
+ if (log != NULL && log->HasPendingMessages())
+ log->Flush();
+#endif // wxUSE_LOG
}
bool wxApp::SendIdleEvents()
// thread so we must lock it here ourselves
gdk_threads_enter();
- /* sent idle event to all who request them */
- while (wxTheApp->ProcessIdle()) { }
-
/* we don't want any more idle events until the next event is
sent to wxGTK */
gtk_idle_remove( wxTheApp->m_idleTag );
emptied */
g_isIdle = TRUE;
+ /* sent idle event to all who request them */
+ while (wxTheApp->ProcessIdle()) { }
+
// release lock again
gdk_threads_leave();
void wxApp::OnIdle( wxIdleEvent &event )
{
static bool s_inOnIdle = FALSE;
-
+
/* Avoid recursion (via ProcessEvent default case) */
if (s_inOnIdle)
return;
-
+
s_inOnIdle = TRUE;
/* Resend in the main thread events which have been prepared in other
/* 'Garbage' collection of windows deleted with Close(). */
DeletePendingObjects();
- /* flush the logged messages if any */
-#if wxUSE_LOG
- wxLog *log = wxLog::GetActiveTarget();
- if (log != NULL && log->HasPendingMessages())
- log->Flush();
-#endif // wxUSE_LOG
-
/* Send OnIdle events to all windows */
bool needMore = SendIdleEvents();
event.RequestMore(TRUE);
s_inOnIdle = FALSE;
+
+ /* flush the logged messages if any */
+#if wxUSE_LOG
+ wxLog *log = wxLog::GetActiveTarget();
+ if (log != NULL && log->HasPendingMessages())
+ log->Flush();
+#endif // wxUSE_LOG
}
bool wxApp::SendIdleEvents()