diff options
-rw-r--r-- | cui/source/dialogs/about.cxx | 11 | ||||
-rw-r--r-- | include/vcl/svapp.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 24 |
3 files changed, 23 insertions, 14 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 53f05d52b2e1..efeef5a9c002 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -250,16 +250,17 @@ OUString AboutDialog::GetCopyrightString() { return aCopyrightString; } +//special labels to comply with previous version info IMPL_LINK_NOARG(AboutDialog, HandleClick, weld::Button &, void) { css::uno::Reference<css::datatransfer::clipboard::XClipboard> xClipboard = css::datatransfer::clipboard::SystemClipboard::create( comphelper::getProcessComponentContext()); - OUString sInfo = "Version: " + m_pVersionLabel->get_label() // version - + "\nBuild ID: " + GetBuildString() // build id - + "\n" + m_pEnvLabel->get_label() + "; " + m_pUILabel->get_label() // env+UI - + "\nLocale: " + m_pLocaleLabel->get_label() // locale - + "\n" + m_pMiscLabel->get_label(); // misc + OUString sInfo = "Version: " + m_pVersionLabel->get_label() + "\n" // version + "Build ID: " + GetBuildString() + "\n" + // build id + Application::GetHWOSConfInfo(0,false) + "\n" // env+UI + "Locale: " + m_pLocaleLabel->get_label() + "\n" + // locale + m_pMiscLabel->get_label(); // misc vcl::unohelper::TextDataObject::CopyStringTo(sInfo, xClipboard); } diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 48177cf90535..422f8e23fb50 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -900,7 +900,7 @@ public: * bSelection = 0 to return all info, 1 for environment only, * and 2 for VCL/render related infos */ - static OUString GetHWOSConfInfo(const int bSelection = 0); + static OUString GetHWOSConfInfo(const int bSelection = 0, bool bLocalize = true); /** Load a localized branding PNG file as a bitmap. diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 12a21ee04fac..60bc22d12c6a 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1135,7 +1135,15 @@ OUString Application::GetAppName() enum {hwAll=0, hwEnv=1, hwUI=2}; -OUString Application::GetHWOSConfInfo(const int bSelection) +static OUString Localize(const char *pId, const bool bLocalize) +{ + if (bLocalize) + return VclResId(pId); + else + return Translate::get(pId, Translate::Create("vcl", LanguageTag("en-US"))); +} + +OUString Application::GetHWOSConfInfo(const int bSelection, const bool bLocalize) { ImplSVData* pSVData = ImplGetSVData(); OUStringBuffer aDetails; @@ -1147,7 +1155,7 @@ OUString Application::GetHWOSConfInfo(const int bSelection) }; if (bSelection != hwUI) { - appendDetails("; ", VclResId(SV_APP_CPUTHREADS) + appendDetails("; ", Localize(SV_APP_CPUTHREADS, bLocalize) + OUString::number(std::thread::hardware_concurrency())); OUString aVersion; @@ -1156,21 +1164,21 @@ OUString Application::GetHWOSConfInfo(const int bSelection) else aVersion = "-"; - appendDetails("; ", VclResId(SV_APP_OSVERSION) + aVersion); + appendDetails("; ", Localize(SV_APP_OSVERSION, bLocalize) + aVersion); } if (bSelection != hwEnv) { - appendDetails("; ", VclResId(SV_APP_UIRENDER)); + appendDetails("; ", Localize(SV_APP_UIRENDER, bLocalize)); #if HAVE_FEATURE_SKIA if ( SkiaHelper::isVCLSkiaEnabled() ) { switch(SkiaHelper::renderMethodToUse()) { case SkiaHelper::RenderVulkan: - appendDetails("", VclResId(SV_APP_SKIA_VULKAN)); + appendDetails("", Localize(SV_APP_SKIA_VULKAN, bLocalize)); break; case SkiaHelper::RenderRaster: - appendDetails("", VclResId(SV_APP_SKIA_RASTER)); + appendDetails("", Localize(SV_APP_SKIA_RASTER, bLocalize)); break; } } @@ -1178,10 +1186,10 @@ OUString Application::GetHWOSConfInfo(const int bSelection) #endif #if HAVE_FEATURE_OPENGL if ( OpenGLWrapper::isVCLOpenGLEnabled() ) - appendDetails("", VclResId(SV_APP_GL)); + appendDetails("", Localize(SV_APP_GL, bLocalize)); else #endif - appendDetails("", VclResId(SV_APP_DEFAULT)); + appendDetails("", Localize(SV_APP_DEFAULT, bLocalize)); #if (defined LINUX || defined _WIN32 || defined MACOSX) appendDetails("; ", SV_APP_VCLBACKEND + GetToolkitName()); |