From 6a896e91d137b162b5b2c46b186dc6f0ece01e9a Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 12 Dec 2014 17:48:59 +0100 Subject: [PATCH] moviebrowser: allow 9 instead of 6 rows * remove fake-entrys for lastPlayRow and lastRecordRow Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/818c404831bb9e7b33fec1a7f49bd07fe7f22978 Author: vanhofen Date: 2014-12-12 (Fri, 12 Dec 2014) Origin message was: ------------------ - moviebrowser: allow 9 instead of 6 rows * remove fake-entrys for lastPlayRow and lastRecordRow ------------------ This commit was generated by Migit --- src/gui/moviebrowser.cpp | 34 ++++++++++++++-------------------- src/gui/moviebrowser.h | 10 +++++----- src/gui/widget/listframe.h | 2 +- 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 5476c67ad..0060d47f7 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -362,15 +362,19 @@ CMovieBrowser::~CMovieBrowser() void CMovieBrowser::clearListLines() { - for (int i = 0; i < LF_MAX_ROWS; i++) + for (int i = 0; i < MB_MAX_ROWS; i++) { m_browserListLines.lineArray[i].clear(); - m_recordListLines.lineArray[i].clear(); - m_playListLines.lineArray[i].clear(); m_FilterLines.lineArray[i].clear(); } m_browserListLines.Icon.clear(); m_browserListLines.marked.clear(); + + for (int i = 0; i < 2; i++) + { + m_recordListLines.lineArray[i].clear(); + m_playListLines.lineArray[i].clear(); + } m_recordListLines.marked.clear(); m_playListLines.marked.clear(); } @@ -543,6 +547,9 @@ void CMovieBrowser::initGlobalSettings(void) m_settings.browserRowItem[3] = MB_INFO_SIZE; m_settings.browserRowItem[4] = MB_INFO_LENGTH; m_settings.browserRowItem[5] = MB_INFO_INFO1; + m_settings.browserRowItem[6] = MB_INFO_MAX_NUMBER; + m_settings.browserRowItem[7] = MB_INFO_MAX_NUMBER; + m_settings.browserRowItem[8] = MB_INFO_MAX_NUMBER; m_settings.browserRowWidth[0] = m_defaultRowWidth[m_settings.browserRowItem[0]]; //300; m_settings.browserRowWidth[1] = m_defaultRowWidth[m_settings.browserRowItem[1]]; //100; @@ -550,6 +557,9 @@ void CMovieBrowser::initGlobalSettings(void) m_settings.browserRowWidth[3] = m_defaultRowWidth[m_settings.browserRowItem[3]]; //50; m_settings.browserRowWidth[4] = m_defaultRowWidth[m_settings.browserRowItem[4]]; //30; m_settings.browserRowWidth[5] = m_defaultRowWidth[m_settings.browserRowItem[5]]; //30; + m_settings.browserRowWidth[6] = m_defaultRowWidth[m_settings.browserRowItem[6]]; + m_settings.browserRowWidth[7] = m_defaultRowWidth[m_settings.browserRowItem[7]]; + m_settings.browserRowWidth[8] = m_defaultRowWidth[m_settings.browserRowItem[8]]; m_settings.ts_only = 1; m_settings.ytmode = cYTFeedParser::MOST_POPULAR; @@ -620,33 +630,17 @@ void CMovieBrowser::initRows(void) m_settings.lastPlayRowNr = 2; m_settings.lastPlayRow[0] = MB_INFO_TITLE; m_settings.lastPlayRow[1] = MB_INFO_PREVPLAYDATE; - m_settings.lastPlayRow[2] = MB_INFO_MAX_NUMBER; - m_settings.lastPlayRow[3] = MB_INFO_MAX_NUMBER; - m_settings.lastPlayRow[4] = MB_INFO_MAX_NUMBER; - m_settings.lastPlayRow[5] = MB_INFO_MAX_NUMBER; /* the "last played" / "last recorded" windows have only half the width, so - multiply the relative width with 2 and add some fixed value for slack */ + multiply the relative width with 2 */ m_settings.lastPlayRowWidth[1] = m_defaultRowWidth[m_settings.lastPlayRow[1]] * 2 + 1; m_settings.lastPlayRowWidth[0] = 100 - m_settings.lastPlayRowWidth[1]; - m_settings.lastPlayRowWidth[2] = m_defaultRowWidth[m_settings.lastPlayRow[2]]; - m_settings.lastPlayRowWidth[3] = m_defaultRowWidth[m_settings.lastPlayRow[3]]; - m_settings.lastPlayRowWidth[4] = m_defaultRowWidth[m_settings.lastPlayRow[4]]; - m_settings.lastPlayRowWidth[5] = m_defaultRowWidth[m_settings.lastPlayRow[5]]; /***** Last Record List **************/ m_settings.lastRecordRowNr = 2; m_settings.lastRecordRow[0] = MB_INFO_TITLE; m_settings.lastRecordRow[1] = MB_INFO_RECORDDATE; - m_settings.lastRecordRow[2] = MB_INFO_MAX_NUMBER; - m_settings.lastRecordRow[3] = MB_INFO_MAX_NUMBER; - m_settings.lastRecordRow[4] = MB_INFO_MAX_NUMBER; - m_settings.lastRecordRow[5] = MB_INFO_MAX_NUMBER; m_settings.lastRecordRowWidth[1] = m_defaultRowWidth[m_settings.lastRecordRow[1]] * 2 + 1; m_settings.lastRecordRowWidth[0] = 100 - m_settings.lastRecordRowWidth[1]; - m_settings.lastRecordRowWidth[2] = m_defaultRowWidth[m_settings.lastRecordRow[2]]; - m_settings.lastRecordRowWidth[3] = m_defaultRowWidth[m_settings.lastRecordRow[3]]; - m_settings.lastRecordRowWidth[4] = m_defaultRowWidth[m_settings.lastRecordRow[4]]; - m_settings.lastRecordRowWidth[5] = m_defaultRowWidth[m_settings.lastRecordRow[5]]; } void CMovieBrowser::defaultSettings(MB_SETTINGS* /*settings*/) diff --git a/src/gui/moviebrowser.h b/src/gui/moviebrowser.h index bddfca3fc..ba8568ce0 100644 --- a/src/gui/moviebrowser.h +++ b/src/gui/moviebrowser.h @@ -190,7 +190,7 @@ typedef enum MB_SHOW_YT } MB_SHOW_MODE; -#define MB_MAX_ROWS 6 +#define MB_MAX_ROWS LF_MAX_ROWS #define MB_MAX_DIRS 5 /* MB_SETTINGS to be stored in g_settings anytime ....*/ typedef struct @@ -222,13 +222,13 @@ typedef struct // to be added to config later int lastPlayMaxItems; int lastPlayRowNr; - MB_INFO_ITEM lastPlayRow[MB_MAX_ROWS]; - int lastPlayRowWidth[MB_MAX_ROWS]; + MB_INFO_ITEM lastPlayRow[2]; + int lastPlayRowWidth[2]; int lastRecordMaxItems; int lastRecordRowNr; - MB_INFO_ITEM lastRecordRow[MB_MAX_ROWS]; - int lastRecordRowWidth[MB_MAX_ROWS]; + MB_INFO_ITEM lastRecordRow[2]; + int lastRecordRowWidth[2]; int ytmode; int ytorderby; int ytresults; diff --git a/src/gui/widget/listframe.h b/src/gui/widget/listframe.h index 7a1503737..95c3b53e3 100644 --- a/src/gui/widget/listframe.h +++ b/src/gui/widget/listframe.h @@ -56,7 +56,7 @@ #include #include -#define LF_MAX_ROWS 6 +#define LF_MAX_ROWS 9 typedef struct { int rows;