1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

When selecting a folder for a recording or timer, it is now possible to open a folder even if it doesn't contain any subfolders

This commit is contained in:
Klaus Schmidinger 2017-12-15 13:43:00 +01:00
parent 05bfa4b476
commit 477fb7dc20
31 changed files with 23 additions and 104 deletions

View File

@ -3294,6 +3294,8 @@ Matthias Senzel <matthias.senzel@t-online.de>
for reporting problem with locking the Recordings list in the cutting process
for suggesting to change the log message ""ERROR: copying directory '%s' to '%s' ended
prematurely" from "error" to "info"
for suggesting to allow opening a folder when selecting a folder for a recording or
timer, even if it doesn't contain any subfolders
Marek Nazarko <mnazarko@gmail.com>
for translating OSD texts to the Polish language

View File

@ -9162,7 +9162,7 @@ Video Disk Recorder Revision History
a subdirectory.
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
2017-12-14: Version 2.3.9
2017-12-15: Version 2.3.9
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
@ -9239,3 +9239,5 @@ Video Disk Recorder Revision History
- Changed the log message ""ERROR: copying directory '%s' to '%s' ended prematurely" from
"error" to "info", because any actual error would have already been reported before this
(suggested by Matthias Senzel).
- When selecting a folder for a recording or timer, it is now possible to open a folder
even if it doesn't contain any subfolders (suggested by Matthias Senzel).

