bool CFileZillaApp::OnInit() { AddStartupProfileRecord(_T("CFileZillaApp::OnInit()")); fz::set_translators(translator, translator_pf); #ifdef __WXMSW__ if (!InitWinsock()) { return false; } SetAppId(); #endif //wxSystemOptions is slow, if a value is not set, it keeps querying the environment //each and every time... wxSystemOptions::SetOption(_T("filesys.no-mimetypesmanager"), 0); wxSystemOptions::SetOption(_T("window-default-variant"), _T("")); #ifdef __WXMSW__ wxSystemOptions::SetOption(_T("no-maskblt"), 0); wxSystemOptions::SetOption(_T("msw.window.no-clip-children"), 0); wxSystemOptions::SetOption(_T("msw.font.no-proof-quality"), 0); wxSystemOptions::SetOption(_T("msw.remap"), 0); wxSystemOptions::SetOption(_T("msw.staticbox.optimized-paint"), 0); #endif #ifdef __WXMAC__ wxSystemOptions::SetOption(_T("mac.listctrl.always_use_generic"), 1); wxSystemOptions::SetOption(_T("mac.textcontrol-use-spell-checker"), 0); #endif int cmdline_result = ProcessCommandLine(); if (!cmdline_result) return false; LoadLocales(); if (cmdline_result < 0) { if (m_pCommandLine) { m_pCommandLine->DisplayUsage(); } return false; } InitDefaultsDir(); COptions::Init(); InitLocale(); #ifndef _DEBUG const wxString& buildType = CBuildInfo::GetBuildType(); if (buildType == _T("nightly")) { wxMessageBoxEx(_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\ Unless explicitly instructed otherwise,\r\n\ DO NOT post bugreports,\r\n\ DO NOT use it in production environments,\r\n\ DO NOT distribute the binaries,\r\n\ DO NOT complain about it\r\n\ USE AT OWN RISK"), _T("Important Information")); }
CFileZillaApp::CFileZillaApp() { m_profile_start = fz::monotonic_clock::now(); AddStartupProfileRecord(_T("CFileZillaApp::CFileZillaApp()")); }
CFileZillaApp::CFileZillaApp() { m_profilingActive = true; AddStartupProfileRecord(_T("CFileZillaApp::CFileZillaApp()")); }