IMPLEMENT_CLASS(wxConnectionBase, wxObject)
wxConnectionBase::wxConnectionBase(wxChar *buffer, int size)
- : m_buffer(buffer), m_buffersize(size),
- m_deletebufferwhendone(false), m_connected(true)
+ : m_connected(true),
+ m_buffer(buffer),
+ m_buffersize(size),
+ m_deletebufferwhendone(false)
{
if ( buffer == (wxChar *)NULL )
{ // behave like next constructor
}
wxConnectionBase::wxConnectionBase()
- : m_buffersize(0), m_buffer(NULL), m_deletebufferwhendone(true),
- m_connected(true)
+ : m_connected(true),
+ m_buffer(NULL),
+ m_buffersize(0),
+ m_deletebufferwhendone(true)
{
}
wxConnectionBase::wxConnectionBase(wxConnectionBase& copy)
- : m_buffer(copy.m_buffer), m_buffersize(copy.m_buffersize),
- m_deletebufferwhendone(false), m_connected(copy.m_connected)
+ : m_connected(copy.m_connected),
+ m_buffer(copy.m_buffer),
+ m_buffersize(copy.m_buffersize),
+ m_deletebufferwhendone(false)
+
{
// copy constructor would require ref-counted pointer to buffer
wxFAIL_MSG( _T("Copy constructor of wxConnectionBase not implemented") );
// Update the display (especially on X, GTK)
wxYield();
- // FIXME: shouldn't be needed
-#ifdef __WXX11__
- wxYield();
-#endif
-
#ifdef __WXMAC__
MacUpdateImmediately();
#endif
m_msg->SetLabel(newmsg);
wxYield();
-
- // FIXME: shouldn't be needed
-#ifdef __WXX11__
- wxYield();
-#endif
}
if ( (m_elapsed || m_remaining || m_estimated) && (value != 0) )
wxYield();
- // FIXME: shouldn't be needed
-#ifdef __WXX11__
- wxYield();
-#endif
-
(void)ShowModal();
}
else // auto hide
{
// update the display
wxYield();
-
- // FIXME: shouldn't be needed
-#ifdef __WXX11__
- wxYield();
-#endif
}
#ifdef __WXMAC__
desc->shotTime = when;
desc->running = TRUE;
- wxLogTrace("timer", "queued timer %p at tick %i",
- desc->timer, when);
+ wxLogTrace("timer", "queued timer %p at tick %ld",
+ desc->timer, (long) when);
if ( m_timers )
{
if ( !timerDeleted )
{
- wxLogTrace("timer", "notified timer %p sheduled for %i",
- desc->timer, desc->shotTime);
+ wxLogTrace("timer", "notified timer %p sheduled for %ld",
+ desc->timer, (long) desc->shotTime);
desc->deleteFlag = NULL;
if ( !oneShot )
#endif
// not GTK 2.0
-
\ No newline at end of file
bool wxApp::Yield(bool onlyIfNeeded)
{
- bool s_inYield = FALSE;
-
- if ( s_inYield )
+ // Sometimes only 2 yields seem
+ // to do the trick, e.g. in the
+ // progress dialog
+ int i;
+ for (i = 0; i < 2; i++)
{
- if ( !onlyIfNeeded )
+ bool s_inYield = FALSE;
+
+ if ( s_inYield )
{
- wxFAIL_MSG( wxT("wxYield called recursively" ) );
- }
+ if ( !onlyIfNeeded )
+ {
+ wxFAIL_MSG( wxT("wxYield called recursively" ) );
+ }
- return FALSE;
- }
+ return FALSE;
+ }
- s_inYield = TRUE;
+ s_inYield = TRUE;
- // Make sure we have an event loop object,
- // or Pending/Dispatch will fail
- wxEventLoop* eventLoop = wxEventLoop::GetActive();
- wxEventLoop* newEventLoop = NULL;
- if (!eventLoop)
- {
- newEventLoop = new wxEventLoop;
- wxEventLoop::SetActive(newEventLoop);
- }
+ // Make sure we have an event loop object,
+ // or Pending/Dispatch will fail
+ wxEventLoop* eventLoop = wxEventLoop::GetActive();
+ wxEventLoop* newEventLoop = NULL;
+ if (!eventLoop)
+ {
+ newEventLoop = new wxEventLoop;
+ wxEventLoop::SetActive(newEventLoop);
+ }
- while (wxTheApp && wxTheApp->Pending())
- wxTheApp->Dispatch();
+ while (wxTheApp && wxTheApp->Pending())
+ wxTheApp->Dispatch();
#if wxUSE_TIMER
- wxTimer::NotifyTimers();
+ wxTimer::NotifyTimers();
#endif
- ProcessIdle();
+ ProcessIdle();
- if (newEventLoop)
- {
- wxEventLoop::SetActive(NULL);
- delete newEventLoop;
- }
+ if (newEventLoop)
+ {
+ wxEventLoop::SetActive(NULL);
+ delete newEventLoop;
+ }
- s_inYield = FALSE;
+ s_inYield = FALSE;
+ }
return TRUE;
}