mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed setting the initial offset of the cursor in a list menu
This commit is contained in:
parent
53aea17949
commit
e1a71ce7cc
@ -3310,6 +3310,7 @@ Matthias Senzel <matthias.senzel@t-online.de>
|
|||||||
lock is held while the error message is displayed
|
lock is held while the error message is displayed
|
||||||
for reporting that the info of a newly edited recording was not available immediately
|
for reporting that the info of a newly edited recording was not available immediately
|
||||||
after starting the editing process
|
after starting the editing process
|
||||||
|
for reporting a problem with setting the initial offset of the cursor in a list menu
|
||||||
|
|
||||||
Marek Nazarko <mnazarko@gmail.com>
|
Marek Nazarko <mnazarko@gmail.com>
|
||||||
for translating OSD texts to the Polish language
|
for translating OSD texts to the Polish language
|
||||||
|
2
HISTORY
2
HISTORY
@ -9329,3 +9329,5 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed a possible discrepancy of the primary device number in the LSTD and PRIM
|
- Fixed a possible discrepancy of the primary device number in the LSTD and PRIM
|
||||||
commands, by setting Setup.PrimaryDVB in cDevice::SetPrimaryDevice() (reported by
|
commands, by setting Setup.PrimaryDVB in cDevice::SetPrimaryDevice() (reported by
|
||||||
Jürgen Schneider).
|
Jürgen Schneider).
|
||||||
|
- Fixed setting the initial offset of the cursor in a list menu (reported by Matthias
|
||||||
|
Senzel).
|
||||||
|
8
menu.c
8
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 4.69 2018/03/18 12:01:09 kls Exp $
|
* $Id: menu.c 4.70 2018/03/24 11:43:40 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -3010,6 +3010,7 @@ void cMenuRecordings::Set(bool Refresh)
|
|||||||
Clear();
|
Clear();
|
||||||
GetRecordingsSortMode(DirectoryName());
|
GetRecordingsSortMode(DirectoryName());
|
||||||
Recordings->Sort();
|
Recordings->Sort();
|
||||||
|
cMenuRecordingItem *CurrentItem = NULL;
|
||||||
cMenuRecordingItem *LastItem = NULL;
|
cMenuRecordingItem *LastItem = NULL;
|
||||||
for (const cRecording *Recording = Recordings->First(); Recording; Recording = Recordings->Next(Recording)) {
|
for (const cRecording *Recording = Recordings->First(); Recording; Recording = Recordings->Next(Recording)) {
|
||||||
if ((!filter || filter->Filter(Recording)) && (!base || (strstr(Recording->Name(), base) == Recording->Name() && Recording->Name()[strlen(base)] == FOLDERDELIMCHAR))) {
|
if ((!filter || filter->Filter(Recording)) && (!base || (strstr(Recording->Name(), base) == Recording->Name() && Recording->Name()[strlen(base)] == FOLDERDELIMCHAR))) {
|
||||||
@ -3035,15 +3036,16 @@ void cMenuRecordings::Set(bool Refresh)
|
|||||||
if (LastItem || LastDir) {
|
if (LastItem || LastDir) {
|
||||||
if (*path) {
|
if (*path) {
|
||||||
if (strcmp(path, Recording->Folder()) == 0)
|
if (strcmp(path, Recording->Folder()) == 0)
|
||||||
SetCurrent(LastDir ? LastDir : LastItem);
|
CurrentItem = LastDir ? LastDir : LastItem;
|
||||||
}
|
}
|
||||||
else if (CurrentRecording && strcmp(CurrentRecording, Recording->FileName()) == 0)
|
else if (CurrentRecording && strcmp(CurrentRecording, Recording->FileName()) == 0)
|
||||||
SetCurrent(LastDir ? LastDir : LastItem);
|
CurrentItem = LastDir ? LastDir : LastItem;
|
||||||
}
|
}
|
||||||
if (LastDir)
|
if (LastDir)
|
||||||
LastDir->IncrementCounter(Recording->IsNew());
|
LastDir->IncrementCounter(Recording->IsNew());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SetCurrent(CurrentItem);
|
||||||
if (Current() < 0)
|
if (Current() < 0)
|
||||||
SetCurrent(Get(current)); // last resort, in case the recording was deleted
|
SetCurrent(Get(current)); // last resort, in case the recording was deleted
|
||||||
SetMenuSortMode(RecordingsSortMode == rsmName ? msmName : msmTime);
|
SetMenuSortMode(RecordingsSortMode == rsmName ? msmName : msmTime);
|
||||||
|
@ -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 4.4 2018/03/06 10:38:18 kls Exp $
|
* $Id: osdbase.c 4.5 2018/03/24 11:47:45 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osdbase.h"
|
#include "osdbase.h"
|
||||||
@ -330,6 +330,7 @@ void cOsdMenu::Clear(void)
|
|||||||
{
|
{
|
||||||
if (marked >= 0)
|
if (marked >= 0)
|
||||||
SetStatus(NULL);
|
SetStatus(NULL);
|
||||||
|
if (current >= 0)
|
||||||
lastOffset = (current > first) ? current - first : 0;
|
lastOffset = (current > first) ? current - first : 0;
|
||||||
first = 0;
|
first = 0;
|
||||||
current = marked = -1;
|
current = marked = -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user