mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Implemented wrapping around in menu lists
This commit is contained in:
parent
f1ccf37128
commit
806aeb3c07
@ -1298,6 +1298,7 @@ Laurence Abbott <laz@club-burniston.co.uk>
|
|||||||
Patrick Gleichmann <patrick@feedface.com>
|
Patrick Gleichmann <patrick@feedface.com>
|
||||||
for fixing the default quality value when grabbing a JPEG image
|
for fixing the default quality value when grabbing a JPEG image
|
||||||
for suggestiong a modified page scrolling behaviour
|
for suggestiong a modified page scrolling behaviour
|
||||||
|
for suggesting wrapping around in menu lists
|
||||||
|
|
||||||
Achim Tuffentsammer <a.tuffentsammer@web.de>
|
Achim Tuffentsammer <a.tuffentsammer@web.de>
|
||||||
for reporting a crash in case a plugin needs to issue an error message before the
|
for reporting a crash in case a plugin needs to issue an error message before the
|
||||||
|
4
HISTORY
4
HISTORY
@ -3613,8 +3613,10 @@ Video Disk Recorder Revision History
|
|||||||
- Modified cEITScanner::Process() so that it works on systems with only budget cards
|
- Modified cEITScanner::Process() so that it works on systems with only budget cards
|
||||||
or a mix of DVB-S, DVB-C or DVB-T cards.
|
or a mix of DVB-S, DVB-C or DVB-T cards.
|
||||||
|
|
||||||
2005-06-17: Version 1.3.27
|
2005-06-18: Version 1.3.27
|
||||||
|
|
||||||
- Fixed handling 'page down', which was broken in version 1.3.26 (thanks to Udo
|
- Fixed handling 'page down', which was broken in version 1.3.26 (thanks to Udo
|
||||||
Richter).
|
Richter).
|
||||||
- Modified page scrolling behaviour (based on a suggestion by Patrick Gleichmann).
|
- Modified page scrolling behaviour (based on a suggestion by Patrick Gleichmann).
|
||||||
|
- The new setup option "OSD/Scroll wraps" can be used to activate wrapping around
|
||||||
|
in menu lists (based on a suggestion by Patrick Gleichmann).
|
||||||
|
7
MANUAL
7
MANUAL
@ -501,6 +501,13 @@ Version 1.2
|
|||||||
will be at the top (bottom) of that page (this mode allows
|
will be at the top (bottom) of that page (this mode allows
|
||||||
for faster scrolling through long lists).
|
for faster scrolling through long lists).
|
||||||
|
|
||||||
|
Scroll wraps = no no = when the end (beginning) of a list is reached while
|
||||||
|
moving the cursor through it, the cursor stays at the
|
||||||
|
last (first) line of the list
|
||||||
|
yes = the cursor "wraps around" and moves from the last
|
||||||
|
(first) line of the list directly to the first (last)
|
||||||
|
one.
|
||||||
|
|
||||||
Sort timers = yes Turns sorting the timers in the "Timers" menu on/off.
|
Sort timers = yes Turns sorting the timers in the "Timers" menu on/off.
|
||||||
Timers are sorted by ascending start times, with the
|
Timers are sorted by ascending start times, with the
|
||||||
first one being the next timer that will start.
|
first one being the next timer that will start.
|
||||||
|
6
config.c
6
config.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.c 1.133 2005/02/20 12:52:59 kls Exp $
|
* $Id: config.c 1.134 2005/06/18 10:30:02 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -250,6 +250,7 @@ cSetup::cSetup(void)
|
|||||||
PrimaryDVB = 1;
|
PrimaryDVB = 1;
|
||||||
ShowInfoOnChSwitch = 1;
|
ShowInfoOnChSwitch = 1;
|
||||||
MenuScrollPage = 1;
|
MenuScrollPage = 1;
|
||||||
|
MenuScrollWrap = 0;
|
||||||
MarkInstantRecord = 1;
|
MarkInstantRecord = 1;
|
||||||
strcpy(NameInstantRecord, "TITLE EPISODE");
|
strcpy(NameInstantRecord, "TITLE EPISODE");
|
||||||
InstantRecordTime = 180;
|
InstantRecordTime = 180;
|
||||||
@ -407,6 +408,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
|
|||||||
else if (!strcasecmp(Name, "PrimaryDVB")) PrimaryDVB = atoi(Value);
|
else if (!strcasecmp(Name, "PrimaryDVB")) PrimaryDVB = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "ShowInfoOnChSwitch")) ShowInfoOnChSwitch = atoi(Value);
|
else if (!strcasecmp(Name, "ShowInfoOnChSwitch")) ShowInfoOnChSwitch = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "MenuScrollPage")) MenuScrollPage = atoi(Value);
|
else if (!strcasecmp(Name, "MenuScrollPage")) MenuScrollPage = atoi(Value);
|
||||||
|
else if (!strcasecmp(Name, "MenuScrollWrap")) MenuScrollWrap = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "MarkInstantRecord")) MarkInstantRecord = atoi(Value);
|
else if (!strcasecmp(Name, "MarkInstantRecord")) MarkInstantRecord = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "NameInstantRecord")) strn0cpy(NameInstantRecord, Value, MaxFileName);
|
else if (!strcasecmp(Name, "NameInstantRecord")) strn0cpy(NameInstantRecord, Value, MaxFileName);
|
||||||
else if (!strcasecmp(Name, "InstantRecordTime")) InstantRecordTime = atoi(Value);
|
else if (!strcasecmp(Name, "InstantRecordTime")) InstantRecordTime = atoi(Value);
|
||||||
@ -470,7 +472,7 @@ bool cSetup::Save(void)
|
|||||||
Store("OSDTheme", OSDTheme);
|
Store("OSDTheme", OSDTheme);
|
||||||
Store("PrimaryDVB", PrimaryDVB);
|
Store("PrimaryDVB", PrimaryDVB);
|
||||||
Store("ShowInfoOnChSwitch", ShowInfoOnChSwitch);
|
Store("ShowInfoOnChSwitch", ShowInfoOnChSwitch);
|
||||||
Store("MenuScrollPage", MenuScrollPage);
|
Store("MenuScrollWrap", MenuScrollWrap);
|
||||||
Store("MarkInstantRecord", MarkInstantRecord);
|
Store("MarkInstantRecord", MarkInstantRecord);
|
||||||
Store("NameInstantRecord", NameInstantRecord);
|
Store("NameInstantRecord", NameInstantRecord);
|
||||||
Store("InstantRecordTime", InstantRecordTime);
|
Store("InstantRecordTime", InstantRecordTime);
|
||||||
|
3
config.h
3
config.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.h 1.220 2005/06/12 15:06:19 kls Exp $
|
* $Id: config.h 1.221 2005/06/18 10:29:25 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CONFIG_H
|
#ifndef __CONFIG_H
|
||||||
@ -211,6 +211,7 @@ public:
|
|||||||
int PrimaryDVB;
|
int PrimaryDVB;
|
||||||
int ShowInfoOnChSwitch;
|
int ShowInfoOnChSwitch;
|
||||||
int MenuScrollPage;
|
int MenuScrollPage;
|
||||||
|
int MenuScrollWrap;
|
||||||
int MarkInstantRecord;
|
int MarkInstantRecord;
|
||||||
char NameInstantRecord[MaxFileName];
|
char NameInstantRecord[MaxFileName];
|
||||||
int InstantRecordTime;
|
int InstantRecordTime;
|
||||||
|
23
i18n.c
23
i18n.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: i18n.c 1.194 2005/06/05 11:59:09 kls Exp $
|
* $Id: i18n.c 1.195 2005/06/18 10:42:31 kls Exp $
|
||||||
*
|
*
|
||||||
* Translations provided by:
|
* Translations provided by:
|
||||||
*
|
*
|
||||||
@ -2905,6 +2905,27 @@ const tI18nPhrase Phrases[] = {
|
|||||||
"Lehekülje kerimine",
|
"Lehekülje kerimine",
|
||||||
"Rul sider",
|
"Rul sider",
|
||||||
},
|
},
|
||||||
|
{ "Setup.OSD$Scroll wraps",
|
||||||
|
"Rundum scrollen",
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
"",// TODO
|
||||||
|
},
|
||||||
{ "Setup.OSD$Sort timers",
|
{ "Setup.OSD$Sort timers",
|
||||||
"Timer sortieren",
|
"Timer sortieren",
|
||||||
"Sortiraj termine",
|
"Sortiraj termine",
|
||||||
|
3
menu.c
3
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.c 1.350 2005/06/05 14:11:54 kls Exp $
|
* $Id: menu.c 1.351 2005/06/18 10:31:52 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -1845,6 +1845,7 @@ void cMenuSetupOSD::Set(void)
|
|||||||
Add(new cMenuEditIntItem( tr("Setup.OSD$Channel info time (s)"), &data.ChannelInfoTime, 1, 60));
|
Add(new cMenuEditIntItem( tr("Setup.OSD$Channel info time (s)"), &data.ChannelInfoTime, 1, 60));
|
||||||
Add(new cMenuEditBoolItem(tr("Setup.OSD$Info on channel switch"), &data.ShowInfoOnChSwitch));
|
Add(new cMenuEditBoolItem(tr("Setup.OSD$Info on channel switch"), &data.ShowInfoOnChSwitch));
|
||||||
Add(new cMenuEditBoolItem(tr("Setup.OSD$Scroll pages"), &data.MenuScrollPage));
|
Add(new cMenuEditBoolItem(tr("Setup.OSD$Scroll pages"), &data.MenuScrollPage));
|
||||||
|
Add(new cMenuEditBoolItem(tr("Setup.OSD$Scroll wraps"), &data.MenuScrollWrap));
|
||||||
Add(new cMenuEditBoolItem(tr("Setup.OSD$Sort timers"), &data.SortTimers));
|
Add(new cMenuEditBoolItem(tr("Setup.OSD$Sort timers"), &data.SortTimers));
|
||||||
Add(new cMenuEditBoolItem(tr("Setup.OSD$Recording directories"), &data.RecordingDirs));
|
Add(new cMenuEditBoolItem(tr("Setup.OSD$Recording directories"), &data.RecordingDirs));
|
||||||
SetCurrent(Get(current));
|
SetCurrent(Get(current));
|
||||||
|
86
osdbase.c
86
osdbase.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: osdbase.c 1.19 2005/06/17 15:35:27 kls Exp $
|
* $Id: osdbase.c 1.20 2005/06/18 10:30:51 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osdbase.h"
|
#include "osdbase.h"
|
||||||
@ -261,46 +261,64 @@ bool cOsdMenu::SelectableItem(int idx)
|
|||||||
|
|
||||||
void cOsdMenu::CursorUp(void)
|
void cOsdMenu::CursorUp(void)
|
||||||
{
|
{
|
||||||
if (current > 0) {
|
int tmpCurrent = current;
|
||||||
int tmpCurrent = current;
|
int lastOnScreen = first + displayMenuItems - 1;
|
||||||
while (--tmpCurrent >= 0 && !SelectableItem(tmpCurrent))
|
int last = Count() - 1;
|
||||||
;
|
while (--tmpCurrent != current) {
|
||||||
if (tmpCurrent < 0)
|
if (tmpCurrent < 0) {
|
||||||
return;
|
if (Setup.MenuScrollWrap)
|
||||||
if (tmpCurrent >= first)
|
tmpCurrent = last;
|
||||||
DisplayCurrent(false);
|
else
|
||||||
current = tmpCurrent;
|
return;
|
||||||
if (current < first) {
|
}
|
||||||
first = Setup.MenuScrollPage ? max(0, current - displayMenuItems + 1) : current;
|
if (SelectableItem(tmpCurrent))
|
||||||
Display();
|
break;
|
||||||
}
|
}
|
||||||
else
|
if (first <= tmpCurrent && tmpCurrent <= lastOnScreen)
|
||||||
DisplayCurrent(true);
|
DisplayCurrent(false);
|
||||||
|
current = tmpCurrent;
|
||||||
|
if (current < first) {
|
||||||
|
first = Setup.MenuScrollPage ? max(0, current - displayMenuItems + 1) : current;
|
||||||
|
Display();
|
||||||
}
|
}
|
||||||
|
else if (current > lastOnScreen) {
|
||||||
|
first = max(0, current - displayMenuItems + 1);
|
||||||
|
Display();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
DisplayCurrent(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cOsdMenu::CursorDown(void)
|
void cOsdMenu::CursorDown(void)
|
||||||
{
|
{
|
||||||
|
int tmpCurrent = current;
|
||||||
|
int lastOnScreen = first + displayMenuItems - 1;
|
||||||
int last = Count() - 1;
|
int last = Count() - 1;
|
||||||
if (current < last) {
|
while (++tmpCurrent != current) {
|
||||||
int lastOnScreen = first + displayMenuItems - 1;
|
if (tmpCurrent > last) {
|
||||||
int tmpCurrent = current;
|
if (Setup.MenuScrollWrap)
|
||||||
while (++tmpCurrent <= last && !SelectableItem(tmpCurrent))
|
tmpCurrent = 0;
|
||||||
;
|
else
|
||||||
if (tmpCurrent > last)
|
return;
|
||||||
return;
|
}
|
||||||
if (tmpCurrent <= lastOnScreen)
|
if (SelectableItem(tmpCurrent))
|
||||||
DisplayCurrent(false);
|
break;
|
||||||
current = tmpCurrent;
|
|
||||||
if (current > lastOnScreen) {
|
|
||||||
first = Setup.MenuScrollPage ? current : max(0, current - displayMenuItems + 1);
|
|
||||||
if (first + displayMenuItems > last)
|
|
||||||
first = max(0, last - displayMenuItems + 1);
|
|
||||||
Display();
|
|
||||||
}
|
}
|
||||||
else
|
if (first <= tmpCurrent && tmpCurrent <= lastOnScreen)
|
||||||
DisplayCurrent(true);
|
DisplayCurrent(false);
|
||||||
|
current = tmpCurrent;
|
||||||
|
if (current > lastOnScreen) {
|
||||||
|
first = Setup.MenuScrollPage ? current : max(0, current - displayMenuItems + 1);
|
||||||
|
if (first + displayMenuItems > last)
|
||||||
|
first = max(0, last - displayMenuItems + 1);
|
||||||
|
Display();
|
||||||
}
|
}
|
||||||
|
else if (current < first) {
|
||||||
|
first = current;
|
||||||
|
Display();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
DisplayCurrent(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cOsdMenu::PageUp(void)
|
void cOsdMenu::PageUp(void)
|
||||||
@ -333,6 +351,8 @@ void cOsdMenu::PageUp(void)
|
|||||||
Display();
|
Display();
|
||||||
DisplayCurrent(true);
|
DisplayCurrent(true);
|
||||||
}
|
}
|
||||||
|
else if (Setup.MenuScrollWrap)
|
||||||
|
CursorUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cOsdMenu::PageDown(void)
|
void cOsdMenu::PageDown(void)
|
||||||
@ -365,6 +385,8 @@ void cOsdMenu::PageDown(void)
|
|||||||
Display();
|
Display();
|
||||||
DisplayCurrent(true);
|
DisplayCurrent(true);
|
||||||
}
|
}
|
||||||
|
else if (Setup.MenuScrollWrap)
|
||||||
|
CursorDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cOsdMenu::Mark(void)
|
void cOsdMenu::Mark(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user