diff options
author | louis <louis.braun@gmx.de> | 2015-06-26 15:18:30 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-06-26 15:18:30 +0200 |
commit | 2e318bd480ee8cef7c2e717aa1b09bd717f3004d (patch) | |
tree | a767b56f845d2a431893d841a385956027b8f9d0 | |
parent | 4d4f81b6e35d9fdee68c169d0d569e178050a475 (diff) | |
download | vdr-plugin-tvguideng-2e318bd480ee8cef7c2e717aa1b09bd717f3004d.tar.gz vdr-plugin-tvguideng-2e318bd480ee8cef7c2e717aa1b09bd717f3004d.tar.bz2 |
added shortcuts for keys 2, 5 and 8
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | recmenuview.c | 10 | ||||
-rw-r--r-- | recmenuview.h | 2 | ||||
-rw-r--r-- | tvguidengosd.c | 53 | ||||
-rw-r--r-- | tvguidengosd.h | 3 |
6 files changed, 71 insertions, 2 deletions
@@ -38,3 +38,4 @@ Version 0.1.2 Version 0.1.3 - added optional intelligent channel switch mode +- added shortcuts for keys 2, 5 and 8 @@ -65,7 +65,9 @@ input. If "Timely Jump" is configured, the keys are used as follows: 1 / 3: Big jump (default 3h) back / forward in time 4 / 6: huge jump (default 24h) back / forward in time 7 / 9: jump to previous / next prime time (8pm) - +2: create or delete instant timer for selected event +5: display "search in recordings" menu +8: display "search" menu Exit: closes plugin In Search & Recording menu the following options are available: diff --git a/recmenuview.c b/recmenuview.c index 30522b5..a4c8ceb 100644 --- a/recmenuview.c +++ b/recmenuview.c @@ -54,6 +54,16 @@ void cRecMenuView::DisplayFavorites(void) { DisplayMenu();
}
+void cRecMenuView::DisplayRecSearch(const cEvent *e) {
+ activeMenu = new cRecMenuRecordingSearch(e->Title() ? e->Title() : "");
+ DisplayMenu();
+}
+
+void cRecMenuView::DisplaySearchEPG(const cEvent *e) {
+ activeMenu = new cRecMenuSearch(e->Title() ? e->Title() : "", false);
+ DisplayMenu();
+}
+
void cRecMenuView::Close(void) {
if (activeMenu) {
delete activeMenu;
diff --git a/recmenuview.h b/recmenuview.h index 81cd543..6f1d03a 100644 --- a/recmenuview.h +++ b/recmenuview.h @@ -32,6 +32,8 @@ public: void Init(skindesignerapi::cOsdView *recMenuView, skindesignerapi::cOsdView *recMenuViewBuffer, skindesignerapi::cOsdView *recMenuViewBuffer2);
void DisplayRecMenu(const cEvent *event);
void DisplayFavorites(void);
+ void DisplayRecSearch(const cEvent *e);
+ void DisplaySearchEPG(const cEvent *e);
void Close(void);
void Hide(bool full = false);
void Activate(bool full = false);
diff --git a/tvguidengosd.c b/tvguidengosd.c index 7e521d9..a59e092 100644 --- a/tvguidengosd.c +++ b/tvguidengosd.c @@ -260,7 +260,15 @@ void cTVGuideOSD::ChannelsBack(void) { void cTVGuideOSD::NumericKey(int key) { if (config.numKeyMode == eTimeJump) { - NumericKeyTimeJump(key); + if (key == 2) { + CreateInstantTimer(); + } else if (key == 5) { + DisplaySearchRecordings(); + } else if (key == 8) { + DisplaySearchEPG(); + } else { + NumericKeyTimeJump(key); + } } else if (config.numKeyMode == eChannelJump) { NumericKeyChannelJump(key); } @@ -447,6 +455,8 @@ eOSState cTVGuideOSD::ChannelSwitch(const cEvent *e) { void cTVGuideOSD::CreateSwitchTimer(const cEvent *e) { if (!e) return; + if (SwitchTimers.EventInSwitchList(e)) + return; cSwitchTimer st; st.switchMinsBefore = 2; st.announceOnly = 0; @@ -501,3 +511,44 @@ void cTVGuideOSD::Favorites(void) { recMenuView->DisplayFavorites(); recMenuView->Flush(); } + +void cTVGuideOSD::CreateInstantTimer(void) { + const cEvent *e = epgGrid->GetCurrentEvent(); + if (!e) + return; + cRecManager recManager; + recManager.SetEPGSearchPlugin(); + if (!e->HasTimer()) + recManager.createTimer(e, ""); + else + recManager.DeleteTimer(e); + epgGrid->SetTimers(); + epgGrid->DrawGrid(); + epgGrid->Flush(); +} + +void cTVGuideOSD::DisplaySearchRecordings(void) { + const cEvent *e = epgGrid->GetCurrentEvent(); + if (!e) + return; + epgGrid->Deactivate(false); + skindesignerapi::cOsdView *recView = GetOsdView(viRootView, viRecMenu); + skindesignerapi::cOsdView *recViewBuffer = GetOsdView(viRootView, viRecMenu); + skindesignerapi::cOsdView *recViewBuffer2 = GetOsdView(viRootView, viRecMenu); + recMenuView->Init(recView, recViewBuffer, recViewBuffer2); + recMenuView->DisplayRecSearch(e); + recMenuView->Flush(); +} + +void cTVGuideOSD::DisplaySearchEPG(void) { + const cEvent *e = epgGrid->GetCurrentEvent(); + if (!e) + return; + epgGrid->Deactivate(false); + skindesignerapi::cOsdView *recView = GetOsdView(viRootView, viRecMenu); + skindesignerapi::cOsdView *recViewBuffer = GetOsdView(viRootView, viRecMenu); + skindesignerapi::cOsdView *recViewBuffer2 = GetOsdView(viRootView, viRecMenu); + recMenuView->Init(recView, recViewBuffer, recViewBuffer2); + recMenuView->DisplaySearchEPG(e); + recMenuView->Flush(); +} diff --git a/tvguidengosd.h b/tvguidengosd.h index 6fb310a..4b8dc82 100644 --- a/tvguidengosd.h +++ b/tvguidengosd.h @@ -88,6 +88,9 @@ private: eOSState ChannelSwitch(const cEvent *e); void CreateSwitchTimer(const cEvent *e); void Favorites(void); + void CreateInstantTimer(void); + void DisplaySearchRecordings(void); + void DisplaySearchEPG(void); public: cTVGuideOSD(void); virtual ~cTVGuideOSD(void); |