diff -r 85ba7f5d9236 -r fad3ef14c161 src/interface/FileZilla.cpp
a
|
b
|
|
475 | 475 | #endif //__WXMAC__ |
476 | 476 | } |
477 | 477 | |
| 478 | #if wxMAJOR_VERSION == 2 && wxMINOR_VERSION == 8 |
| 479 | void CFileZillaApp::ProcessPendingEvents() { |
| 480 | #if wxUSE_THREADS |
| 481 | if ( !wxPendingEventsLocker ) |
| 482 | return; |
| 483 | #endif |
| 484 | |
| 485 | // ensure that we're the only thread to modify the pending events list |
| 486 | wxENTER_CRIT_SECT( *wxPendingEventsLocker ); |
| 487 | |
| 488 | if ( !wxPendingEvents ) |
| 489 | { |
| 490 | wxLEAVE_CRIT_SECT( *wxPendingEventsLocker ); |
| 491 | return; |
| 492 | } |
| 493 | |
| 494 | // iterate until the list becomes empty |
| 495 | wxList::compatibility_iterator node = wxPendingEvents->GetFirst(); |
| 496 | idleCounter = 100; |
| 497 | while (node) |
| 498 | { |
| 499 | wxEvtHandler *handler = (wxEvtHandler *)node->GetData(); |
| 500 | wxPendingEvents->Erase(node); |
| 501 | |
| 502 | // In ProcessPendingEvents(), new handlers might be add |
| 503 | // and we can safely leave the critical section here. |
| 504 | wxLEAVE_CRIT_SECT( *wxPendingEventsLocker ); |
| 505 | |
| 506 | handler->ProcessPendingEvents(); |
| 507 | |
| 508 | wxENTER_CRIT_SECT( *wxPendingEventsLocker ); |
| 509 | |
| 510 | node = idleCounter-- > 0 ? wxPendingEvents->GetFirst() : 0; |
| 511 | } |
| 512 | |
| 513 | wxLEAVE_CRIT_SECT( *wxPendingEventsLocker ); |
| 514 | } |
| 515 | #endif |
| 516 | |
478 | 517 | bool CFileZillaApp::LoadResourceFiles() |
479 | 518 | { |
480 | 519 | m_resourceDir = GetDataDir(_T("/resources/menus.xrc")); |
diff -r 85ba7f5d9236 -r fad3ef14c161 src/interface/filezillaapp.h
a
|
b
|
|
32 | 32 | |
33 | 33 | const CCommandLine* GetCommandLine() const { return m_pCommandLine; } |
34 | 34 | |
| 35 | #if wxMAJOR_VERSION == 2 && wxMINOR_VERSION == 8 |
| 36 | virtual void ProcessPendingEvents(); |
| 37 | private: |
| 38 | char idleCounter; |
| 39 | public: |
| 40 | #endif |
| 41 | |
35 | 42 | protected: |
36 | 43 | bool InitDefaultsDir(); |
37 | 44 | bool LoadResourceFiles(); |