fix initializers and shadows

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@123 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
mws
2009-12-29 13:24:33 +00:00
parent e1c39d4ce5
commit 00353cf75d
6 changed files with 122 additions and 122 deletions

View File

@@ -96,52 +96,52 @@ void strReplace(std::string& orig, const char* fstr, const std::string rstr);
#define MESSAGEBOX_BROWSER_ROW_ITEM_COUNT 20
const CMenuOptionChooser::keyval MESSAGEBOX_BROWSER_ROW_ITEM[MESSAGEBOX_BROWSER_ROW_ITEM_COUNT] =
{
{ MB_INFO_FILENAME, LOCALE_MOVIEBROWSER_INFO_FILENAME },
{ MB_INFO_FILEPATH, LOCALE_MOVIEBROWSER_INFO_PATH },
{ MB_INFO_TITLE, LOCALE_MOVIEBROWSER_INFO_TITLE },
{ MB_INFO_SERIE, LOCALE_MOVIEBROWSER_INFO_SERIE },
{ MB_INFO_INFO1, LOCALE_MOVIEBROWSER_INFO_INFO1 },
{ MB_INFO_MAJOR_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR },
{ MB_INFO_MINOR_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MINOR },
{ MB_INFO_PARENTAL_LOCKAGE, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE },
{ MB_INFO_CHANNEL, LOCALE_MOVIEBROWSER_INFO_CHANNEL },
{ MB_INFO_QUALITY, LOCALE_MOVIEBROWSER_INFO_QUALITY },
{ MB_INFO_PREVPLAYDATE, LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE },
{ MB_INFO_RECORDDATE, LOCALE_MOVIEBROWSER_INFO_RECORDDATE },
{ MB_INFO_PRODDATE, LOCALE_MOVIEBROWSER_INFO_PRODYEAR },
{ MB_INFO_COUNTRY, LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY },
{ MB_INFO_GEOMETRIE, LOCALE_MOVIEBROWSER_INFO_VIDEOFORMAT },
{ MB_INFO_AUDIO, LOCALE_MOVIEBROWSER_INFO_AUDIO },
{ MB_INFO_LENGTH, LOCALE_MOVIEBROWSER_INFO_LENGTH },
{ MB_INFO_SIZE, LOCALE_MOVIEBROWSER_INFO_SIZE },
{ MB_INFO_BOOKMARK, LOCALE_MOVIEBROWSER_MENU_MAIN_BOOKMARKS },
{ MB_INFO_FILENAME, LOCALE_MOVIEBROWSER_INFO_FILENAME }
{ MB_INFO_FILENAME, LOCALE_MOVIEBROWSER_INFO_FILENAME ,0 },
{ MB_INFO_FILEPATH, LOCALE_MOVIEBROWSER_INFO_PATH ,0 },
{ MB_INFO_TITLE, LOCALE_MOVIEBROWSER_INFO_TITLE ,0 },
{ MB_INFO_SERIE, LOCALE_MOVIEBROWSER_INFO_SERIE ,0 },
{ MB_INFO_INFO1, LOCALE_MOVIEBROWSER_INFO_INFO1 ,0 },
{ MB_INFO_MAJOR_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR ,0 },
{ MB_INFO_MINOR_GENRE, LOCALE_MOVIEBROWSER_INFO_GENRE_MINOR ,0 },
{ MB_INFO_PARENTAL_LOCKAGE, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE ,0 },
{ MB_INFO_CHANNEL, LOCALE_MOVIEBROWSER_INFO_CHANNEL ,0 },
{ MB_INFO_QUALITY, LOCALE_MOVIEBROWSER_INFO_QUALITY ,0 },
{ MB_INFO_PREVPLAYDATE, LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE ,0 },
{ MB_INFO_RECORDDATE, LOCALE_MOVIEBROWSER_INFO_RECORDDATE ,0 },
{ MB_INFO_PRODDATE, LOCALE_MOVIEBROWSER_INFO_PRODYEAR ,0 },
{ MB_INFO_COUNTRY, LOCALE_MOVIEBROWSER_INFO_PRODCOUNTRY ,0 },
{ MB_INFO_GEOMETRIE, LOCALE_MOVIEBROWSER_INFO_VIDEOFORMAT ,0 },
{ MB_INFO_AUDIO, LOCALE_MOVIEBROWSER_INFO_AUDIO ,0 },
{ MB_INFO_LENGTH, LOCALE_MOVIEBROWSER_INFO_LENGTH ,0 },
{ MB_INFO_SIZE, LOCALE_MOVIEBROWSER_INFO_SIZE ,0 },
{ MB_INFO_BOOKMARK, LOCALE_MOVIEBROWSER_MENU_MAIN_BOOKMARKS ,0 },
{ MB_INFO_FILENAME, LOCALE_MOVIEBROWSER_INFO_FILENAME ,0 }
};
#define MESSAGEBOX_YES_NO_OPTIONS_COUNT 2
const CMenuOptionChooser::keyval MESSAGEBOX_YES_NO_OPTIONS[MESSAGEBOX_YES_NO_OPTIONS_COUNT] =
{
{ 0, LOCALE_MESSAGEBOX_NO },
{ 1, LOCALE_MESSAGEBOX_YES }
{ 0, LOCALE_MESSAGEBOX_NO ,0 },
{ 1, LOCALE_MESSAGEBOX_YES ,0 }
};
#define MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT 3
const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCK_OPTIONS[MESSAGEBOX_PARENTAL_LOCK_OPTIONS_COUNT] =
{
{ 1, LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED_YES },
{ 0, LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED_NO },
{ 2, LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED_NO_TEMP }
{ 1, LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED_YES ,0 },
{ 0, LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED_NO ,0 },
{ 2, LOCALE_MOVIEBROWSER_MENU_PARENTAL_LOCK_ACTIVATED_NO_TEMP ,0 }
};
#define MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT 6
const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS[MESSAGEBOX_PARENTAL_LOCKAGE_OPTION_COUNT] =
{
{ 0, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_0YEAR },
{ 6, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_6YEAR },
{ 12, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_12YEAR },
{ 16, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_16YEAR },
{ 18, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_18YEAR },
{ 99, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_ALWAYS }
{ 0, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_0YEAR ,0},
{ 6, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_6YEAR,0 },
{ 12, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_12YEAR ,0},
{ 16, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_16YEAR ,0},
{ 18, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_18YEAR,0 },
{ 99, LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE_ALWAYS ,0}
};
#define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX - 40)
@@ -1287,8 +1287,8 @@ void CMovieBrowser::refreshFilterList(void)
{
for(int i = 0; i < GENRE_ALL_COUNT; i++)
{
std::string tmp = g_Locale->getText(GENRE_ALL[i].value);
m_FilterLines.lineArray[0].push_back(tmp);
std::string tmpl = g_Locale->getText(GENRE_ALL[i].value);
m_FilterLines.lineArray[0].push_back(tmpl);
}
}
else if(m_settings.filter.item == MB_INFO_SERIE)
@@ -2743,19 +2743,19 @@ void CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
bookmarkMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, bookEndIntInput.getValue(), &bookEndIntInput));
bookmarkMenu.addItem(GenericMenuSeparatorLine);
for(int i =0 ; i < MI_MOVIE_BOOK_USER_MAX && i < MAX_NUMBER_OF_BOOKMARK_ITEMS; i++ )
for(int li =0 ; i < MI_MOVIE_BOOK_USER_MAX && i < MAX_NUMBER_OF_BOOKMARK_ITEMS; i++ )
{
pBookNameInput[i] = new CStringInput (LOCALE_MOVIEBROWSER_EDIT_BOOK, &movie_info->bookmarks.user[i].name, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO2, "abcdefghijklmnopqrstuvwxyz0123456789-.: ");
pBookPosIntInput[i] = new CIntInput (LOCALE_MOVIEBROWSER_EDIT_BOOK, (int&) movie_info->bookmarks.user[i].pos, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2);
pBookTypeIntInput[i] = new CIntInput (LOCALE_MOVIEBROWSER_EDIT_BOOK, (int&) movie_info->bookmarks.user[i].length, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO2);
pBookNameInput[li] = new CStringInput (LOCALE_MOVIEBROWSER_EDIT_BOOK, &movie_info->bookmarks.user[li].name, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_NAME_INFO2, "abcdefghijklmnopqrstuvwxyz0123456789-.: ");
pBookPosIntInput[li] = new CIntInput (LOCALE_MOVIEBROWSER_EDIT_BOOK, (int&) movie_info->bookmarks.user[li].pos, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_POS_INFO2);
pBookTypeIntInput[li] = new CIntInput (LOCALE_MOVIEBROWSER_EDIT_BOOK, (int&) movie_info->bookmarks.user[li].length, 20, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO1, LOCALE_MOVIEBROWSER_EDIT_BOOK_TYPE_INFO2);
pBookItemMenu[i] = new CMenuWidget(LOCALE_MOVIEBROWSER_BOOK_HEAD, "streaming.raw");
pBookItemMenu[i]->addItem(GenericMenuSeparator);
pBookItemMenu[i]->addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, movie_info->bookmarks.user[i].name,pBookNameInput[i]));
pBookItemMenu[i]->addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_POSITION, true, pBookPosIntInput[i]->getValue(), pBookPosIntInput[i]));
pBookItemMenu[i]->addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE, true, pBookTypeIntInput[i]->getValue(),pBookTypeIntInput[i]));
pBookItemMenu[li] = new CMenuWidget(LOCALE_MOVIEBROWSER_BOOK_HEAD, "streaming.raw");
pBookItemMenu[li]->addItem(GenericMenuSeparator);
pBookItemMenu[li]->addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_NAME, true, movie_info->bookmarks.user[li].name,pBookNameInput[li]));
pBookItemMenu[li]->addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_POSITION, true, pBookPosIntInput[li]->getValue(), pBookPosIntInput[li]));
pBookItemMenu[li]->addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_TYPE, true, pBookTypeIntInput[li]->getValue(),pBookTypeIntInput[li]));
bookmarkMenu.addItem( new CMenuForwarderNonLocalized (movie_info->bookmarks.user[i].name.c_str(), true, pBookPosIntInput[i]->getValue(),pBookItemMenu[i]));
bookmarkMenu.addItem( new CMenuForwarderNonLocalized (movie_info->bookmarks.user[li].name.c_str(), true, pBookPosIntInput[li]->getValue(),pBookItemMenu[li]));
}
/********************************************************************/
@@ -2766,8 +2766,8 @@ void CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
serieMenu.addItem(GenericMenuSeparator);
serieMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_SERIE_NAME, true, movie_info->serieName,&serieUserInput));
serieMenu.addItem(GenericMenuSeparatorLine);
for(unsigned int i=0; i < m_vHandleSerienames.size(); i++)
serieMenu.addItem( new CMenuSelector(m_vHandleSerienames[i]->serieName.c_str(), true, movie_info->serieName));
for(unsigned int li=0; li < m_vHandleSerienames.size(); li++)
serieMenu.addItem( new CMenuSelector(m_vHandleSerienames[li]->serieName.c_str(), true, movie_info->serieName));
/********************************************************************/
/** update movie info ******************************************************/
@@ -2839,12 +2839,12 @@ void CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
movieInfoMenu.exec(NULL,"");
for(int i =0 ; i < MI_MOVIE_BOOK_USER_MAX && i < MAX_NUMBER_OF_BOOKMARK_ITEMS; i++ )
for(int li =0 ; li < MI_MOVIE_BOOK_USER_MAX && li < MAX_NUMBER_OF_BOOKMARK_ITEMS; li++ )
{
delete pBookNameInput[i] ;
delete pBookPosIntInput[i] ;
delete pBookTypeIntInput[i];
delete pBookItemMenu[i];
delete pBookNameInput[li] ;
delete pBookPosIntInput[li] ;
delete pBookTypeIntInput[li];
delete pBookItemMenu[li];
}
}
@@ -3210,10 +3210,10 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite
case MB_INFO_AUDIO: // = 17,
#if 1 // MB_INFO_AUDIO test
// we just return the number of audiopids
char text[10];
snprintf(text, 8,"%d",movie_info.audioPids.size());
text[9] = 0; // just to make sure string is terminated
*item_string = text;
char ltext[10];
snprintf(ltext, 8,"%d",movie_info.audioPids.size());
ltext[9] = 0; // just to make sure string is terminated
*item_string = ltext;
#else // MB_INFO_AUDIO test
for(i=0; i < movie_info.audioPids.size() && i < 10; i++)
{