35
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 4.52 2017/12/14 10:32:41 kls Exp $
* $Id: menu.c 4.53 2017/12/15 13:27:20 kls Exp $
*/
#include "menu.h"
@ -656,6 +656,7 @@ class cMenuFolderItem : public cOsdItem {
private:
cNestedItem *folder;
public:
virtual void Set(void);
cMenuFolderItem(cNestedItem *Folder);
cNestedItem *Folder(void) { return folder; }
};
@ -664,8 +665,15 @@ cMenuFolderItem::cMenuFolderItem(cNestedItem *Folder)
:cOsdItem(Folder->Text())
{
folder = Folder;
if (folder->SubItems())
Set();
}
void cMenuFolderItem::Set(void)
{
if (folder->SubItems() && folder->SubItems()->Count())
SetText(cString::sprintf("%s...", folder->Text()));
else
SetText(folder->Text());
}
// --- cMenuEditFolder -------------------------------------------------------
@ -675,7 +683,6 @@ private:
cList<cNestedItem> *list;
cNestedItem *folder;
char name[PATH_MAX];
int subFolder;
eOSState Confirm(void);
public:
cMenuEditFolder(const char *Dir, cList<cNestedItem> *List, cNestedItem *Folder = NULL);
@ -689,13 +696,10 @@ cMenuEditFolder::cMenuEditFolder(const char *Dir, cList<cNestedItem> *List, cNes
SetMenuCategory(mcFolder);
list = List;
folder = Folder;
if (folder) {
if (folder)
strn0cpy(name, folder->Text(), sizeof(name));
subFolder = folder->SubItems() != NULL;
}
else {
*name = 0;
subFolder = 0;
cRemote::Put(kRight, true); // go right into string editing mode
}
if (!isempty(Dir)) {
@ -704,7 +708,6 @@ cMenuEditFolder::cMenuEditFolder(const char *Dir, cList<cNestedItem> *List, cNes
Add(DirItem);
}
Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name)));
Add(new cMenuEditBoolItem(tr("Sub folder"), &subFolder));
}
cString cMenuEditFolder::GetFolder(void)
@ -728,12 +731,10 @@ eOSState cMenuEditFolder::Confirm(void)
return osContinue;
}
}
if (folder) {
if (folder)
folder->SetText(name);
folder->SetSubItems(subFolder);
}
else
list->Add(folder = new cNestedItem(name, subFolder));
list->Add(folder = new cNestedItem(name));
return osEnd;
}
@ -791,12 +792,8 @@ void cMenuFolder::SetHelpKeys(void)
if (HasSubMenu())
return;
int NewHelpKeys = 0;
if (firstFolder) {
if (cMenuFolderItem *Folder = (cMenuFolderItem *)Get(Current())) {
if (Folder->Folder()->SubItems())
if (firstFolder)
NewHelpKeys = 1;
}
}
if (NewHelpKeys != helpKeys) {
helpKeys = NewHelpKeys;
SetHelp(NewHelpKeys > 0 ? tr("Button$Open") : NULL, tr("Button$New"), firstFolder ? tr("Button$Delete") : NULL, firstFolder ? tr("Button$Edit") : NULL);
@ -885,8 +882,10 @@ eOSState cMenuFolder::Select(bool Open)
if (firstFolder) {
cMenuFolderItem *Folder = (cMenuFolderItem *)Get(Current());
if (Folder) {
if (Open && Folder->Folder()->SubItems())
if (Open) {
Folder->Folder()->SetSubItems(true);
return AddSubMenu(new cMenuFolder(Title(), Folder->Folder()->SubItems(), nestedItemList, !isempty(dir) ? *cString::sprintf("%s%c%s", *dir, FOLDERDELIMCHAR, Folder->Folder()->Text()) : Folder->Folder()->Text()));
}
else
return osEnd;
}

View File

@ -615,9 +615,6 @@ msgstr "تحرير مجلد"
msgid "New folder"
msgstr "مجلد جديد"
msgid "Sub folder"
msgstr "مجلد فرعى"
msgid "Folder name already exists!"
msgstr "المجلد موجود بالفعل"

View File

@ -614,9 +614,6 @@ msgstr "Modificar carpeta"
msgid "New folder"
msgstr "Nova carpeta"
msgid "Sub folder"
msgstr "Sub carpeta"
msgid "Folder name already exists!"
msgstr "La carpeta ja existeix!"

View File

@ -614,9 +614,6 @@ msgstr "Změna složky"
msgid "New folder"
msgstr "Nová složka"
msgid "Sub folder"
msgstr "Podsložka"
msgid "Folder name already exists!"
msgstr "Složka již existuje!"

View File

@ -611,9 +611,6 @@ msgstr ""
msgid "New folder"
msgstr ""
msgid "Sub folder"
msgstr ""
msgid "Folder name already exists!"
msgstr ""

View File

@ -612,9 +612,6 @@ msgstr "Verzeichnis editieren"
msgid "New folder"
msgstr "Neues Verzeichnis"
msgid "Sub folder"
msgstr "Unterverzeichnis"
msgid "Folder name already exists!"
msgstr "Verzeichnisname existiert bereits!"

View File

@ -611,9 +611,6 @@ msgstr ""
msgid "New folder"
msgstr ""
msgid "Sub folder"
msgstr ""
msgid "Folder name already exists!"
msgstr ""

View File

@ -612,9 +612,6 @@ msgstr "Modificar carpeta"
msgid "New folder"
msgstr "Nueva carpeta"
msgid "Sub folder"
msgstr "Sub carpeta"
msgid "Folder name already exists!"
msgstr "¡La carpeta ya existe!"

View File

@ -611,9 +611,6 @@ msgstr "Muuda kausta"
msgid "New folder"
msgstr "Uus kaust"
msgid "Sub folder"
msgstr "Uus alamkaust"
msgid "Folder name already exists!"
msgstr "Sellenimeline kaust juba olemas!"

View File

@ -615,9 +615,6 @@ msgstr "Muokkaa kansiota"
msgid "New folder"
msgstr "Uusi kansio"
msgid "Sub folder"
msgstr "Alikansio"
msgid "Folder name already exists!"
msgstr "Kansio on jo olemassa!"

View File

@ -622,9 +622,6 @@ msgstr "Modifier le dossier"
msgid "New folder"
msgstr "Nouveau dossier"
msgid "Sub folder"
msgstr "Sous-dossier"
msgid "Folder name already exists!"
msgstr "Ce nom de dossier existe déjà !"

View File

@ -613,9 +613,6 @@ msgstr ""
msgid "New folder"
msgstr ""
msgid "Sub folder"
msgstr ""
msgid "Folder name already exists!"
msgstr ""

View File

@ -616,9 +616,6 @@ msgstr "Könyvtár szerkesztése"
msgid "New folder"
msgstr "Új könyvtár"
msgid "Sub folder"
msgstr "Alkönyvtár"
msgid "Folder name already exists!"
msgstr "Ez a könyvtárnév már létezik!"

View File

@ -617,9 +617,6 @@ msgstr "Modifica cartella"
msgid "New folder"
msgstr "Nuova cartella"
msgid "Sub folder"
msgstr "Sotto cartella"
msgid "Folder name already exists!"
msgstr "Nome cartella già esistente!"

View File

@ -611,9 +611,6 @@ msgstr "Koreguoti katalogą"
msgid "New folder"
msgstr "Naujas katalogas"
msgid "Sub folder"
msgstr "Pakatalogis"
msgid "Folder name already exists!"
msgstr "Toks katalogo vardas jau egzistuoja!"

View File

@ -612,9 +612,6 @@ msgstr "Уреди директориум"
msgid "New folder"
msgstr "Нов директориум"
msgid "Sub folder"
msgstr "Поддиректориум"
msgid "Folder name already exists!"
msgstr "Името веќе постои"

View File

@ -617,9 +617,6 @@ msgstr "Bewerk map"
msgid "New folder"
msgstr "Nieuwe map"
msgid "Sub folder"
msgstr "Submap"
msgid "Folder name already exists!"
msgstr "Map bestaat al"

View File

@ -612,9 +612,6 @@ msgstr ""
msgid "New folder"
msgstr ""
msgid "Sub folder"
msgstr ""
msgid "Folder name already exists!"
msgstr ""

View File

@ -614,9 +614,6 @@ msgstr "Edutuj katalog"
msgid "New folder"
msgstr "Nowy katalog"
msgid "Sub folder"
msgstr "Podkatalog"
msgid "Folder name already exists!"
msgstr "Taka nazwa katalogu juz istnieje"

View File

@ -612,9 +612,6 @@ msgstr "Editar pasta"
msgid "New folder"
msgstr "Nova pasta"
msgid "Sub folder"
msgstr "Subpasta"
msgid "Folder name already exists!"
msgstr "Nome da pasta já existe!"

View File

@ -613,9 +613,6 @@ msgstr "Editează directorul"
msgid "New folder"
msgstr "Director nou"
msgid "Sub folder"
msgstr "Sub-director"
msgid "Folder name already exists!"
msgstr "Un director cu acelaşi nume există!"

View File

@ -612,9 +612,6 @@ msgstr "Редакция директории"
msgid "New folder"
msgstr "Новая директория"
msgid "Sub folder"
msgstr "поддиректория"
msgid "Folder name already exists!"
msgstr "Директория уже существует!"

View File

@ -612,9 +612,6 @@ msgstr "Upravi
msgid "New folder"
msgstr "Nový zlo¾ka"
msgid "Sub folder"
msgstr "Pod zlo¾ka"
msgid "Folder name already exists!"
msgstr "Názov zlo¾ky u¾ existuje!"

View File

@ -612,9 +612,6 @@ msgstr "Uredi direktorij"
msgid "New folder"
msgstr "Nov direktorij"
msgid "Sub folder"
msgstr "Pod direktorij"
msgid "Folder name already exists!"
msgstr "Ime direktorija ¾e obstaja"

View File

@ -612,9 +612,6 @@ msgstr "Izmeni direktorijum"
msgid "New folder"
msgstr "Novi direktorijum"
msgid "Sub folder"
msgstr "Poddirektorijum"
msgid "Folder name already exists!"
msgstr "Naziv direktorijuma veæ postoji!"

View File

@ -616,9 +616,6 @@ msgstr "Redigera mapp"
msgid "New folder"
msgstr "Ny mapp"
msgid "Sub folder"
msgstr "Undermapp"
msgid "Folder name already exists!"
msgstr "Mappnamnet finns redan!"

View File

@ -611,9 +611,6 @@ msgstr ""
msgid "New folder"
msgstr ""
msgid "Sub folder"
msgstr ""
msgid "Folder name already exists!"
msgstr ""

View File

@ -612,9 +612,6 @@ msgstr "Редагувати теку"
msgid "New folder"
msgstr "Нова тека"
msgid "Sub folder"
msgstr "Підтека"
msgid "Folder name already exists!"
msgstr "Назва теки вже існує!"

View File

@ -613,9 +613,6 @@ msgstr "编辑文件夹"
msgid "New folder"
msgstr "新文件夹"
msgid "Sub folder"
msgstr "子文件夹"
msgid "Folder name already exists!"
msgstr "文件夹名称已经存在!"