aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxhaggi <sascha.woo@gmail.com>2013-12-28 11:30:07 +0100
committerxhaggi <sascha.woo@gmail.com>2013-12-28 15:50:56 +0100
commitb14d820d521b2d9ae2fae2f7f07eeaf75639a87f (patch)
tree485b1d597e13060327153e7d4eb14826898e780c
parentbcac867529a2c189c7f18fff6547bf68c826f21e (diff)
[pvr] refactor advanced setting showepginfoonselect to setting
This removes the advanced setting showepginfoonselect and adds it to settings, so users can change it within the gui. In addition, the setting is extended and you can now select the following values: * Show context menu * Switch to channel * Show information * Record
-rwxr-xr-xlanguage/English/strings.po27
-rw-r--r--system/settings/settings.xml13
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRCommon.h8
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRGuide.cpp19
-rw-r--r--xbmc/settings/AdvancedSettings.cpp2
-rw-r--r--xbmc/settings/AdvancedSettings.h1
6 files changed, 62 insertions, 8 deletions
diff --git a/language/English/strings.po b/language/English/strings.po
index 80c02aadca..5266806c7e 100755
--- a/language/English/strings.po
+++ b/language/English/strings.po
@@ -14703,7 +14703,32 @@ msgctxt "#36423"
msgid "Use ffmpeg frame multiple thread decoding when hardware decoding not working or disabled. (less reliable than default single thread mode)"
msgstr ""
-#empty strings from id 36424 to 36499
+#: system/settings/settings.xml
+msgctxt "#36424"
+msgid "No description available"
+msgstr ""
+
+#: system/settings/settings.xml
+msgctxt "#36425"
+msgid "Show context menu"
+msgstr ""
+
+#: system/settings/settings.xml
+msgctxt "#36426"
+msgid "Switch to channel"
+msgstr ""
+
+#: system/settings/settings.xml
+msgctxt "#36427"
+msgid "Show information"
+msgstr ""
+
+#: system/settings/settings.xml
+msgctxt "#36428"
+msgid "Record"
+msgstr ""
+
+#empty strings from id 36429 to 36499
#end reservation
#: system/settings/settings.xml
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index 799fe161e8..71b3b2f23a 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -1025,6 +1025,19 @@
<formatlabel>14044</formatlabel>
</control>
</setting>
+ <setting id="epg.selectaction" type="integer" label="22079" help="36424">
+ <level>1</level>
+ <default>0</default> <!-- EPG_SELECT_ACTION_CONTEXT_MENU -->
+ <constraints>
+ <options>
+ <option label="36425">0</option> <!-- EPG_SELECT_ACTION_CONTEXT_MENU -->
+ <option label="36426">1</option> <!-- EPG_SELECT_ACTION_SWITCH -->
+ <option label="36427">2</option> <!-- EPG_SELECT_ACTION_INFO -->
+ <option label="36428">3</option> <!-- EPG_SELECT_ACTION_RECORD -->
+ </options>
+ </constraints>
+ <control type="spinner" format="string" />
+ </setting>
<setting id="epg.preventupdateswhileplayingtv" type="boolean" label="19230" help="36222">
<level>1</level>
<default>false</default>
diff --git a/xbmc/pvr/windows/GUIWindowPVRCommon.h b/xbmc/pvr/windows/GUIWindowPVRCommon.h
index 1d65bff40f..7320c56f94 100644
--- a/xbmc/pvr/windows/GUIWindowPVRCommon.h
+++ b/xbmc/pvr/windows/GUIWindowPVRCommon.h
@@ -38,6 +38,14 @@ namespace PVR
PVR_WINDOW_SEARCH = 6
};
+ enum EPGSelectAction
+ {
+ EPG_SELECT_ACTION_CONTEXT_MENU = 0,
+ EPG_SELECT_ACTION_SWITCH = 1,
+ EPG_SELECT_ACTION_INFO = 2,
+ EPG_SELECT_ACTION_RECORD = 3
+ };
+
#define CONTROL_LIST_TIMELINE 10
#define CONTROL_LIST_CHANNELS_TV 11
#define CONTROL_LIST_CHANNELS_RADIO 12
diff --git a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp
index 6478c819e6..23b10ef16d 100644
--- a/xbmc/pvr/windows/GUIWindowPVRGuide.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRGuide.cpp
@@ -369,10 +369,21 @@ bool CGUIWindowPVRGuide::OnClickList(CGUIMessage &message)
{
case ACTION_SELECT_ITEM:
case ACTION_MOUSE_LEFT_CLICK:
- if (!g_advancedSettings.m_bPVRShowEpgInfoOnEpgItemSelect && pItem->GetEPGInfoTag()->IsActive())
- ActionPlayEpg(pItem.get());
- else
- ShowEPGInfo(pItem.get());
+ switch(CSettings::Get().GetInt("epg.selectaction"))
+ {
+ case EPG_SELECT_ACTION_CONTEXT_MENU:
+ m_parent->OnPopupMenu(iItem);
+ break;
+ case EPG_SELECT_ACTION_SWITCH:
+ ActionPlayEpg(pItem.get());
+ break;
+ case EPG_SELECT_ACTION_INFO:
+ ShowEPGInfo(pItem.get());
+ break;
+ case EPG_SELECT_ACTION_RECORD:
+ ActionRecord(pItem.get());
+ break;
+ }
break;
case ACTION_SHOW_INFO:
ShowEPGInfo(pItem.get());
diff --git a/xbmc/settings/AdvancedSettings.cpp b/xbmc/settings/AdvancedSettings.cpp
index 06f40b1ecb..6980cc7e0b 100644
--- a/xbmc/settings/AdvancedSettings.cpp
+++ b/xbmc/settings/AdvancedSettings.cpp
@@ -361,7 +361,6 @@ void CAdvancedSettings::Initialize()
m_iPVRTimeCorrection = 0;
m_iPVRInfoToggleInterval = 3000;
- m_bPVRShowEpgInfoOnEpgItemSelect = false;
m_iPVRMinVideoCacheLevel = 5;
m_iPVRMinAudioCacheLevel = 10;
m_bPVRCacheInDvdPlayer = true;
@@ -1096,7 +1095,6 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file)
{
XMLUtils::GetInt(pPVR, "timecorrection", m_iPVRTimeCorrection, 0, 1440);
XMLUtils::GetInt(pPVR, "infotoggleinterval", m_iPVRInfoToggleInterval, 0, 30000);
- XMLUtils::GetBoolean(pPVR, "showepginfoonselect", m_bPVRShowEpgInfoOnEpgItemSelect);
XMLUtils::GetInt(pPVR, "minvideocachelevel", m_iPVRMinVideoCacheLevel, 0, 100);
XMLUtils::GetInt(pPVR, "minaudiocachelevel", m_iPVRMinAudioCacheLevel, 0, 100);
XMLUtils::GetBoolean(pPVR, "cacheindvdplayer", m_bPVRCacheInDvdPlayer);
diff --git a/xbmc/settings/AdvancedSettings.h b/xbmc/settings/AdvancedSettings.h
index 7d16957930..88d2cde6ed 100644
--- a/xbmc/settings/AdvancedSettings.h
+++ b/xbmc/settings/AdvancedSettings.h
@@ -358,7 +358,6 @@ class CAdvancedSettings : public ISettingCallback, public ISettingsHandler
/* PVR/TV related advanced settings */
int m_iPVRTimeCorrection; /*!< @brief correct all times (epg tags, timer tags, recording tags) by this amount of minutes. defaults to 0. */
int m_iPVRInfoToggleInterval; /*!< @brief if there are more than 1 pvr gui info item available (e.g. multiple recordings active at the same time), use this toggle delay in milliseconds. defaults to 3000. */
- bool m_bPVRShowEpgInfoOnEpgItemSelect; /*!< @brief when selecting an EPG fileitem, show the EPG info dialog if this setting is true. start playback on the selected channel if false AND fileitem has started */
int m_iPVRMinVideoCacheLevel; /*!< @brief cache up to this level in the video buffer buffer before resuming playback if the buffers run dry */
int m_iPVRMinAudioCacheLevel; /*!< @brief cache up to this level in the audio buffer before resuming playback if the buffers run dry */
bool m_bPVRCacheInDvdPlayer; /*!< @brief true to use "CACHESTATE_PVR" in CDVDPlayer (default) */