aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenen92 <enen92@users.noreply.github.com>2020-11-29 11:06:28 +0000
committerGitHub <noreply@github.com>2020-11-29 11:06:28 +0000
commit4140dbe637be756705794eb2507f452893be332b (patch)
treef5b919013f96303d857020c0125a190b0b55f026
parent597b6060474e6b78f812240090daabf4f016f612 (diff)
parente04121df514d62a61f28e2a551c80a6fb53cacd1 (diff)
Merge pull request #18873 from thexai/toast
Move HDR toggle message strings (toast notifications) to strings.po
-rw-r--r--addons/resource.language.en_gb/resources/strings.po29
-rw-r--r--xbmc/Application.cpp26
2 files changed, 48 insertions, 7 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index d388170f82..27abb658ec 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -17144,7 +17144,34 @@ msgctxt "#34202"
msgid "Can't find a previous item to play"
msgstr ""
-#empty strings from id 34203 to 34299
+#empty strings from id 34203 to 34219
+
+#: xbmc/Application.cpp
+msgctxt "#34220"
+msgid "HDR is OFF"
+msgstr ""
+
+#: xbmc/Application.cpp
+msgctxt "#34221"
+msgid "Display HDR is Off"
+msgstr ""
+
+#: xbmc/Application.cpp
+msgctxt "#34222"
+msgid "HDR is ON"
+msgstr ""
+
+#: xbmc/Application.cpp
+msgctxt "#34223"
+msgid "Display HDR is On"
+msgstr ""
+
+#: xbmc/Application.cpp
+msgctxt "#34224"
+msgid "Tone map method is:"
+msgstr ""
+
+#empty strings from id 34225 to 34299
#: xbmc/network/windows/ZeroconfWIN.cpp
msgctxt "#34300"
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index ef73d7f38d..629bfb713f 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -1655,15 +1655,13 @@ bool CApplication::OnAction(const CAction &action)
if (hdrStatus == HDR_STATUS::HDR_OFF)
{
- CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::eMessageType::Info, "HDR is OFF",
- "Display HDR is Off", TOAST_DISPLAY_TIME, true,
- TOAST_DISPLAY_TIME);
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(34220),
+ g_localizeStrings.Get(34221));
}
else if (hdrStatus == HDR_STATUS::HDR_ON)
{
- CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::eMessageType::Info, "HDR is ON",
- "Display HDR is On", TOAST_DISPLAY_TIME, true,
- TOAST_DISPLAY_TIME);
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(34222),
+ g_localizeStrings.Get(34223));
}
return true;
}
@@ -1677,6 +1675,22 @@ bool CApplication::OnAction(const CAction &action)
if (vs.m_ToneMapMethod >= VS_TONEMAPMETHOD_MAX)
vs.m_ToneMapMethod = VS_TONEMAPMETHOD_OFF + 1;
m_appPlayer.SetVideoSettings(vs);
+
+ int code = 0;
+ switch (vs.m_ToneMapMethod)
+ {
+ case VS_TONEMAPMETHOD_REINHARD:
+ code = 36555;
+ break;
+ case VS_TONEMAPMETHOD_ACES:
+ code = 36557;
+ break;
+ case VS_TONEMAPMETHOD_HABLE:
+ code = 36558;
+ break;
+ }
+ CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(34224),
+ g_localizeStrings.Get(code), 1000, false, 500);
}
return true;
}