1
0
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:
Klaus Schmidinger 2005-06-18 10:44:30 +02:00
parent f1ccf37128
commit 806aeb3c07
8 changed files with 95 additions and 38 deletions

View File

@ -1298,6 +1298,7 @@ Laurence Abbott <laz@club-burniston.co.uk>
Patrick Gleichmann <patrick@feedface.com>
for fixing the default quality value when grabbing a JPEG image
for suggestiong a modified page scrolling behaviour
for suggesting wrapping around in menu lists
Achim Tuffentsammer <a.tuffentsammer@web.de>
for reporting a crash in case a plugin needs to issue an error message before the

View File

@ -3613,8 +3613,10 @@ Video Disk Recorder Revision History
- 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.
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
Richter).
- 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
View File

@ -501,6 +501,13 @@ Version 1.2
will be at the top (bottom) of that page (this mode allows
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.
Timers are sorted by ascending start times, with the
first one being the next timer that will start.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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"
@ -250,6 +250,7 @@ cSetup::cSetup(void)
PrimaryDVB = 1;
ShowInfoOnChSwitch = 1;
MenuScrollPage = 1;
MenuScrollWrap = 0;
MarkInstantRecord = 1;
strcpy(NameInstantRecord, "TITLE EPISODE");
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, "ShowInfoOnChSwitch")) ShowInfoOnChSwitch = 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, "NameInstantRecord")) strn0cpy(NameInstantRecord, Value, MaxFileName);
else if (!strcasecmp(Name, "InstantRecordTime")) InstantRecordTime = atoi(Value);
@ -470,7 +472,7 @@ bool cSetup::Save(void)
Store("OSDTheme", OSDTheme);
Store("PrimaryDVB", PrimaryDVB);
Store("ShowInfoOnChSwitch", ShowInfoOnChSwitch);
Store("MenuScrollPage", MenuScrollPage);
Store("MenuScrollWrap", MenuScrollWrap);
Store("MarkInstantRecord", MarkInstantRecord);
Store("NameInstantRecord", NameInstantRecord);
Store("InstantRecordTime", InstantRecordTime);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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
@ -211,6 +211,7 @@ public:
int PrimaryDVB;
int ShowInfoOnChSwitch;
int MenuScrollPage;
int MenuScrollWrap;
int MarkInstantRecord;
char NameInstantRecord[MaxFileName];
int InstantRecordTime;

23
i18n.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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:
*
@ -2905,6 +2905,27 @@ const tI18nPhrase Phrases[] = {
"Lehekülje kerimine",
"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",
"Timer sortieren",
"Sortiraj termine",

3
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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"
@ -1845,6 +1845,7 @@ void cMenuSetupOSD::Set(void)
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$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$Recording directories"), &data.RecordingDirs));
SetCurrent(Get(current));

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* 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"
@ -261,35 +261,50 @@ bool cOsdMenu::SelectableItem(int idx)
void cOsdMenu::CursorUp(void)
{
if (current > 0) {
int tmpCurrent = current;
while (--tmpCurrent >= 0 && !SelectableItem(tmpCurrent))
;
if (tmpCurrent < 0)
int lastOnScreen = first + displayMenuItems - 1;
int last = Count() - 1;
while (--tmpCurrent != current) {
if (tmpCurrent < 0) {
if (Setup.MenuScrollWrap)
tmpCurrent = last;
else
return;
if (tmpCurrent >= first)
}
if (SelectableItem(tmpCurrent))
break;
}
if (first <= tmpCurrent && tmpCurrent <= lastOnScreen)
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)
{
int last = Count() - 1;
if (current < last) {
int lastOnScreen = first + displayMenuItems - 1;
int tmpCurrent = current;
while (++tmpCurrent <= last && !SelectableItem(tmpCurrent))
;
if (tmpCurrent > last)
int lastOnScreen = first + displayMenuItems - 1;
int last = Count() - 1;
while (++tmpCurrent != current) {
if (tmpCurrent > last) {
if (Setup.MenuScrollWrap)
tmpCurrent = 0;
else
return;
if (tmpCurrent <= lastOnScreen)
}
if (SelectableItem(tmpCurrent))
break;
}
if (first <= tmpCurrent && tmpCurrent <= lastOnScreen)
DisplayCurrent(false);
current = tmpCurrent;
if (current > lastOnScreen) {
@ -298,9 +313,12 @@ void cOsdMenu::CursorDown(void)
first = max(0, last - displayMenuItems + 1);
Display();
}
else if (current < first) {
first = current;
Display();
}
else
DisplayCurrent(true);
}
}
void cOsdMenu::PageUp(void)
@ -333,6 +351,8 @@ void cOsdMenu::PageUp(void)
Display();
DisplayCurrent(true);
}
else if (Setup.MenuScrollWrap)
CursorUp();
}
void cOsdMenu::PageDown(void)
@ -365,6 +385,8 @@ void cOsdMenu::PageDown(void)
Display();
DisplayCurrent(true);
}
else if (Setup.MenuScrollWrap)
CursorDown();
}
void cOsdMenu::Mark(void)