aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Sommerfeld <kai.sommerfeld@gmx.com>2015-08-06 15:55:16 +0200
committerKai Sommerfeld <kai.sommerfeld@gmx.com>2015-08-06 22:39:00 +0200
commita32ce909774757201b6943b4a54b2e4dc982509a (patch)
tree559bff5967dbc10192bf99107cd9b02f93eb1262
parentfb174d6b3fe6ee101261a8da6852b7856bf03a96 (diff)
[PVR] 'Confim channel switch' only for up/down, not ch+/-
-rw-r--r--system/Lircmap.xml10
-rw-r--r--system/keymaps/keyboard.xml12
-rw-r--r--system/keymaps/remote.xml12
-rw-r--r--xbmc/cores/dvdplayer/DVDMessage.h2
-rw-r--r--xbmc/cores/dvdplayer/DVDPlayer.cpp47
5 files changed, 56 insertions, 27 deletions
diff --git a/system/Lircmap.xml b/system/Lircmap.xml
index 5d55be11ea..faf1f7219e 100644
--- a/system/Lircmap.xml
+++ b/system/Lircmap.xml
@@ -412,7 +412,7 @@
</remote>
<remote device="linux-input-layer">
- <altname>cx23885_remote</altname>
+ <altname>cx23885_remote</altname>
<left>KEY_LEFT</left>
<right>KEY_RIGHT</right>
<up>KEY_UP</up>
@@ -438,8 +438,8 @@
<reverse>KEY_REWIND</reverse>
<volumeplus>KEY_VOLUMEUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
- <channelplus>KEY_CHANNELUP</channelplus>
- <channelminus>KEY_CHANNELDOWN</channelminus>
+ <pageplus>KEY_CHANNELUP</pageplus>
+ <pageminus>KEY_CHANNELDOWN</pageminus>
<skipplus>KEY_NEXTSONG</skipplus>
<skipplus>KEY_NEXT</skipplus>
<skipminus>KEY_PREVIOUSSONG</skipminus>
@@ -556,8 +556,8 @@
<reverse>KEY_REWIND</reverse>
<volumeplus>KEY_VOLUMEUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
- <channelplus>KEY_CHANNELUP</channelplus>
- <channelminus>KEY_CHANNELDOWN</channelminus>
+ <pageplus>KEY_CHANNELUP</pageplus>
+ <pageminus>KEY_CHANNELDOWN</pageminus>
<skipplus>KEY_NEXT</skipplus>
<skipminus>KEY_PREVIOUS</skipminus>
<title>KEY_EPG</title>
diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml
index 460634af96..b7050b093b 100644
--- a/system/keymaps/keyboard.xml
+++ b/system/keymaps/keyboard.xml
@@ -529,16 +529,20 @@
<keyboard>
<left>StepBack</left>
<right>StepForward</right>
- <up>ChannelUp</up>
- <down>ChannelDown</down>
+ <up>Up</up>
+ <down>Down</down>
+ <pageup>ChannelUp</pageup>
+ <pagedown>ChannelDown</pagedown>
</keyboard>
</FullscreenLiveTV>
<FullscreenRadio>
<keyboard>
<left>StepBack</left>
<right>StepForward</right>
- <up>ChannelUp</up>
- <down>ChannelDown</down>
+ <up>Up</up>
+ <down>Down</down>
+ <pageup>ChannelUp</pageup>
+ <pagedown>ChannelDown</pagedown>
</keyboard>
</FullscreenRadio>
<PVROSDChannels>
diff --git a/system/keymaps/remote.xml b/system/keymaps/remote.xml
index 7d5b9ee4de..7d4d3c0424 100644
--- a/system/keymaps/remote.xml
+++ b/system/keymaps/remote.xml
@@ -577,16 +577,20 @@
<remote>
<left>StepBack</left>
<right>StepForward</right>
- <up>ChannelUp</up>
- <down>ChannelDown</down>
+ <up>Up</up>
+ <down>Down</down>
+ <pageplus>ChannelUp</pageplus>
+ <pageminus>ChannelDown</pageminus>
</remote>
</FullscreenLiveTV>
<FullscreenRadio>
<remote>
<left>StepBack</left>
<right>StepForward</right>
- <up>ChannelUp</up>
- <down>ChannelDown</down>
+ <up>Up</up>
+ <down>Down</down>
+ <pageplus>ChannelUp</pageplus>
+ <pageminus>ChannelDown</pageminus>
</remote>
</FullscreenRadio>
<PVROSDChannels>
diff --git a/xbmc/cores/dvdplayer/DVDMessage.h b/xbmc/cores/dvdplayer/DVDMessage.h
index 274f2c7eba..7dc8589829 100644
--- a/xbmc/cores/dvdplayer/DVDMessage.h
+++ b/xbmc/cores/dvdplayer/DVDMessage.h
@@ -68,6 +68,8 @@ public:
PLAYER_CHANNEL_NEXT, // switches to next playback channel
PLAYER_CHANNEL_PREV, // switches to previous playback channel
+ PLAYER_CHANNEL_PREVIEW_NEXT, // switches to next channel preview (does not switch the channel)
+ PLAYER_CHANNEL_PREVIEW_PREV, // switches to previous channel preview (does not switch the channel)
PLAYER_CHANNEL_SELECT_NUMBER, // switches to the channel with the provided channel number
PLAYER_CHANNEL_SELECT, // switches to the provided channel
PLAYER_STARTED, // sent whenever a sub player has finished it's first frame after open
diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp
index 2a8a4750c4..1d8e4f615c 100644
--- a/xbmc/cores/dvdplayer/DVDPlayer.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp
@@ -2602,15 +2602,16 @@ void CDVDPlayer::HandleMessages()
CApplicationMessenger::Get().PostMsg(TMSG_MEDIA_STOP);
}
}
- else if (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_NEXT) || pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREV))
+ else if (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_NEXT) || pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREV) ||
+ pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_NEXT) || pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_PREV))
{
CDVDInputStream::IChannel* input = dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream);
- if(input)
+ if (input)
{
bool bSwitchSuccessful(false);
bool bShowPreview(!g_infoManager.IsPlayerOSDActive() &&
- (CSettings::Get().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH) ||
- CSettings::Get().GetInt(CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT) > 0));
+ (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_NEXT) ||
+ pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_PREV)));
if (!bShowPreview)
{
@@ -2618,12 +2619,12 @@ void CDVDPlayer::HandleMessages()
FlushBuffers(false);
}
- if(pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_NEXT))
+ if (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_NEXT) || pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREVIEW_NEXT))
bSwitchSuccessful = input->NextChannel(bShowPreview);
else
bSwitchSuccessful = input->PrevChannel(bShowPreview);
- if(bSwitchSuccessful)
+ if (bSwitchSuccessful)
{
if (bShowPreview)
{
@@ -4117,24 +4118,42 @@ bool CDVDPlayer::OnAction(const CAction &action)
case ACTION_MOVE_UP:
case ACTION_NEXT_ITEM:
case ACTION_CHANNEL_UP:
- m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_NEXT));
- if (g_infoManager.IsPlayerOSDActive() ||
- !CSettings::Get().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH))
+ {
+ bool bPreview(action.GetID() == ACTION_MOVE_UP && // only up/down shows a preview, all others do switch
+ (CSettings::Get().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH) ||
+ CSettings::Get().GetInt(CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT) > 0));
+
+ if (bPreview)
+ m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_PREVIEW_NEXT));
+ else
+ m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_NEXT));
+
+ if (!bPreview || g_infoManager.IsPlayerOSDActive())
g_infoManager.SetDisplayAfterSeek();
+
ShowPVRChannelInfo();
return true;
- break;
+ }
case ACTION_MOVE_DOWN:
case ACTION_PREV_ITEM:
case ACTION_CHANNEL_DOWN:
- m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_PREV));
- if (g_infoManager.IsPlayerOSDActive() ||
- !CSettings::Get().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH))
+ {
+ bool bPreview(action.GetID() == ACTION_MOVE_DOWN && // only up/down shows a preview, all others do switch
+ (CSettings::Get().GetBool(CSettings::SETTING_PVRPLAYBACK_CONFIRMCHANNELSWITCH) ||
+ CSettings::Get().GetInt(CSettings::SETTING_PVRPLAYBACK_CHANNELENTRYTIMEOUT) > 0));
+
+ if (bPreview)
+ m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_PREVIEW_PREV));
+ else
+ m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_PREV));
+
+ if (!bPreview || g_infoManager.IsPlayerOSDActive())
g_infoManager.SetDisplayAfterSeek();
+
ShowPVRChannelInfo();
return true;
- break;
+ }
case ACTION_CHANNEL_SWITCH:
{