mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
moviebrowser: bind MB_MAX_DIR definition to NETWORK_NFS_NR_OF_ENTRIES ...
... to allow to add all NetFS-directories to moviebrowser
Origin commit data
------------------
Branch: ni/coolstream
Commit: f7b42af5f2
Author: vanhofen <vanhofen@gmx.de>
Date: 2015-03-30 (Mon, 30 Mar 2015)
Origin message was:
------------------
- moviebrowser: bind MB_MAX_DIR definition to NETWORK_NFS_NR_OF_ENTRIES ...
... to allow to add all NetFS-directories to moviebrowser
------------------
This commit was generated by Migit
This commit is contained in:
@@ -3727,10 +3727,10 @@ CDirMenu::CDirMenu(std::vector<MB_DIR>* dir_list)
|
||||
if (dirList->empty())
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAX_DIR; i++)
|
||||
for (i = 0; i < MB_MAX_DIRS; i++)
|
||||
dirNfsMountNr[i] = -1;
|
||||
|
||||
for (i = 0; i < dirList->size() && i < MAX_DIR; i++)
|
||||
for (i = 0; i < dirList->size() && i < MB_MAX_DIRS; i++)
|
||||
{
|
||||
for (int nfs = 0; nfs < NETWORK_NFS_NR_OF_ENTRIES; nfs++)
|
||||
{
|
||||
@@ -3764,7 +3764,7 @@ int CDirMenu::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
{
|
||||
printf("[CDirMenu].exec %s\n",actionKey.c_str());
|
||||
int number = atoi(actionKey.c_str());
|
||||
if (number < MAX_DIR)
|
||||
if (number < MB_MAX_DIRS)
|
||||
{
|
||||
if (dirState[number] == DIR_STATE_SERVER_DOWN)
|
||||
{
|
||||
@@ -3814,7 +3814,7 @@ void CDirMenu::updateDirState(void)
|
||||
unsigned int drivefree = 0;
|
||||
struct statfs s;
|
||||
|
||||
for (unsigned int i = 0; i < dirList->size() && i < MAX_DIR; i++)
|
||||
for (unsigned int i = 0; i < dirList->size() && i < MB_MAX_DIRS; i++)
|
||||
{
|
||||
dirOptionText[i] = "UNBEKANNT";
|
||||
dirState[i] = DIR_STATE_UNKNOWN;
|
||||
@@ -3881,7 +3881,7 @@ int CDirMenu::show(void)
|
||||
dirMenu.addIntroItems(LOCALE_MOVIEBROWSER_MENU_DIRECTORIES_HEAD);
|
||||
|
||||
updateDirState();
|
||||
for (unsigned int i = 0; i < dirList->size() && i < MAX_DIR; i++)
|
||||
for (unsigned int i = 0; i < dirList->size() && i < MB_MAX_DIRS; i++)
|
||||
{
|
||||
snprintf(tmp, sizeof(tmp),"%d",i);
|
||||
dirMenu.addItem(new CMenuForwarder ((*dirList)[i].name.c_str(), (dirState[i] != DIR_STATE_UNKNOWN), dirOptionText[i], this, tmp));
|
||||
|
@@ -191,7 +191,7 @@ typedef enum
|
||||
} MB_SHOW_MODE;
|
||||
|
||||
#define MB_MAX_ROWS LF_MAX_ROWS
|
||||
#define MB_MAX_DIRS 5
|
||||
#define MB_MAX_DIRS NETWORK_NFS_NR_OF_ENTRIES
|
||||
/* MB_SETTINGS to be stored in g_settings anytime ....*/
|
||||
typedef struct
|
||||
{
|
||||
@@ -538,14 +538,13 @@ typedef enum
|
||||
DIR_STATE_DISABLED = 4
|
||||
} DIR_STATE;
|
||||
|
||||
#define MAX_DIR 10
|
||||
class CDirMenu : public CMenuWidget
|
||||
{
|
||||
private:
|
||||
std::vector<MB_DIR>* dirList;
|
||||
DIR_STATE dirState[MAX_DIR];
|
||||
std::string dirOptionText[MAX_DIR];
|
||||
int dirNfsMountNr[MAX_DIR];
|
||||
DIR_STATE dirState[MB_MAX_DIRS];
|
||||
std::string dirOptionText[MB_MAX_DIRS];
|
||||
int dirNfsMountNr[MB_MAX_DIRS];
|
||||
bool changed;
|
||||
|
||||
void updateDirState(void);
|
||||
|
Reference in New Issue
Block a user