Skip to content

Commit

Permalink
[PVR] Inconsistencies in Guide/Channel/Recording Info Dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
linknetx committed Mar 2, 2019
1 parent 0f0a92f commit 5d409ed
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 10 deletions.
22 changes: 15 additions & 7 deletions addons/skin.estouchy/xml/DialogPVRInfo.xml
Expand Up @@ -180,23 +180,24 @@
<itemgap>10</itemgap>
<align>center</align>
<orientation>horizontal</orientation>
<defaultcontrol always="true">5</defaultcontrol>
<onleft>9000</onleft>
<onright>9000</onright>
<onup>50</onup>
<ondown>49</ondown>
<control type="button" id="4">
<description>Find similar</description>
<control type="button" id="5">
<description>Switch channel</description>
<width>230</width>
<include>ButtonInfoDialogsCommonValues</include>
<label>19003</label>
<label>19165</label>
<visible>Window.IsActive(PVRGuideInfo)</visible>
</control>
<control type="button" id="5">
<description>Switch Channel</description>
<control type="button" id="8">
<description>Play recording</description>
<width>230</width>
<include>ButtonInfoDialogsCommonValues</include>
<label>19165</label>
<visible>Window.IsActive(PVRGuideInfo)</visible>
<label>19687</label>
<visible>Window.IsActive(PVRRecordingInfo)</visible>
</control>
<control type="button" id="6">
<description>Record</description>
Expand All @@ -205,6 +206,13 @@
<label></label>
<visible>Window.IsActive(PVRGuideInfo)</visible>
</control>
<control type="button" id="4">
<description>Find similar</description>
<width>230</width>
<include>ButtonInfoDialogsCommonValues</include>
<label>19003</label>
<visible>Window.IsActive(PVRGuideInfo) | Window.IsActive(PVRRecordingInfo)</visible>
</control>
<control type="button" id="7">
<description>OK</description>
<width>230</width>
Expand Down
4 changes: 2 additions & 2 deletions addons/skin.estuary/xml/DialogPVRInfo.xml
Expand Up @@ -60,7 +60,7 @@
<itemgap>10</itemgap>
<align>center</align>
<orientation>horizontal</orientation>
<defaultcontrol>5</defaultcontrol>
<defaultcontrol always="true">5</defaultcontrol>
<onleft>9000</onleft>
<onright>9000</onright>
<onup>61</onup>
Expand Down Expand Up @@ -104,7 +104,7 @@
<param name="id" value="4" />
<param name="icon" value="icons/infodialogs/similar.png" />
<param name="label" value="$LOCALIZE[19003]" />
<param name="visible" value="Window.IsActive(PVRGuideInfo)" />
<param name="visible" value="Window.IsActive(PVRGuideInfo) | Window.IsActive(PVRRecordingInfo)" />
</include>
<include content="InfoDialogButton">
<param name="width" value="275" />
Expand Down
22 changes: 21 additions & 1 deletion xbmc/pvr/dialogs/GUIDialogPVRRecordingInfo.cpp
Expand Up @@ -18,6 +18,7 @@

using namespace PVR;

#define CONTROL_BTN_FIND 4
#define CONTROL_BTN_OK 7
#define CONTROL_BTN_PLAY_RECORDING 8

Expand All @@ -32,7 +33,9 @@ bool CGUIDialogPVRRecordingInfo::OnMessage(CGUIMessage& message)
switch (message.GetMessage())
{
case GUI_MSG_CLICKED:
return OnClickButtonOK(message) || OnClickButtonPlay(message);
return OnClickButtonOK(message) ||
OnClickButtonPlay(message) ||
OnClickButtonFind(message);
}

return CGUIDialog::OnMessage(message);
Expand Down Expand Up @@ -68,6 +71,23 @@ bool CGUIDialogPVRRecordingInfo::OnClickButtonPlay(CGUIMessage &message)
return bReturn;
}

bool CGUIDialogPVRRecordingInfo::OnClickButtonFind(CGUIMessage& message)
{
bool bReturn = false;

if (message.GetSenderId() == CONTROL_BTN_FIND)
{
Close();

if (m_recordItem)
CServiceBroker::GetPVRManager().GUIActions()->FindSimilar(m_recordItem);

bReturn = true;
}

return bReturn;
}

bool CGUIDialogPVRRecordingInfo::OnInfo(int actionID)
{
Close();
Expand Down
1 change: 1 addition & 0 deletions xbmc/pvr/dialogs/GUIDialogPVRRecordingInfo.h
Expand Up @@ -27,6 +27,7 @@ namespace PVR
static void ShowFor(const CFileItemPtr& item);

private:
bool OnClickButtonFind(CGUIMessage& message);
bool OnClickButtonOK(CGUIMessage &message);
bool OnClickButtonPlay(CGUIMessage &message);

Expand Down

0 comments on commit 5d409ed

Please sign in to comment.