aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Sommerfeld <kai.sommerfeld@gmx.com>2015-11-06 14:17:33 +0100
committerKai Sommerfeld <kai.sommerfeld@gmx.com>2015-11-06 14:17:33 +0100
commit0775eb918bdd969a13843561b5c049d20f9ad0ce (patch)
treea7ff2226f1c02b9b8aced7262ebdb2edfd853499
parent64d5fb583d219a1361ba90181f0aa3b3f366c2a5 (diff)
parent57551597ec8481a0122706c406812e63d05e067e (diff)
Merge pull request #8357 from ksooo/fix-readonly-timersettings
[PVR] Fix: Do not try to update read-only timers.
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRTimers.cpp29
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRTimers.h1
2 files changed, 2 insertions, 28 deletions
diff --git a/xbmc/pvr/windows/GUIWindowPVRTimers.cpp b/xbmc/pvr/windows/GUIWindowPVRTimers.cpp
index fdf78a3f7d..f264f7d4de 100644
--- a/xbmc/pvr/windows/GUIWindowPVRTimers.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRTimers.cpp
@@ -302,7 +302,7 @@ bool CGUIWindowPVRTimers::OnContextButtonEdit(CFileItem *item, CONTEXT_BUTTON bu
if (!item->HasPVRTimerInfoTag())
return bReturn;
- if (ShowTimerSettings(item))
+ if (ShowTimerSettings(item) && !item->GetPVRTimerInfoTag()->GetTimerType()->IsReadOnly())
g_PVRTimers->UpdateTimer(*item);
}
@@ -381,7 +381,7 @@ bool CGUIWindowPVRTimers::ActionShowTimer(CFileItem *item)
}
else
{
- if (ShowTimerSettings(item))
+ if (ShowTimerSettings(item) && !item->GetPVRTimerInfoTag()->GetTimerType()->IsReadOnly())
{
/* Update timer on pvr backend */
bReturn = g_PVRTimers->UpdateTimer(*item);
@@ -408,28 +408,3 @@ bool CGUIWindowPVRTimers::ShowNewTimerDialog(void)
return bReturn;
}
-
-bool CGUIWindowPVRTimers::ShowTimerSettings(CFileItem *item)
-{
- /* Check item is TV timer information tag */
- if (!item->IsPVRTimer())
- {
- CLog::Log(LOGERROR, "CGUIWindowPVRTimers: Can't open timer settings dialog, no timer info tag!");
- return false;
- }
-
- /* Load timer settings dialog */
- CGUIDialogPVRTimerSettings* pDlgInfo = (CGUIDialogPVRTimerSettings*)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_TIMER_SETTING);
-
- if (!pDlgInfo)
- return false;
-
- /* inform dialog about the file item */
- pDlgInfo->SetTimer(item);
-
- /* Open dialog window */
- pDlgInfo->Open();
-
- /* Get modify flag from window and return it to caller */
- return pDlgInfo->IsConfirmed();
-}
diff --git a/xbmc/pvr/windows/GUIWindowPVRTimers.h b/xbmc/pvr/windows/GUIWindowPVRTimers.h
index 9480edab59..f474a18720 100644
--- a/xbmc/pvr/windows/GUIWindowPVRTimers.h
+++ b/xbmc/pvr/windows/GUIWindowPVRTimers.h
@@ -49,7 +49,6 @@ namespace PVR
private:
bool ActionDeleteTimer(CFileItem *item);
bool ActionShowTimer(CFileItem *item);
- bool ShowTimerSettings(CFileItem *item);
bool ShowNewTimerDialog(void);
bool OnContextButtonActivate(CFileItem *item, CONTEXT_BUTTON button);