Skip to content
Permalink
Browse files

Merge pull request #15648 from linknetx/pvr-dialogs

[PVR] Inconsistencies in Guide/Channel/Recordings Info Dialogs
  • Loading branch information
ksooo committed Apr 16, 2019
2 parents cfba380 + 5d409ed commit ab1153357752c9f4b788dda09790c54a6324215f
@@ -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>
@@ -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>
@@ -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>
@@ -111,7 +111,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" />
@@ -18,6 +18,7 @@

using namespace PVR;

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

@@ -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);
@@ -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();
@@ -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);

0 comments on commit ab11533

Please sign in to comment.
You can’t perform that action at this time.