~ubuntu-branches/ubuntu/saucy/filezilla/saucy-proposed

« back to all changes in this revision

Viewing changes to src/interface/FileZilla.cpp

  • Committer: Package Import Robot
  • Author(s): Adrien Cunin
  • Date: 2012-12-07 17:17:17 UTC
  • mfrom: (1.1.31)
  • Revision ID: package-import@ubuntu.com-20121207171717-nt6as62u4pa1uv11
Tags: 3.6.0.2-1ubuntu1
* Merge from Debian experimental. Remaining Ubuntu change:
   - Added debian/patches/11_use-decimal-si-by-default.patch in order to
     comply with UnitsPolicy

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
        return true;
148
148
}
149
149
 
150
 
extern "C" 
 
150
extern "C"
151
151
{
152
152
        typedef HRESULT (WINAPI *t_SetCurrentProcessExplicitAppUserModelID)(PCWSTR AppID);
153
153
}
274
274
#ifndef _DEBUG
275
275
        const wxString& buildType = CBuildInfo::GetBuildType();
276
276
        if (buildType == _T("nightly"))
277
 
        wxMessageBox(_T("You are using a nightly development version of FileZilla 3, do not expect anything to work.\r\nPlease use the official releases instead.\r\n\r\n\
 
277
                wxMessageBox(_T("You are using a nightly development version of FileZilla 3, do not expect anything to work.\r\nPlease use the official releases instead.\r\n\r\n\
278
278
Unless explicitly instructed otherwise,\r\n\
279
279
DO NOT post bugreports,\r\n\
280
280
DO NOT use it in production environments,\r\n\
444
444
 
445
445
        // For each path, check for the resources
446
446
        wxPathList::const_iterator node;
447
 
        for (node = pathList.begin(); node != pathList.end(); node++)
 
447
        for (node = pathList.begin(); node != pathList.end(); ++node)
448
448
        {
449
449
                wxString cur = *node;
450
450
                if (FileExists(cur + fileToFind))
455
455
                        return cur + _T("/filezilla");
456
456
        }
457
457
 
458
 
        for (node = pathList.begin(); node != pathList.end(); node++)
 
458
        for (node = pathList.begin(); node != pathList.end(); ++node)
459
459
        {
460
460
                wxString cur = *node;
461
461
                if (FileExists(cur + _T("/..") + fileToFind))
464
464
                        return cur + _T("/../share/filezilla");
465
465
        }
466
466
 
467
 
        for (node = pathList.begin(); node != pathList.end(); node++)
 
467
        for (node = pathList.begin(); node != pathList.end(); ++node)
468
468
        {
469
469
                wxString cur = *node;
470
470
                if (FileExists(cur + _T("/../../") + fileToFind))
847
847
 
848
848
        return res;
849
849
}
 
850
 
 
851
#if USE_CHUNKED_PROCESS_PENDING_EVENTS
 
852
void CFileZillaApp::ProcessPendingEvents()
 
853
{
 
854
        // Code copied from wxAppConsole::ProcessPendingEvents, adapted to
 
855
        // process only 100 events in one go.
 
856
#if wxUSE_THREADS
 
857
        if ( !wxPendingEventsLocker )
 
858
                return;
 
859
#endif
 
860
 
 
861
        // ensure that we're the only thread to modify the pending events list
 
862
        wxENTER_CRIT_SECT( *wxPendingEventsLocker );
 
863
 
 
864
        if ( !wxPendingEvents )
 
865
        {
 
866
                wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
 
867
                return;
 
868
        }
 
869
 
 
870
        // iterate until the list becomes empty or 100 events have been
 
871
        // processed, whichever comes first
 
872
        wxList::compatibility_iterator node = wxPendingEvents->GetFirst();
 
873
        int idleCounter = 100;
 
874
        while (node)
 
875
        {
 
876
                wxEvtHandler *handler = (wxEvtHandler *)node->GetData();
 
877
                wxPendingEvents->Erase(node);
 
878
 
 
879
                // In ProcessPendingEvents(), new handlers might be add
 
880
                // and we can safely leave the critical section here.
 
881
                wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
 
882
 
 
883
                handler->ProcessPendingEvents();
 
884
 
 
885
                wxENTER_CRIT_SECT( *wxPendingEventsLocker );
 
886
 
 
887
                node = --idleCounter ? wxPendingEvents->GetFirst() : 0;
 
888
        }
 
889
 
 
890
        wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
 
891
}
 
892
#endif
 
 
b'\\ No newline at end of file'