aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/resource.language.en_gb/resources/strings.po2
-rw-r--r--addons/skin.estuary/media/flags/rds/rds.pngbin0 -> 2937 bytes
-rw-r--r--addons/skin.estuary/xml/DialogPVRRadioRDSInfo.xml852
-rw-r--r--addons/skin.estuary/xml/DialogSeekBar.xml29
-rw-r--r--addons/skin.estuary/xml/Includes_PVR.xml23
-rw-r--r--addons/skin.estuary/xml/MusicOSD.xml27
-rw-r--r--addons/skin.estuary/xml/Variables.xml7
-rw-r--r--xbmc/cores/VideoPlayer/VideoPlayerRadioRDS.cpp2
-rw-r--r--xbmc/pvr/PVRGUIInfo.cpp92
-rw-r--r--xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.cpp340
-rw-r--r--xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.h8
11 files changed, 438 insertions, 944 deletions
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 1f862ceaa9..7318f41d89 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -16040,7 +16040,7 @@ msgstr ""
#. Help text of boolean on/off value
#: system/settings/settings.xml
msgctxt "#29983"
-msgid "RDS inform you about traffic advisory messages"
+msgid "RDS informs you about traffic advisory messages"
msgstr ""
#. Boolean value on settings
diff --git a/addons/skin.estuary/media/flags/rds/rds.png b/addons/skin.estuary/media/flags/rds/rds.png
new file mode 100644
index 0000000000..52c288a999
--- /dev/null
+++ b/addons/skin.estuary/media/flags/rds/rds.png
Binary files differ
diff --git a/addons/skin.estuary/xml/DialogPVRRadioRDSInfo.xml b/addons/skin.estuary/xml/DialogPVRRadioRDSInfo.xml
index 06ee2492f7..b446f857f3 100644
--- a/addons/skin.estuary/xml/DialogPVRRadioRDSInfo.xml
+++ b/addons/skin.estuary/xml/DialogPVRRadioRDSInfo.xml
@@ -1,655 +1,303 @@
<?xml version="1.0" encoding="UTF-8"?>
<window>
- <defaultcontrol always="true">10</defaultcontrol>
- <include>Animation_DialogPopupOpenClose</include>
+ <defaultcontrol always="true">9000</defaultcontrol>
+ <onunload>ClearProperty(infobackground,home)</onunload>
<controls>
<control type="group">
- <centerleft>50%</centerleft>
- <width>1300</width>
+ <animation effect="fade" start="0" end="100" time="100">WindowOpen</animation>
+ <animation effect="fade" start="100" end="0" time="100">WindowClose</animation>
+ <animation effect="fade" start="100" end="75" time="0" condition="true">Conditional</animation>
+ <include>ColoredBackgroundImages</include>
+ </control>
+ <control type="group">
<centertop>50%</centertop>
- <height>920</height>
- <include content="DialogBackgroundCommons">
- <param name="width" value="1300" />
- <param name="height" value="920" />
- <param name="header_label" value="" />
- <param name="header_id" value="2" />
- </include>
- <control type="group">
- <description>Normal song info group</description>
- <left>0</left>
- <top>70</top>
- <visible>String.IsEmpty(RDS.IsClassical)</visible>
- <control type="label">
- <left>10</left>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[557]:</label>
- <visible>String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="fadelabel">
- <left>160</left>
- <width>704</width>
- <height>25</height>
- <aligny>center</aligny>
- <label fallback="10005">$INFO[RDS.Artist]</label>
- <scrollout>false</scrollout>
- <pauseatend>2000</pauseatend>
- <visible>String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="label">
- <left>10</left>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29901]:</label>
- <visible>!String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="fadelabel">
- <left>160</left>
- <width>292</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.Band]</label>
- <scrollout>false</scrollout>
- <pauseatend>2000</pauseatend>
- <visible>!String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="label">
- <left>385</left>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[557]:</label>
- <visible>!String.IsEmpty(RDS.Artist) + !String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="fadelabel">
- <left>535</left>
- <width>328</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.Artist]</label>
- <visible>!String.IsEmpty(RDS.Artist) + !String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="label">
- <left>10</left>
- <top>35</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[556]:</label>
- </control>
- <control type="fadelabel">
- <left>160</left>
- <top>35</top>
- <width>704</width>
- <height>25</height>
- <aligny>center</aligny>
- <label fallback="10005">$INFO[RDS.Title]</label>
- <scrollout>false</scrollout>
- <pauseatend>2000</pauseatend>
- </control>
- <control type="label">
- <left>10</left>
- <top>70</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29902]:</label>
- <visible>!String.IsEmpty(RDS.ProgStyle)</visible>
- </control>
- <control type="fadelabel">
- <left>160</left>
- <top>70</top>
- <width>704</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.ProgStyle]</label>
- <visible>!String.IsEmpty(RDS.ProgStyle)</visible>
- </control>
- </control>
- <control type="group">
- <description>Classic concert music group</description>
- <left>0</left>
- <top>70</top>
- <visible>!String.IsEmpty(RDS.IsClassical)</visible>
- <control type="label">
- <left>10</left>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29903]:</label>
- </control>
- <control type="fadelabel">
- <left>160</left>
- <width>704</width>
- <height>25</height>
- <aligny>center</aligny>
- <label fallback="10005">$INFO[RDS.Composer]</label>
- <scrollout>false</scrollout>
- <pauseatend>2000</pauseatend>
- </control>
- <control type="label">
- <left>10</left>
- <top>35</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[556]:</label>
- </control>
- <control type="fadelabel">
- <left>160</left>
- <top>35</top>
- <width>704</width>
- <height>25</height>
- <aligny>center</aligny>
- <label fallback="10005">$INFO[RDS.Title]</label>
- <scrollout>false</scrollout>
- <pauseatend>2000</pauseatend>
- </control>
- <control type="label">
- <left>10</left>
- <top>70</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29904]:</label>
- <visible>String.IsEmpty(RDS.Band) + !String.IsEmpty(RDS.Artist)</visible>
- </control>
- <control type="textbox">
- <left>160</left>
- <top>66</top>
- <width>704</width>
- <height>29</height>
- <pagecontrol></pagecontrol>
- <label fallback="10005">$INFO[RDS.Artist]</label>
- <autoscroll time="2000" delay="3000" repeat="5000">true</autoscroll>
- <visible>String.IsEmpty(RDS.Band) + !String.IsEmpty(RDS.Artist)</visible>
- </control>
- <control type="label">
- <left>10</left>
- <top>70</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29901]:</label>
- <visible>!String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="fadelabel">
- <left>160</left>
- <top>70</top>
- <width>292</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.Band]</label>
- <scrollout>false</scrollout>
- <pauseatend>2000</pauseatend>
- <visible>!String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="label">
- <left>385</left>
- <top>70</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29904]:</label>
- <visible>!String.IsEmpty(RDS.Artist) + !String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="textbox">
- <left>535</left>
- <top>70</top>
- <width>328</width>
- <height>100</height>
- <pagecontrol></pagecontrol>
- <label>$INFO[RDS.Artist]</label>
- <autoscroll time="2000" delay="3000" repeat="5000">true</autoscroll>
- <visible>!String.IsEmpty(RDS.Artist) + !String.IsEmpty(RDS.Band)</visible>
- </control>
- <control type="label">
- <left>10</left>
- <top>105</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29905]:</label>
- <visible>!String.IsEmpty(RDS.Conductor)</visible>
- </control>
- <control type="fadelabel">
- <left>160</left>
- <top>105</top>
- <width>300</width>
- <height>25</height>
- <aligny>center</aligny>
- <label fallback="10005">$INFO[RDS.Conductor]</label>
- <scrollout>false</scrollout>
- <pauseatend>2000</pauseatend>
- <visible>!String.IsEmpty(RDS.Conductor)</visible>
- </control>
- <control type="label">
- <left>10</left>
- <top>105</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29902]:</label>
- <visible>String.IsEmpty(RDS.Conductor) + !String.IsEmpty(RDS.ProgStyle)</visible>
- </control>
- <control type="fadelabel">
- <left>160</left>
- <top>105</top>
- <width>704</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.ProgStyle]</label>
- <visible>String.IsEmpty(RDS.Conductor) + !String.IsEmpty(RDS.ProgStyle)</visible>
- </control>
- <control type="label">
- <left>385</left>
- <top>105</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29902]:</label>
- <visible>!String.IsEmpty(RDS.Conductor) + !String.IsEmpty(RDS.ProgStyle)</visible>
- </control>
- <control type="fadelabel">
- <left>535</left>
- <top>105</top>
- <width>328</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.ProgStyle]</label>
- <visible>!String.IsEmpty(RDS.Conductor) + !String.IsEmpty(RDS.ProgStyle)</visible>
- </control>
+ <height>1080</height>
+ <centerleft>50%</centerleft>
+ <width>1920</width>
+
+ <control type="image">
+ <left>120</left>
+ <top>160</top>
+ <width>840</width>
+ <height>405</height>
+ <texture border="21">dialogs/dialog-bg.png</texture>
</control>
<control type="label">
- <left>385</left>
- <top>175</top>
- <width>140</width>
+ <left>150</left>
+ <top>180</top>
+ <width>780</width>
<height>25</height>
- <align>right</align>
- <aligny>center</aligny>
<textcolor>button_focus</textcolor>
- <label>$LOCALIZE[558]:</label>
- <visible>!String.IsEmpty(RDS.Album)</visible>
+ <font>font36_title</font>
+ <label>$LOCALIZE[179]</label>
</control>
- <control type="fadelabel">
- <left>535</left>
- <top>175</top>
- <width>328</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.Album]</label>
- <scrollout>false</scrollout>
- <pauseatend>2000</pauseatend>
- <visible>!String.IsEmpty(RDS.Album)</visible>
- </control>
- <control type="label">
- <left>10</left>
- <top>210</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29906]:</label>
- <visible>!String.IsEmpty(RDS.ProgHost)</visible>
+ <control type="grouplist">
+ <left>150</left>
+ <top>230</top>
+ <width>780</width>
+ <height>315</height>
+ <orientation>vertical</orientation>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29901]"/>
+ <param name="value" value="RDS.Band" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[557]"/>
+ <param name="value" value="RDS.Artist" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[556]"/>
+ <param name="value" value="RDS.Title" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29903]"/>
+ <param name="value" value="RDS.Composer" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29905]"/>
+ <param name="value" value="RDS.Conductor" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[558]"/>
+ <param name="value" value="RDS.Album" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[569]"/>
+ <param name="value" value="RDS.Comment" />
+ </include>
</control>
- <control type="fadelabel">
- <left>160</left>
- <top>210</top>
- <width>235</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.ProgHost]</label>
- <visible>!String.IsEmpty(RDS.ProgHost)</visible>
+
+ <control type="image">
+ <left>120</left>
+ <top>575</top>
+ <width>840</width>
+ <height>225</height>
+ <texture border="21">dialogs/dialog-bg.png</texture>
</control>
<control type="label">
- <left>385</left>
- <top>210</top>
- <width>140</width>
+ <left>150</left>
+ <top>595</top>
+ <width>780</width>
<height>25</height>
- <align>right</align>
- <aligny>center</aligny>
<textcolor>button_focus</textcolor>
- <label>$LOCALIZE[569]:</label>
- <visible>!String.IsEmpty(RDS.Comment)</visible>
+ <font>font36_title</font>
+ <label>$LOCALIZE[29909]</label>
</control>
- <control type="fadelabel">
- <left>535</left>
- <top>210</top>
- <width>328</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.Comment]</label>
- <scrollout>false</scrollout>
- <pauseatend>2000</pauseatend>
- <visible>!String.IsEmpty(RDS.Comment)</visible>
+ <control type="grouplist">
+ <left>150</left>
+ <top>645</top>
+ <width>780</width>
+ <height>135</height>
+ <orientation>vertical</orientation>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29910]"/>
+ <param name="value" value="RDS.PhoneStudio" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29911]"/>
+ <param name="value" value="RDS.EmailStudio" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29912]"/>
+ <param name="value" value="RDS.SMSStudio" />
+ </include>
+ </control>
+
+ <control type="image">
+ <left>970</left>
+ <top>160</top>
+ <width>840</width>
+ <height>405</height>
+ <texture border="21">dialogs/dialog-bg.png</texture>
</control>
<control type="label">
- <left>10</left>
- <top>245</top>
- <width>140</width>
+ <left>1000</left>
+ <top>180</top>
+ <width>780</width>
<height>25</height>
- <align>right</align>
- <aligny>center</aligny>
<textcolor>button_focus</textcolor>
- <label>$LOCALIZE[19148]:</label>
+ <font>font36_title</font>
+ <label>$LOCALIZE[29908]</label>
</control>
- <control type="fadelabel">
- <left>160</left>
- <top>245</top>
- <width>235</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.ProgStation]</label>
+ <control type="grouplist">
+ <left>1000</left>
+ <top>230</top>
+ <width>780</width>
+ <height>315</height>
+ <orientation>vertical</orientation>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[19030]"/>
+ <param name="value" value="RDS.ProgNow" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[19031]"/>
+ <param name="value" value="RDS.ProgNext" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29902]"/>
+ <param name="value" value="RDS.ProgStyle" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[19148]"/>
+ <param name="value" value="RDS.ProgStation" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29906]"/>
+ <param name="value" value="RDS.ProgHost" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29907]"/>
+ <param name="value" value="RDS.ProgEditStaff" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29914]"/>
+ <param name="value" value="RDS.ProgHomepage" />
+ </include>
+ </control>
+
+ <control type="image">
+ <left>970</left>
+ <top>575</top>
+ <width>840</width>
+ <height>225</height>
+ <texture border="21">dialogs/dialog-bg.png</texture>
</control>
<control type="label">
- <left>385</left>
- <top>245</top>
- <width>140</width>
+ <left>1000</left>
+ <top>595</top>
+ <width>780</width>
<height>25</height>
- <align>right</align>
- <aligny>center</aligny>
<textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29907]:</label>
- <visible>!String.IsEmpty(RDS.ProgEditStaff)</visible>
- </control>
- <control type="fadelabel">
- <left>535</left>
- <top>245</top>
- <width>328</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.ProgEditStaff]</label>
- <visible>!String.IsEmpty(RDS.ProgEditStaff)</visible>
+ <font>font36_title</font>
+ <label>$LOCALIZE[29913]</label>
</control>
<control type="grouplist">
- <left>10</left>
- <top>280</top>
- <width>160</width>
- <height>300</height>
- <itemgap>8</itemgap>
- <control type="label">
- <description>Program basename</description>
- <left>10</left>
- <top>280</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29908]:</label>
- <visible>!String.IsEmpty(RDS.ProgNow) | !String.IsEmpty(RDS.ProgNext)</visible>
- </control>
- <control type="label">
- <description>Studio basename</description>
- <width>140</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29909]:</label>
- <visible>!String.IsEmpty(RDS.PhoneStudio) | !String.IsEmpty(RDS.EmailStudio) | !String.IsEmpty(RDS.SMSStudio)</visible>
- </control>
+ <left>1000</left>
+ <top>645</top>
+ <width>780</width>
+ <height>135</height>
+ <orientation>vertical</orientation>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29910]"/>
+ <param name="value" value="RDS.PhoneHotline" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="label" value="$LOCALIZE[29911]"/>
+ <param name="value" value="RDS.EmailHotline" />
+ </include>
</control>
- <control type="grouplist">
- <left>160</left>
- <top>280</top>
- <width>160</width>
- <height>300</height>
- <itemgap>8</itemgap>
- <control type="label">
- <width>160</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$LOCALIZE[19030]:</label>
- <visible>!String.IsEmpty(RDS.ProgNow)</visible>
- </control>
- <control type="label">
- <width>160</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$LOCALIZE[19031]:</label>
- <visible>!String.IsEmpty(RDS.ProgNext)</visible>
- </control>
- <control type="label">
- <width>95</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$LOCALIZE[29910]:</label>
- <visible>!String.IsEmpty(RDS.PhoneStudio)</visible>
- </control>
+
+ <control type="image">
+ <left>120</left>
+ <top>810</top>
+ <width>840</width>
+ <height>260</height>
+ <texture border="21">dialogs/dialog-bg.png</texture>
+ </control>
+ <control type="group">
+ <left>150</left>
+ <top>830</top>
<control type="label">
- <width>95</width>
+ <width>780</width>
<height>25</height>
- <aligny>center</aligny>
- <label>$LOCALIZE[29911]:</label>
- <visible>!String.IsEmpty(RDS.EmailStudio)</visible>
+ <textcolor>button_focus</textcolor>
+ <font>font36_title</font>
+ <label>$LOCALIZE[29915]</label>
</control>
- <control type="label">
- <width>95</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$LOCALIZE[29912]:</label>
- <visible>!String.IsEmpty(RDS.SMSStudio)</visible>
+ <control type="textbox">
+ <top>50</top>
+ <width>780</width>
+ <height>170</height>
+ <align>justify</align>
+ <label>$INFO[RDS.InfoNews,[COLOR button_focus]$LOCALIZE[29916]:[/COLOR] ,[CR]]$INFO[RDS.InfoNewsLocal,[COLOR button_focus]$LOCALIZE[29917]:[/COLOR] ,[CR]]$INFO[RDS.InfoStock,[COLOR button_focus]$LOCALIZE[29920]:[/COLOR] ,[CR]]$INFO[RDS.InfoSport,[COLOR button_focus]$LOCALIZE[29918]:[/COLOR] ,[CR]]$INFO[RDS.Infolottery,[COLOR button_focus]$LOCALIZE[29919]:[/COLOR] ,[CR]]$INFO[RDS.InfoWeather,[COLOR button_focus]$LOCALIZE[400]:[/COLOR] ,[CR]]$INFO[RDS.InfoCinema,$[COLOR button_focus]LOCALIZE[19602]:[/COLOR] ,[CR]]$INFO[RDS.InfoHoroscope,[COLOR button_focus]$LOCALIZE[29922]:[/COLOR] ,[CR]]$INFO[RDS.InfoOther,[COLOR button_focus]$LOCALIZE[29921]:[/COLOR] ,[CR]]</label>
+ <autoscroll delay="5000" time="3000" repeat="10000">true</autoscroll>
</control>
</control>
- <control type="grouplist">
- <left>230</left>
- <top>280</top>
- <width>620</width>
- <height>300</height>
- <itemgap>8</itemgap>
- <control type="fadelabel">
- <width>620</width>
- <height>25</height>
- <aligny>center</aligny>
- <textcolor>grey</textcolor>
- <label>$INFO[RDS.ProgNow]</label>
- <visible>!String.IsEmpty(RDS.ProgNow)</visible>
- </control>
- <control type="fadelabel">
- <width>620</width>
- <height>25</height>
- <aligny>center</aligny>
- <textcolor>grey</textcolor>
- <label>$INFO[RDS.ProgNext]</label>
- <visible>!String.IsEmpty(RDS.ProgNext)</visible>
- </control>
- <control type="fadelabel">
- <width>215</width>
- <height>25</height>
- <aligny>center</aligny>
- <textcolor>grey</textcolor>
- <label>$INFO[RDS.PhoneStudio]</label>
- <visible>!String.IsEmpty(RDS.PhoneStudio)</visible>
- </control>
- <control type="fadelabel">
- <width>215</width>
- <height>25</height>
- <aligny>center</aligny>
- <textcolor>grey</textcolor>
- <label>$INFO[RDS.EmailStudio]</label>
- <visible>!String.IsEmpty(RDS.EmailStudio)</visible>
- </control>
- <control type="fadelabel">
- <width>215</width>
- <height>25</height>
- <aligny>center</aligny>
- <textcolor>grey</textcolor>
- <label>$INFO[RDS.SMSStudio]</label>
- <visible>!String.IsEmpty(RDS.SMSStudio)</visible>
- </control>
+
+ <control type="image">
+ <left>970</left>
+ <top>810</top>
+ <width>840</width>
+ <height>260</height>
+ <texture border="21">dialogs/dialog-bg.png</texture>
</control>
- <control type="grouplist">
- <left>385</left>
- <top>280</top>
- <width>520</width>
- <height>300</height>
- <itemgap>8</itemgap>
+ <control type="group">
+ <left>1000</left>
+ <top>830</top>
<control type="label">
- <width>140</width>
+ <width>780</width>
<height>25</height>
- <align>right</align>
- <aligny>center</aligny>
<textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29913]:</label>
- <visible>!String.IsEmpty(RDS.PhoneHotline) | !String.IsEmpty(RDS.EmailHotline)</visible>
+ <font>font36_title</font>
+ <label>$LOCALIZE[14304]</label>
</control>
+
<control type="label">
- <left>385</left>
- <top>420</top>
- <width>140</width>
- <height>25</height>
- <align>right</align>
+ <top>50</top>
+ <width>780</width>
+ <height>40</height>
<aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29914]:</label>
- <visible>!String.IsEmpty(RDS.ProgHomepage)</visible>
+ <label>$INFO[RDS.GetLine(3)]</label>
+ <scroll>true</scroll>
</control>
- </control>
- <control type="grouplist">
- <left>535</left>
- <top>280</top>
- <width>520</width>
- <height>300</height>
- <itemgap>8</itemgap>
<control type="label">
- <width>160</width>
- <height>25</height>
+ <top>90</top>
+ <width>780</width>
+ <height>40</height>
<aligny>center</aligny>
- <label>$LOCALIZE[29910]:</label>
- <visible>!String.IsEmpty(RDS.PhoneHotline)</visible>
+ <label>$INFO[RDS.GetLine(2)]</label>
+ <scroll>true</scroll>
</control>
<control type="label">
- <width>160</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$LOCALIZE[29911]:</label>
- <visible>!String.IsEmpty(RDS.EmailHotline)</visible>
- </control>
- <control type="fadelabel">
- <width>320</width>
- <height>25</height>
- <aligny>center</aligny>
- <label>$INFO[RDS.ProgHomepage]</label>
- <visible>!String.IsEmpty(RDS.ProgHomepage)</visible>
- </control>
- </control>
- <control type="grouplist">
- <left>605</left>
- <top>280</top>
- <width>520</width>
- <height>300</height>
- <itemgap>8</itemgap>
- <control type="fadelabel">
- <width>248</width>
- <height>25</height>
- <aligny>center</aligny>
- <textcolor>grey</textcolor>
- <label>$INFO[RDS.PhoneHotline]</label>
- <visible>!String.IsEmpty(RDS.PhoneHotline)</visible>
- </control>
- <control type="fadelabel">
- <width>248</width>
- <height>25</height>
+ <top>130</top>
+ <width>780</width>
+ <height>40</height>
<aligny>center</aligny>
- <textcolor>grey</textcolor>
- <label>$INFO[RDS.EmailHotline]</label>
- <visible>!String.IsEmpty(RDS.EmailHotline)</visible>
+ <label>$INFO[RDS.GetLine(1)]</label>
+ <scroll>true</scroll>
</control>
- </control>
- <control type="group">
- <description>Radio text info list</description>
- <left>40</left>
- <top>455</top>
- <visible>false</visible>
<control type="label">
- <left>375</left>
- <width>110</width>
- <height>25</height>
- <align>right</align>
- <aligny>center</aligny>
- <textcolor>button_focus</textcolor>
- <label>$LOCALIZE[29915]:</label>
- </control>
- <control type="spincontrol" id="21">
- <description>Source Type</description>
- <left>740</left>
- <top>5</top>
- <aligny>center</aligny>
- <textoffsetx>10</textoffsetx>
- <onright>21</onright>
- <onleft>21</onleft>
- <onup>9000</onup>
- <ondown>9000</ondown>
- </control>
- <control type="spincontrol" id="60">
- <description>Next page button</description>
- <left>0</left>
- <top>155</top>
- <subtype>page</subtype>
- <font></font>
- <onright>9000</onright>
- <onleft>9000</onleft>
- <ondown>21</ondown>
- <onup>21</onup>
- <textcolor></textcolor>
- <showonepage>true</showonepage>
- </control>
- <control type="textbox" id="22">
- <description>Plot</description>
- <left>0</left>
- <top>30</top>
- <width>800</width>
- <height>120</height>
- <font>font12</font>
+ <top>170</top>
+ <width>780</width>
+ <height>40</height>
+ <aligny>center</aligny>
+ <label>$INFO[RDS.GetLine(0)]</label>
+ <scroll>true</scroll>
+ </control>
+
+<!-- <control type="grouplist">
+ <top>50</top>
+ <width>780</width>
+ <height>170</height>
+ <orientation>vertical</orientation>
+ <include content="RDSInfoLine">
+ <param name="value" value="RDS.GetLine(3)" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="value" value="RDS.GetLine(2)" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="value" value="RDS.GetLine(1)" />
+ </include>
+ <include content="RDSInfoLine">
+ <param name="value" value="RDS.GetLine(0)" />
+ </include>
+ </control> -->
+<!-- <control type="textbox">
+ <top>50</top>
+ <width>780</width>
+ <height>170</height>
<align>justify</align>
- <pagecontrol>60</pagecontrol>
- </control>
- </control>
- <control type="grouplist" id="9000">
- <orientation>horizontal</orientation>
- <left>0</left>
- <width>1300</width>
- <align>center</align>
- <top>820</top>
- <onleft>60</onleft>
- <onright>60</onright>
- <onup>21</onup>
- <ondown>21</ondown>
- <include content="DefaultDialogButton">
- <param name="id" value="10" />
- <param name="label" value="$LOCALIZE[186]" />
- </include>
+ <label>$INFO[RDS.GetLine(3)][CR]$INFO[RDS.GetLine(2)][CR]$INFO[RDS.GetLine(1)][CR]$INFO[RDS.GetLine(0)]</label>
+ </control> -->
</control>
+
+ <include content="InfoDialogTopBarInfo">
+ <param name="main_label" value="$LOCALIZE[29900]" />
+ <param name="sub_label" value="[COLOR grey]$VAR[RDSInfoSubTitle][/COLOR]" />
+ <param name="posy" value="40" />
+ </include>
</control>
+ <include condition="Skin.HasSetting(touchmode)">TouchBackButton</include>
</controls>
</window>
diff --git a/addons/skin.estuary/xml/DialogSeekBar.xml b/addons/skin.estuary/xml/DialogSeekBar.xml
index f068eba015..9fba8a9e62 100644
--- a/addons/skin.estuary/xml/DialogSeekBar.xml
+++ b/addons/skin.estuary/xml/DialogSeekBar.xml
@@ -22,16 +22,6 @@
<visible>!Window.IsVisible(videoosd) + !Window.IsVisible(musicosd)</visible>
<animation effect="fade" time="200">VisibleChange</animation>
<control type="image">
- <right>20</right>
- <top>90</top>
- <width>120</width>
- <height>100</height>
- <texture>$INFO[MusicPlayer.Codec,flags/audiocodec/,.png]</texture>
- <aspectratio>keep</aspectratio>
- <visible>Player.ShowInfo + !Player.ChannelPreviewActive + Window.IsActive(visualisation)</visible>
- <animation effect="fade" start="0" end="100" time="200" delay="1000">Visible</animation>
- </control>
- <control type="image">
<left>200</left>
<top>120</top>
<width>264</width>
@@ -74,6 +64,25 @@
<param name="texture" value="$INFO[VideoPlayer.VideoCodec,flags/videocodec/,.png]" />
</include>
</control>
+ <control type="grouplist">
+ <right>20</right>
+ <top>110</top>
+ <width>1000</width>
+ <height>100</height>
+ <align>right</align>
+ <include>Animation_BottomSlide</include>
+ <orientation>horizontal</orientation>
+ <itemgap>10</itemgap>
+ <visible>Player.ShowInfo + !Player.ChannelPreviewActive + Window.IsActive(visualisation)</visible>
+ <animation effect="fade" start="0" end="100" time="200" delay="1000">Visible</animation>
+ <include content="MediaFlag">
+ <param name="texture" value="$INFO[MusicPlayer.Codec,flags/audiocodec/,.png]" />
+ </include>
+ <include content="MediaFlag">
+ <param name="texture" value="flags/rds/rds.png" />
+ <param name="visible" value="RDS.HasRDS" />
+ </include>
+ </control>
<control type="group">
<visible>PVR.IsRecordingPlayingChannel + !Player.ChannelPreviewActive</visible>
<control type="image">
diff --git a/addons/skin.estuary/xml/Includes_PVR.xml b/addons/skin.estuary/xml/Includes_PVR.xml
index c6b869ebc4..7abe2ae51f 100644
--- a/addons/skin.estuary/xml/Includes_PVR.xml
+++ b/addons/skin.estuary/xml/Includes_PVR.xml
@@ -325,6 +325,29 @@
</control>
</control>
</control>
+ </include>
+ <include name="RDSInfoLine">
+ <control type="grouplist">
+ <visible>!String.IsEmpty($PARAM[value])</visible>
+ <height>45</height>
+ <orientation>horizontal</orientation>
+ <itemgap>10</itemgap>
+ <control type="label">
+ <width>auto</width>
+ <height>40</height>
+ <aligny>center</aligny>
+ <label>$PARAM[label]:</label>
+ <textcolor>button_focus</textcolor>
+ </control>
+ <control type="label">
+ <width>auto</width>
+ <height>40</height>
+ <align>right</align>
+ <aligny>center</aligny>
+ <label>$INFO[$PARAM[value]]</label>
+ <scroll>true</scroll>
+ </control>
+ </control>
</include>
<include name="PVRChannelNumberInput">
<control type="label">
diff --git a/addons/skin.estuary/xml/MusicOSD.xml b/addons/skin.estuary/xml/MusicOSD.xml
index f34dd5e881..81d938e8f8 100644
--- a/addons/skin.estuary/xml/MusicOSD.xml
+++ b/addons/skin.estuary/xml/MusicOSD.xml
@@ -38,7 +38,7 @@
<onup>87</onup>
<ondown>noop</ondown>
<onleft>5000</onleft>
- <onright>620</onright>
+ <onright>62040</onright>
<control type="radiobutton" id="600">
<include content="OSDButton">
<param name="texture" value="osd/fullscreen/buttons/previous.png"/>
@@ -112,6 +112,30 @@
<ondown>noop</ondown>
<onleft>606</onleft>
<onright>600</onright>
+ <control type="radiobutton" id="62040">
+ <include content="OSDButton">
+ <param name="texture" value="osd/fullscreen/buttons/channels.png"/>
+ </include>
+ <onclick>Dialog.Close(MusicOSD)</onclick>
+ <onclick>ActivateWindow(PVROSDChannels)</onclick>
+ <visible>MusicPlayer.Content(LiveTV)</visible>
+ </control>
+ <control type="radiobutton" id="62041">
+ <include content="OSDButton">
+ <param name="texture" value="osd/fullscreen/buttons/guide.png"/>
+ </include>
+ <onclick>Dialog.Close(MusicOSD)</onclick>
+ <onclick>ActivateWindow(PVRChannelGuide)</onclick>
+ <visible>MusicPlayer.Content(LiveTV) + VideoPlayer.HasEPG</visible>
+ </control>
+ <control type="radiobutton" id="62042">
+ <include content="OSDButton">
+ <param name="texture" value="osd/fullscreen/buttons/information.png"/>
+ </include>
+ <onclick>Dialog.Close(MusicOSD)</onclick>
+ <onclick>ActivateWindow(PVRRadioRDSInfo)</onclick>
+ <visible>MusicPlayer.Content(LiveTV) + RDS.HasRadiotext</visible>
+ </control>
<control type="radiobutton" id="620">
<include content="OSDButton">
<param name="texture" value="osd/fullscreen/buttons/rating.png"/>
@@ -193,6 +217,7 @@
<width>1000</width>
<height>50</height>
<label>$VAR[MusicOSDHelpTextVar]</label>
+ <visible>!Player.ShowInfo</visible>
</control>
</control>
<control type="group">
diff --git a/addons/skin.estuary/xml/Variables.xml b/addons/skin.estuary/xml/Variables.xml
index bee39ed5b5..bf5b3681ae 100644
--- a/addons/skin.estuary/xml/Variables.xml
+++ b/addons/skin.estuary/xml/Variables.xml
@@ -226,6 +226,9 @@
</variable>
<variable name="MusicOSDHelpTextVar">
<value condition="Control.HasFocus(620)">$LOCALIZE[31033]$INFO[MusicPlayer.UserRating, : ]</value>
+ <value condition="Control.HasFocus(62040)">$LOCALIZE[19019]</value>
+ <value condition="Control.HasFocus(62041)">$LOCALIZE[19069]</value>
+ <value condition="Control.HasFocus(62042)">$LOCALIZE[29900]</value>
<value condition="Control.HasFocus(704)">$LOCALIZE[486]$INFO[Playlist.Repeat, : ]</value>
<value condition="Control.HasFocus(607) + Playlist.IsRandom">$LOCALIZE[590]: $LOCALIZE[16041]</value>
<value condition="Control.HasFocus(607)">$LOCALIZE[590]: $LOCALIZE[16039]</value>
@@ -372,6 +375,10 @@
<value condition="!String.IsEmpty(Window.Property(IsRadio))">$LOCALIZE[19199] - $LOCALIZE[19024]</value>
<value>$LOCALIZE[19199] - $LOCALIZE[19023]</value>
</variable>
+ <variable name="RDSInfoSubTitle">
+ <value condition="String.IsEmpty(MusicPlayer.ChannelName)">$INFO[Player.Title]</value>
+ <value>$INFO[MusicPlayer.ChannelName]$INFO[Player.Title, - ]</value>
+ </variable>
<variable name="PVRGroupMgrHeader">
<value condition="!String.IsEmpty(Window.Property(IsRadio))">$LOCALIZE[19048] - $LOCALIZE[19174]</value>
<value>$LOCALIZE[19048] - $LOCALIZE[19173]</value>
diff --git a/xbmc/cores/VideoPlayer/VideoPlayerRadioRDS.cpp b/xbmc/cores/VideoPlayer/VideoPlayerRadioRDS.cpp
index 24c17ec162..9ec0ae69fe 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayerRadioRDS.cpp
+++ b/xbmc/cores/VideoPlayer/VideoPlayerRadioRDS.cpp
@@ -1488,8 +1488,6 @@ unsigned int CDVDRadioRDSData::DecodeRTPlus(uint8_t *msgElement, unsigned int le
if (!str.empty())
g_charsetConverter.unknownToUTF8(str);
- else if (m_currentChannel)
- str = m_currentChannel->ChannelName();
currentMusic->SetArtist(str);
str = m_RTPlus_Title;
diff --git a/xbmc/pvr/PVRGUIInfo.cpp b/xbmc/pvr/PVRGUIInfo.cpp
index 7ed5f02ddb..708f943eaf 100644
--- a/xbmc/pvr/PVRGUIInfo.cpp
+++ b/xbmc/pvr/PVRGUIInfo.cpp
@@ -333,7 +333,7 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem *item, const CGUIInf
if (recording)
{
// Note: CPVRRecoding is derived from CVideoInfoTag. All base class properties will be handled
- // by CGUIInfoManager. Only properties introduced by CPVRRecording need to be handled here.
+ // by CVideoGUIInfoProvider. Only properties introduced by CPVRRecording need to be handled here.
switch (info.m_info)
{
case LISTITEM_DATE:
@@ -400,21 +400,11 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem *item, const CGUIInf
{
switch (info.m_info)
{
- case PLAYER_TITLE:
- /* Load the RDS Radiotext+ if present */
- strValue = item->GetPVRRadioRDSInfoTag()->GetTitle();
- if (!strValue.empty())
- return true;
- /* If no plus present load the RDS Radiotext info line 0 if present */
- strValue = g_application.GetAppPlayer().GetRadioText(0);
- if (!strValue.empty())
- return true;
- break; // get title from epg
case MUSICPLAYER_CHANNEL_NAME:
strValue = item->GetPVRRadioRDSInfoTag()->GetProgStation();
if (!strValue.empty())
return true;
- break; // get channel name from channel tag
+ break; // try to get channel name from channel tag
}
}
@@ -422,6 +412,9 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem *item, const CGUIInf
CPVRChannelPtr channel;
if (item->IsPVRChannel() || item->IsEPG() || item->IsPVRTimer())
{
+ CPVRItem pvrItem(item);
+ channel = pvrItem.GetChannel();
+
switch (info.m_info)
{
case VIDEOPLAYER_NEXT_TITLE:
@@ -440,19 +433,13 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem *item, const CGUIInf
case LISTITEM_NEXT_ENDDATE:
case LISTITEM_NEXT_ENDTIME:
case LISTITEM_NEXT_DURATION:
- {
- CPVRItem pvrItem(item);
+ // next playing event
epgTag = pvrItem.GetNextEpgInfoTag();
- channel = pvrItem.GetChannel();
break;
- }
default:
- {
- CPVRItem pvrItem(item);
+ // now playing event
epgTag = pvrItem.GetEpgInfoTag();
- channel = pvrItem.GetChannel();
break;
- }
}
switch (info.m_info)
@@ -838,19 +825,6 @@ bool CPVRGUIInfo::GetPVRLabel(const CFileItem *item, const CGUIInfo &info, std::
return false;
}
-namespace
-{
- std::string GetEpgEventTitle(const CPVREpgInfoTagPtr& epgTag)
- {
- if (epgTag)
- return epgTag->Title();
- else if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_EPG_HIDENOINFOAVAILABLE))
- return std::string();
- else
- return g_localizeStrings.Get(19055); // no information available
- }
-} // unnamed namespace
-
bool CPVRGUIInfo::GetRadioRDSLabel(const CFileItem *item, const CGUIInfo &info, std::string &strValue) const
{
const CPVRRadioRDSInfoTagPtr tag = item->GetPVRRadioRDSInfoTag();
@@ -967,6 +941,18 @@ bool CPVRGUIInfo::GetRadioRDSLabel(const CFileItem *item, const CGUIInfo &info,
case RDS_EMAIL_STUDIO:
strValue = tag->GetEMailStudio();
return true;
+ case RDS_PROG_STATION:
+ strValue = tag->GetProgStation();
+ return true;
+ case RDS_PROG_NOW:
+ strValue = tag->GetProgNow();
+ return true;
+ case RDS_PROG_NEXT:
+ strValue = tag->GetProgNext();
+ return true;
+ case RDS_AUDIO_LANG:
+ strValue = tag->GetLanguage();
+ return true;
}
}
@@ -975,46 +961,6 @@ bool CPVRGUIInfo::GetRadioRDSLabel(const CFileItem *item, const CGUIInfo &info,
case RDS_GET_RADIOTEXT_LINE:
strValue = g_application.GetAppPlayer().GetRadioText(info.GetData1());
return true;
- case RDS_PROG_STATION:
- if (tag)
- strValue = tag->GetProgStation();
- if (strValue.empty())
- {
- const CPVRChannelPtr channel = item->GetPVRChannelInfoTag();
- if (channel)
- strValue = channel->ChannelName();
- }
- return true;
- case RDS_PROG_NOW:
- if (tag)
- strValue = tag->GetProgNow();
- if (strValue.empty())
- {
- const CPVRChannelPtr channel = item->GetPVRChannelInfoTag();
- if (channel)
- strValue = GetEpgEventTitle(channel->GetEPGNow());
- }
- return true;
- case RDS_PROG_NEXT:
- if (tag)
- strValue = tag->GetProgNext();
- if (strValue.empty())
- {
- const CPVRChannelPtr channel = item->GetPVRChannelInfoTag();
- if (channel)
- strValue = GetEpgEventTitle(channel->GetEPGNext());
- }
- return true;
- case RDS_AUDIO_LANG:
- if (tag)
- strValue = tag->GetLanguage();
- if (strValue.empty())
- {
- AudioStreamInfo streamInfo;
- g_application.GetAppPlayer().GetAudioStreamInfo(g_application.GetAppPlayer().GetAudioStream(), streamInfo);
- strValue = streamInfo.language;
- }
- return true;
}
return false;
}
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.cpp b/xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.cpp
index ca47885067..936fc7bc1e 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.cpp
+++ b/xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.cpp
@@ -57,13 +57,18 @@ bool CGUIDialogPVRRadioRDSInfo::OnMessage(CGUIMessage& message)
}
else if (iControl == SPIN_CONTROL_INFO)
{
- CGUISpinControl *spin = static_cast<CGUISpinControl*>(GetControl(SPIN_CONTROL_INFO));
- if (!spin) return true;
+ const CPVRRadioRDSInfoTagPtr currentRDS = g_application.CurrentFileItem().GetPVRRadioRDSInfoTag();
+ if (!currentRDS)
+ return false;
+
+ const CGUISpinControl *spin = static_cast<CGUISpinControl*>(GetControl(SPIN_CONTROL_INFO));
+ if (!spin)
+ return false;
CGUITextBox *textbox = static_cast<CGUITextBox*>(GetControl(TEXT_INFO));
- if (!textbox) return true;
+ if (!textbox)
+ return false;
- PVR::CPVRRadioRDSInfoTagPtr currentRDS = g_application.CurrentFileItem().GetPVRRadioRDSInfoTag();
switch (spin->GetValue())
{
case INFO_NEWS:
@@ -100,158 +105,25 @@ bool CGUIDialogPVRRadioRDSInfo::OnMessage(CGUIMessage& message)
}
else if (message.GetMessage() == GUI_MSG_NOTIFY_ALL)
{
- if (IsActive() && message.GetParam1() == GUI_MSG_UPDATE_RADIOTEXT &&
+ CGUISpinControl *spin = static_cast<CGUISpinControl*>(GetControl(SPIN_CONTROL_INFO));
+ CGUITextBox *textbox = static_cast<CGUITextBox*>(GetControl(TEXT_INFO));
+
+ if (IsActive() && spin && textbox && message.GetParam1() == GUI_MSG_UPDATE_RADIOTEXT &&
g_application.GetAppPlayer().IsPlaying() &&
g_application.CurrentFileItem().HasPVRRadioRDSInfoTag())
{
- PVR::CPVRRadioRDSInfoTagPtr currentRDS = g_application.CurrentFileItem().GetPVRRadioRDSInfoTag();
- CGUISpinControl *spin = static_cast<CGUISpinControl*>(GetControl(SPIN_CONTROL_INFO));
- CGUITextBox *textbox = static_cast<CGUITextBox*>(GetControl(TEXT_INFO));
+ const CPVRRadioRDSInfoTagPtr currentRDS = g_application.CurrentFileItem().GetPVRRadioRDSInfoTag();
+
+ UpdateControls(spin, 29916, INFO_NEWS, m_LabelInfoNewsPresent, textbox, currentRDS->GetInfoNews(), m_LabelInfoNews);
+ UpdateControls(spin, 29917, INFO_NEWS_LOCAL, m_LabelInfoNewsLocalPresent, textbox, currentRDS->GetInfoNewsLocal(), m_LabelInfoNewsLocal);
+ UpdateControls(spin, 29918, INFO_SPORT, m_LabelInfoSportPresent, textbox, currentRDS->GetInfoSport(), m_LabelInfoSport);
+ UpdateControls(spin, 400, INFO_WEATHER, m_LabelInfoWeatherPresent, textbox, currentRDS->GetInfoWeather(), m_LabelInfoWeather);
+ UpdateControls(spin, 29919, INFO_LOTTERY, m_LabelInfoLotteryPresent, textbox, currentRDS->GetInfoLottery(), m_LabelInfoLottery);
+ UpdateControls(spin, 29920, INFO_STOCK, m_LabelInfoStockPresent, textbox, currentRDS->GetInfoStock(), m_LabelInfoStock);
+ UpdateControls(spin, 29921, INFO_OTHER, m_LabelInfoOtherPresent, textbox, currentRDS->GetInfoOther(), m_LabelInfoOther);
+ UpdateControls(spin, 19602, INFO_CINEMA, m_LabelInfoCinemaPresent, textbox, currentRDS->GetInfoCinema(), m_LabelInfoCinema);
+ UpdateControls(spin, 29922, INFO_HOROSCOPE, m_LabelInfoHoroscopePresent, textbox, currentRDS->GetInfoHoroscope(), m_LabelInfoHoroscope);
- if (currentRDS->GetInfoNews().size())
- {
- if (!m_LabelInfoNewsPresent)
- {
- spin->AddLabel(g_localizeStrings.Get(29916), INFO_NEWS);
- m_LabelInfoNewsPresent = true;
- m_InfoPresent = true;
- }
-
- if (m_LabelInfoNews != currentRDS->GetInfoNews())
- {
- spin->SetValue(INFO_NEWS);
- m_LabelInfoNews = currentRDS->GetInfoNews();
- textbox->SetInfo(m_LabelInfoNews);
- }
- }
- if (currentRDS->GetInfoNewsLocal().size())
- {
- if (!m_LabelInfoNewsLocalPresent)
- {
- spin->AddLabel(g_localizeStrings.Get(29917), INFO_NEWS_LOCAL);
- m_LabelInfoNewsLocalPresent = true;
- m_InfoPresent = true;
- }
-
- if (m_LabelInfoNewsLocal != currentRDS->GetInfoNewsLocal())
- {
- spin->SetValue(INFO_NEWS_LOCAL);
- m_LabelInfoNewsLocal = currentRDS->GetInfoNewsLocal();
- textbox->SetInfo(m_LabelInfoNewsLocal);
- }
- }
- if (currentRDS->GetInfoSport().size())
- {
- if (!m_LabelInfoSportPresent)
- {
- spin->AddLabel(g_localizeStrings.Get(29918), INFO_SPORT);
- m_LabelInfoSportPresent = true;
- m_InfoPresent = true;
- }
-
- if (m_LabelInfoSport != currentRDS->GetInfoSport())
- {
- spin->SetValue(INFO_SPORT);
- m_LabelInfoSport = currentRDS->GetInfoSport();
- textbox->SetInfo(m_LabelInfoSport);
- }
- }
- if (currentRDS->GetInfoWeather().size())
- {
- if (!m_LabelInfoWeatherPresent)
- {
- spin->AddLabel(g_localizeStrings.Get(400), INFO_WEATHER);
- m_LabelInfoWeatherPresent = true;
- m_InfoPresent = true;
- }
-
- if (m_LabelInfoWeather != currentRDS->GetInfoWeather())
- {
- spin->SetValue(INFO_WEATHER);
- m_LabelInfoWeather = currentRDS->GetInfoWeather();
- textbox->SetInfo(m_LabelInfoWeather);
- }
- }
- if (currentRDS->GetInfoLottery().size())
- {
- if (!m_LabelInfoLotteryPresent)
- {
- spin->AddLabel(g_localizeStrings.Get(29919), INFO_LOTTERY);
- m_LabelInfoLotteryPresent = true;
- m_InfoPresent = true;
- }
-
- if (m_LabelInfoLottery != currentRDS->GetInfoLottery())
- {
- spin->SetValue(INFO_LOTTERY);
- m_LabelInfoLottery = currentRDS->GetInfoLottery();
- textbox->SetInfo(m_LabelInfoLottery);
- }
- }
- if (currentRDS->GetInfoStock().size())
- {
- if (!m_LabelInfoStockPresent)
- {
- spin->AddLabel(g_localizeStrings.Get(29920), INFO_STOCK);
- m_LabelInfoStockPresent = true;
- m_InfoPresent = true;
- }
-
- if (m_LabelInfoStock != currentRDS->GetInfoStock())
- {
- spin->SetValue(INFO_STOCK);
- m_LabelInfoStock = currentRDS->GetInfoStock();
- textbox->SetInfo(m_LabelInfoStock);
- }
- }
- if (currentRDS->GetInfoOther().size())
- {
- if (!m_LabelInfoOtherPresent)
- {
- spin->AddLabel(g_localizeStrings.Get(29921), INFO_OTHER);
- m_LabelInfoOtherPresent = true;
- m_InfoPresent = true;
- }
-
- if (m_LabelInfoOther != currentRDS->GetInfoOther())
- {
- spin->SetValue(INFO_OTHER);
- m_LabelInfoOther = currentRDS->GetInfoOther();
- textbox->SetInfo(m_LabelInfoOther);
- }
- }
- if (currentRDS->GetInfoCinema().size())
- {
- if (!m_LabelInfoCinemaPresent)
- {
- spin->AddLabel(g_localizeStrings.Get(19602), INFO_CINEMA);
- m_LabelInfoCinemaPresent = true;
- m_InfoPresent = true;
- }
-
- if (m_LabelInfoCinema != currentRDS->GetInfoCinema())
- {
- spin->SetValue(INFO_CINEMA);
- m_LabelInfoCinema = currentRDS->GetInfoCinema();
- textbox->SetInfo(m_LabelInfoCinema);
- }
- }
- if (currentRDS->GetInfoHoroscope().size())
- {
- if (!m_LabelInfoHoroscopePresent)
- {
- spin->AddLabel(g_localizeStrings.Get(29922), INFO_HOROSCOPE);
- m_LabelInfoHoroscopePresent = true;
- m_InfoPresent = true;
- }
-
- if (m_LabelInfoHoroscope != currentRDS->GetInfoHoroscope())
- {
- spin->SetValue(INFO_HOROSCOPE);
- m_LabelInfoHoroscope = currentRDS->GetInfoHoroscope();
- textbox->SetInfo(m_LabelInfoHoroscope);
- }
- }
if (m_InfoPresent)
SET_CONTROL_VISIBLE(CONTROL_INFO_LIST);
else
@@ -262,9 +134,49 @@ bool CGUIDialogPVRRadioRDSInfo::OnMessage(CGUIMessage& message)
return CGUIDialog::OnMessage(message);
}
+void CGUIDialogPVRRadioRDSInfo::InitControls(CGUISpinControl* spin, uint32_t iSpinLabelId, uint32_t iSpinControlId, bool& bSpinLabelPresent,
+ CGUITextBox* textbox, const std::string& textboxValue)
+{
+ // if there is a text for the given spinner item...
+ if (!textboxValue.empty())
+ {
+ // add a new spinner item to the control...
+ spin->AddLabel(g_localizeStrings.Get(iSpinLabelId), iSpinControlId);
+ bSpinLabelPresent = true;
+
+ // and if it was the first item, fill the textbox and select the spinner item.
+ if (!m_InfoPresent)
+ {
+ textbox->SetInfo(textboxValue);
+ spin->SetValue(iSpinControlId);
+ m_InfoPresent = true;
+ }
+ }
+}
+
+void CGUIDialogPVRRadioRDSInfo::UpdateControls(CGUISpinControl* spin, uint32_t iSpinLabelId, uint32_t iSpinControlId, bool& bSpinLabelPresent,
+ CGUITextBox* textbox, const std::string& textboxNewValue, std::string& textboxCurrentValue)
+{
+ if (!textboxNewValue.empty())
+ {
+ if (!bSpinLabelPresent)
+ {
+ spin->AddLabel(g_localizeStrings.Get(iSpinLabelId), iSpinControlId);
+ bSpinLabelPresent = true;
+ }
+
+ if (textboxCurrentValue != textboxNewValue)
+ {
+ spin->SetValue(iSpinControlId);
+ textboxCurrentValue = textboxNewValue;
+ textbox->SetInfo(textboxNewValue);
+ m_InfoPresent = true;
+ }
+ }
+}
+
void CGUIDialogPVRRadioRDSInfo::OnInitWindow()
{
- // call init
CGUIDialog::OnInitWindow();
m_LabelInfoNewsPresent = false;
@@ -278,116 +190,34 @@ void CGUIDialogPVRRadioRDSInfo::OnInitWindow()
m_LabelInfoCinemaPresent = false;
m_InfoPresent = false;
- PVR::CPVRRadioRDSInfoTagPtr currentRDS = g_application.CurrentFileItem().GetPVRRadioRDSInfoTag();
+ SET_CONTROL_HIDDEN(CONTROL_INFO_LIST);
+
+ const CPVRRadioRDSInfoTagPtr currentRDS = g_application.CurrentFileItem().GetPVRRadioRDSInfoTag();
+ if (!currentRDS)
+ return;
CGUISpinControl *spin = static_cast<CGUISpinControl*>(GetControl(SPIN_CONTROL_INFO));
- if (!spin) return;
+ if (!spin)
+ return; // not an error; not every skin must implement this.
+
spin->Clear();
CGUITextBox *textbox = static_cast<CGUITextBox*>(GetControl(TEXT_INFO));
- if (!textbox) return;
-
- if (currentRDS->GetInfoNews().size())
- {
- spin->AddLabel(g_localizeStrings.Get(29916), INFO_NEWS);
- textbox->SetInfo(currentRDS->GetInfoNews());
- spin->SetValue(INFO_NEWS);
- m_LabelInfoNewsPresent = true;
- m_InfoPresent = true;
- }
- if (currentRDS->GetInfoNewsLocal().size())
- {
- spin->AddLabel(g_localizeStrings.Get(29917), INFO_NEWS_LOCAL);
- if (!m_InfoPresent)
- {
- textbox->SetInfo(currentRDS->GetInfoNewsLocal());
- spin->SetValue(INFO_NEWS_LOCAL);
- m_LabelInfoNewsLocalPresent = true;
- m_InfoPresent = true;
- }
- }
- if (currentRDS->GetInfoSport().size())
- {
- spin->AddLabel(g_localizeStrings.Get(29918), INFO_SPORT);
- if (!m_InfoPresent)
- {
- textbox->SetInfo(currentRDS->GetInfoSport());
- spin->SetValue(INFO_SPORT);
- m_LabelInfoSportPresent = true;
- m_InfoPresent = true;
- }
- }
- if (currentRDS->GetInfoWeather().size())
- {
- spin->AddLabel(g_localizeStrings.Get(400), INFO_WEATHER);
- if (!m_InfoPresent)
- {
- textbox->SetInfo(currentRDS->GetInfoWeather());
- spin->SetValue(INFO_WEATHER);
- m_LabelInfoWeatherPresent = true;
- m_InfoPresent = true;
- }
- }
- if (currentRDS->GetInfoLottery().size())
- {
- spin->AddLabel(g_localizeStrings.Get(29919), INFO_LOTTERY);
- if (!m_InfoPresent)
- {
- textbox->SetInfo(currentRDS->GetInfoLottery());
- spin->SetValue(INFO_LOTTERY);
- m_LabelInfoLotteryPresent = true;
- m_InfoPresent = true;
- }
- }
- if (currentRDS->GetInfoStock().size())
- {
- spin->AddLabel(g_localizeStrings.Get(29920), INFO_STOCK);
- if (!m_InfoPresent)
- {
- textbox->SetInfo(currentRDS->GetInfoStock());
- spin->SetValue(INFO_STOCK);
- m_LabelInfoStockPresent = true;
- m_InfoPresent = true;
- }
- }
- if (currentRDS->GetInfoOther().size())
- {
- spin->AddLabel(g_localizeStrings.Get(29921), INFO_OTHER);
- if (!m_InfoPresent)
- {
- textbox->SetInfo(currentRDS->GetInfoOther());
- spin->SetValue(INFO_OTHER);
- m_LabelInfoOtherPresent = true;
- m_InfoPresent = true;
- }
- }
- if (currentRDS->GetInfoCinema().size())
- {
- spin->AddLabel(g_localizeStrings.Get(19602), INFO_CINEMA);
- if (!m_InfoPresent)
- {
- textbox->SetInfo(currentRDS->GetInfoCinema());
- spin->SetValue(INFO_CINEMA);
- m_LabelInfoCinemaPresent = true;
- m_InfoPresent = true;
- }
- }
- if (currentRDS->GetInfoHoroscope().size())
- {
- spin->AddLabel(g_localizeStrings.Get(29922), INFO_HOROSCOPE);
- if (!m_InfoPresent)
- {
- textbox->SetInfo(currentRDS->GetInfoHoroscope());
- spin->SetValue(INFO_HOROSCOPE);
- m_LabelInfoHoroscopePresent = true;
- m_InfoPresent = true;
- }
- }
+ if (!textbox)
+ return; // not an error; not every skin must implement this.
+
+ InitControls(spin, 29916, INFO_NEWS, m_LabelInfoNewsPresent, textbox, currentRDS->GetInfoNews());
+ InitControls(spin, 29917, INFO_NEWS_LOCAL, m_LabelInfoNewsLocalPresent, textbox, currentRDS->GetInfoNewsLocal());
+ InitControls(spin, 29918, INFO_SPORT, m_LabelInfoSportPresent, textbox, currentRDS->GetInfoSport());
+ InitControls(spin, 400, INFO_WEATHER, m_LabelInfoWeatherPresent, textbox, currentRDS->GetInfoWeather());
+ InitControls(spin, 29919, INFO_LOTTERY, m_LabelInfoLotteryPresent, textbox, currentRDS->GetInfoLottery());
+ InitControls(spin, 29920, INFO_STOCK, m_LabelInfoStockPresent, textbox, currentRDS->GetInfoStock());
+ InitControls(spin, 29921, INFO_OTHER, m_LabelInfoOtherPresent, textbox, currentRDS->GetInfoOther());
+ InitControls(spin, 19602, INFO_CINEMA, m_LabelInfoCinemaPresent, textbox, currentRDS->GetInfoCinema());
+ InitControls(spin, 29922, INFO_HOROSCOPE, m_LabelInfoHoroscopePresent, textbox, currentRDS->GetInfoHoroscope());
if (m_InfoPresent)
SET_CONTROL_VISIBLE(CONTROL_INFO_LIST);
- else
- SET_CONTROL_HIDDEN(CONTROL_INFO_LIST);
}
void CGUIDialogPVRRadioRDSInfo::OnDeinitWindow(int nextWindowID)
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.h b/xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.h
index 6522b8228b..1c2caf393c 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.h
+++ b/xbmc/pvr/dialogs/GUIDialogPVRRadioRDSInfo.h
@@ -10,6 +10,9 @@
#include "guilib/GUIDialog.h"
+class CGUISpinControl;
+class CGUITextBox;
+
namespace PVR
{
class CGUIDialogPVRRadioRDSInfo : public CGUIDialog
@@ -26,6 +29,11 @@ namespace PVR
void OnDeinitWindow(int nextWindowID) override;
private:
+ void InitControls(CGUISpinControl* spin, uint32_t iSpinLabelId, uint32_t iSpinControlId, bool& bSpinLabelPresent,
+ CGUITextBox* textbox, const std::string& textboxValue);
+ void UpdateControls(CGUISpinControl* spin, uint32_t iSpinLabelId, uint32_t iSpinControlId, bool& bSpinLabelPresent,
+ CGUITextBox* textbox, const std::string& textboxNewValue, std::string& textboxCurrentValue);
+
CFileItemPtr m_rdsItem;
bool m_InfoPresent = false;