aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthexai <58434170+thexai@users.noreply.github.com>2020-11-26 20:42:36 +0100
committerthexai <58434170+thexai@users.noreply.github.com>2020-11-27 12:49:48 +0100
commite04121df514d62a61f28e2a551c80a6fb53cacd1 (patch)
tree4029aa51d03eff6ff20d7a6b7650d24e3897d51c
parent327f8a4aefd1a374080d2094220744375d05aafe (diff)
Move HDR toggle message strings (toast notifications) to strings.po and add toast notifications for tone mapping method change too
-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 0b3a3d72f1..51f1a76394 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -17142,7 +17142,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;
}