moviebrowser: add possibility to add spacers to moviebrowser

Origin commit data
------------------
Commit: 75a2665b87
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-21 (Fri, 21 Oct 2016)

Origin message was:
------------------
- moviebrowser: add possibility to add spacers to moviebrowser
This commit is contained in:
vanhofen
2016-10-21 10:47:37 +02:00
parent 1fa75ed8a3
commit c670b9c47f
7 changed files with 23 additions and 17 deletions

View File

@@ -31,6 +31,7 @@
based on code of Steffen Hehn 'McClean'
(C) 2009-2014 Stefan Seyfried
(C) 2016 Sven Hoefer
outsourced:
(C) 2016, Thilo Graf 'dbt'
@@ -89,7 +90,7 @@ typedef struct dirent64 dirent_struct;
#define NUMBER_OF_MOVIES_LAST 40 // This is the number of movies shown in last recored and last played list
#define MOVIE_SMSKEY_TIMEOUT 800
#define MESSAGEBOX_BROWSER_ROW_ITEM_COUNT 21
#define MESSAGEBOX_BROWSER_ROW_ITEM_COUNT 22
const CMenuOptionChooser::keyval MESSAGEBOX_BROWSER_ROW_ITEM[MESSAGEBOX_BROWSER_ROW_ITEM_COUNT] =
{
{ MB_INFO_FILENAME, LOCALE_MOVIEBROWSER_INFO_FILENAME },
@@ -112,7 +113,8 @@ const CMenuOptionChooser::keyval MESSAGEBOX_BROWSER_ROW_ITEM[MESSAGEBOX_BROWSER_
{ MB_INFO_AUDIO, LOCALE_MOVIEBROWSER_INFO_AUDIO },
{ MB_INFO_LENGTH, LOCALE_MOVIEBROWSER_INFO_LENGTH },
{ MB_INFO_SIZE, LOCALE_MOVIEBROWSER_INFO_SIZE },
{ MB_INFO_RATING, LOCALE_MOVIEBROWSER_INFO_RATING }
{ MB_INFO_RATING, LOCALE_MOVIEBROWSER_INFO_RATING },
{ MB_INFO_SPACER, LOCALE_MOVIEBROWSER_INFO_SPACER }
};
#define MESSAGEBOX_YES_NO_OPTIONS_COUNT 2
@@ -170,6 +172,7 @@ const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] =
LOCALE_MOVIEBROWSER_SHORT_LENGTH,
LOCALE_MOVIEBROWSER_SHORT_SIZE,
LOCALE_MOVIEBROWSER_SHORT_RATING,
LOCALE_MOVIEBROWSER_SHORT_SPACER,
NONEXISTANT_LOCALE
};
@@ -195,6 +198,7 @@ const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] =
#define MB_ROW_WIDTH_LENGTH 10
#define MB_ROW_WIDTH_SIZE 12
#define MB_ROW_WIDTH_RATING 5
#define MB_ROW_WIDTH_SPACER 1
const int m_defaultRowWidth[MB_INFO_MAX_NUMBER+1] =
{
@@ -219,6 +223,7 @@ const int m_defaultRowWidth[MB_INFO_MAX_NUMBER+1] =
MB_ROW_WIDTH_LENGTH,
MB_ROW_WIDTH_SIZE,
MB_ROW_WIDTH_RATING,
MB_ROW_WIDTH_SPACER,
0 //MB_ROW_WIDTH_MAX_NUMBER
};
static MI_MOVIE_INFO* playing_info;
@@ -3439,7 +3444,8 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite
*item_string = str_tmp;
}
break;
case MB_INFO_MAX_NUMBER: // = 21
case MB_INFO_SPACER: // = 21,
case MB_INFO_MAX_NUMBER: // = 22
default:
*item_string="";
result = false;

View File

@@ -31,6 +31,7 @@
based on code of Steffen Hehn 'McClean'
(C) 2009-2014 Stefan Seyfried
(C) 2016 Sven Hoefer
outsourced:
(C) 2016, Thilo Graf 'dbt'
@@ -39,13 +40,9 @@
#ifndef __MB_FUNCTIONS__
#define __MB_FUNCTIONS__
#include "mb_types.h"
#include <system/helpers.h>
void strReplace(std::string& orig, const char* fstr, const std::string &rstr);
static std::string rateFormat(int i)
@@ -135,7 +132,6 @@ bool sortByDir(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
else
return a->dirItNr < b->dirItNr;
}
bool sortByLastPlay(const MI_MOVIE_INFO* a, const MI_MOVIE_INFO* b)
{
if (sortDirection)
@@ -167,9 +163,8 @@ bool (* const sortBy[MB_INFO_MAX_NUMBER+1])(const MI_MOVIE_INFO* a, const MI_MOV
NULL, //MB_INFO_LENGTH = 18,
&sortBySize, //MB_INFO_SIZE = 19,
&sortByRating, //MB_INFO_RATING = 20,
NULL //MB_INFO_MAX_NUMBER = 21
NULL, //MB_INFO_SPACER = 21,
NULL //MB_INFO_MAX_NUMBER = 22
};
#endif /*__MB_FUNCTIONS__*/

View File

@@ -31,19 +31,17 @@
based on code of Steffen Hehn 'McClean'
(C) 2009-2014 Stefan Seyfried
(C) 2016 Sven Hoefer
outsourced:
(C) 2016, Thilo Graf 'dbt'
*/
#include <gui/widget/menue.h>
#ifndef __MB_TYPES__
#define __MB_TYPES__
/* !!!! Do NOT change the order of the enum, just add items at the end !!!! */
typedef enum
{
@@ -68,10 +66,10 @@ typedef enum
MB_INFO_LENGTH = 18,
MB_INFO_SIZE = 19,
MB_INFO_RATING = 20,
MB_INFO_MAX_NUMBER = 21 // MUST be allways the last item in the list
MB_INFO_SPACER = 21,
MB_INFO_MAX_NUMBER = 22 // MUST be allways the last item in the list
}MB_INFO_ITEM;
typedef enum
{
MB_DIRECTION_AUTO = 0,
@@ -121,7 +119,6 @@ typedef enum
MB_GUI_MAX_NUMBER = 5 // MUST be allways the last item in the list
}MB_GUI;
typedef enum
{
MB_PARENTAL_LOCK_OFF = 0,