From 6e718d89876cd9b19191da8e7192bced04adcf04 Mon Sep 17 00:00:00 2001 From: mws Date: Wed, 23 Dec 2009 12:08:43 +0000 Subject: [PATCH] fix shadow stuff and initializers.... git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@118 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/audioplayer.cpp | 6 +- src/gui/bedit/bouqueteditor_chanselect.cpp | 6 +- src/gui/bouquetlist.cpp | 32 +- src/gui/channellist.cpp | 30 +- src/gui/epgview.cpp | 18 +- src/gui/eventlist.cpp | 16 +- src/gui/infoviewer.cpp | 18 +- src/gui/moviebrowser.h | 322 ++++++++++----------- src/gui/movieplayer.cpp | 3 +- src/gui/nfs.cpp | 10 +- src/gui/scan.cpp | 16 +- src/gui/screensetup.cpp | 22 +- src/gui/timerlist.cpp | 36 +-- src/gui/update.cpp | 32 +- src/gui/widget/colorchooser.cpp | 10 +- src/gui/widget/keychooser.cpp | 6 +- src/gui/widget/listbox.cpp | 4 +- src/gui/widget/listframe.cpp | 124 ++++---- src/gui/widget/menue.h | 4 +- src/gui/widget/msgbox.cpp | 6 +- src/gui/widget/rgbcsynccontroler.cpp | 14 +- src/gui/widget/textbox.cpp | 72 ++--- src/gui/widget/vfdcontroler.cpp | 14 +- src/zapit/src/bouquets.cpp | 19 +- src/zapit/src/frontend.cpp | 54 ++-- src/zapit/src/getservices.cpp | 18 +- src/zapit/src/pmt.cpp | 14 +- src/zapit/src/pzapit.cpp | 16 +- src/zapit/src/scan.cpp | 10 +- src/zapit/src/zapit.cpp | 22 +- 30 files changed, 492 insertions(+), 482 deletions(-) diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 341c9710a..dc32349b1 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -416,9 +416,9 @@ int CAudioPlayerGui::show() sprintf(fname, "%s/mp3-%d.jpg", DATADIR "/neutrino/icons", pic_index); - int ret = access(fname, F_OK); - printf("CAudioPlayerGui::show: new pic %s: %s\n", fname, ret ? "not found" : "found"); - if (ret == 0) { + int lret = access(fname, F_OK); + printf("CAudioPlayerGui::show: new pic %s: %s\n", fname, lret ? "not found" : "found"); + if (lret == 0) { pic_index++; videoDecoder->StopPicture(); videoDecoder->ShowPicture(fname); diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 3f3ce2ae1..2835434f9 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -85,13 +85,13 @@ bool CBEChannelSelectWidget::hasChanged() return modified; } -void CBEChannelSelectWidget::paintItem(uint32_t itemNr, int paintNr, bool selected) +void CBEChannelSelectWidget::paintItem(uint32_t itemNr, int paintNr, bool pselected) { int ypos = y+ theight + paintNr*fheight; uint8_t color; fb_pixel_t bgcolor; - if (selected) + if (pselected) { color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; @@ -130,7 +130,7 @@ void CBEChannelSelectWidget::onOkKeyPressed() addChannelToBouquet( bouquet, Channels[selected]->channel_id); bouquetChannels = mode == CZapitClient::MODE_TV ? &(g_bouquetManager->Bouquets[bouquet]->tvChannels) : &(g_bouquetManager->Bouquets[bouquet]->radioChannels); - + paintItem( selected, selected - liststart, false); g_RCInput->postMsg( CRCInput::RC_down, 0 ); } diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 763faf8a9..82a7a9183 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -67,7 +67,7 @@ CBouquetList::CBouquetList(const char * const Name) name = g_Locale->getText(LOCALE_BOUQUETLIST_HEAD); else name = Name; - + } CBouquetList::~CBouquetList() @@ -85,12 +85,12 @@ CBouquet* CBouquetList::addBouquet(CZapitBouquet * zapitBouquet) return tmp; } -CBouquet* CBouquetList::addBouquet(const char * const name, int BouquetKey, bool locked) +CBouquet* CBouquetList::addBouquet(const char * const pname, int BouquetKey, bool locked) { if ( BouquetKey==-1 ) BouquetKey= Bouquets.size(); - CBouquet* tmp = new CBouquet( BouquetKey, name, locked ); + CBouquet* tmp = new CBouquet( BouquetKey, pname, locked ); Bouquets.push_back(tmp); return(tmp); } @@ -231,8 +231,8 @@ int CBouquetList::doMenu() tmp = g_bouquetManager->Bouquets[bouquet_id]; channels = &zapitBouquet->tvChannels; - for(int i = 0; i < (int) channels->size(); i++) - tmp->addService((*channels)[i]); + for(int li = 0; li < (int) channels->size(); li++) + tmp->addService((*channels)[li]); return 1; break; default: @@ -288,10 +288,10 @@ int CBouquetList::show(bool bShowChannelList) x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - width) / 2; y = frameBuffer->getScreenY() + (frameBuffer->getScreenHeight() - height) / 2; - int maxpos= 1; + int lmaxpos= 1; int i= Bouquets.size(); while ((i= i/10)!=0) - maxpos++; + lmaxpos++; paintHead(); paint(); @@ -301,7 +301,7 @@ int CBouquetList::show(bool bShowChannelList) int zapOnExit = false; unsigned int chn= 0; - int pos= maxpos; + int pos= lmaxpos; unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); @@ -403,10 +403,10 @@ int CBouquetList::show(bool bShowChannelList) } } else if (CRCInput::isNumeric(msg)) { - if (pos == maxpos) { + if (pos == lmaxpos) { if (msg == CRCInput::RC_0) { chn = firstselected; - pos = maxpos; + pos = lmaxpos; } else { chn = CRCInput::getNumericValue(msg); pos = 1; @@ -418,7 +418,7 @@ int CBouquetList::show(bool bShowChannelList) if (chn > Bouquets.size()) { chn = firstselected; - pos = maxpos; + pos = lmaxpos; } int prevselected=selected; @@ -460,17 +460,17 @@ void CBouquetList::paintItem(int pos) fb_pixel_t bgcolor; bool iscurrent = true; int npos = liststart + pos; - const char * name = NULL; + const char * lname = NULL; if(npos < (int) Bouquets.size()) - name = (Bouquets[npos]->zapitBouquet && Bouquets[npos]->zapitBouquet->bFav) ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : Bouquets[npos]->channelList->getName(); + lname = (Bouquets[npos]->zapitBouquet && Bouquets[npos]->zapitBouquet->bFav) ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : Bouquets[npos]->channelList->getName(); if (npos == (int) selected) { color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; frameBuffer->paintBoxRel(x, ypos, width- 15, fheight, bgcolor, ROUND_RADIUS); if(npos < (int) Bouquets.size()) - CVFD::getInstance()->showMenuText(0, name, -1, true); + CVFD::getInstance()->showMenuText(0, lname, -1, true); } else { if(npos < (int) Bouquets.size()) iscurrent = Bouquets[npos]->channelList->getSize() > 0; @@ -486,7 +486,7 @@ void CBouquetList::paintItem(int pos) int numpos = x+5+numwidth- g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth(tmp); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(numpos,ypos+fheight, numwidth+5, tmp, color, fheight); - g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10, ypos+ fheight, width- numwidth- 20- 15, name, color, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10, ypos+ fheight, width- numwidth- 20- 15, lname, color, 0, true); // UTF-8 //CVFD::getInstance()->showMenuText(0, bouq->channelList->getName(), -1, true); } } @@ -530,7 +530,7 @@ void CBouquetList::paint() frameBuffer->paintBoxRel(x, y + (height - buttonHeight), width, buttonHeight - 1, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + (height - buttonHeight) + 3, ButtonWidth, sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]), CBouquetListButtons); - if(Bouquets.size()) + if(Bouquets.size()) { for(unsigned int count=0;counthistoryMode = historyMode; + this->historyMode = phistoryMode; vlist = _vlist; //printf("************ NEW LIST %s : %x\n", name.c_str(), this);fflush(stdout); } @@ -186,11 +186,11 @@ void CChannelList::updateEvents(void) } //CChannelEventList events = g_Sectionsd->getChannelEvents((CNeutrinoApp::getInstance()->getMode()) != NeutrinoMessages::mode_radio, p_requested_channels, size_requested_channels); - CChannelEventList events; - sectionsd_getChannelEvents(events, (CNeutrinoApp::getInstance()->getMode()) != NeutrinoMessages::mode_radio, p_requested_channels, size_requested_channels); + CChannelEventList levents; + sectionsd_getChannelEvents(levents, (CNeutrinoApp::getInstance()->getMode()) != NeutrinoMessages::mode_radio, p_requested_channels, size_requested_channels); for (uint32_t count=0; count < chanlist.size(); count++) { chanlist[count]->currentEvent = CChannelEvent(); - for ( CChannelEventList::iterator e = events.begin(); e != events.end(); ++e ) + for ( CChannelEventList::iterator e = levents.begin(); e != levents.end(); ++e ) if ((chanlist[count]->channel_id&0xFFFFFFFFFFFFULL) == e->get_channel_id()){ chanlist[count]->currentEvent= *e; break; @@ -1220,17 +1220,22 @@ void CChannelList::quickZap(int key, bool cycle) size_t cactive = selected; printf("CChannelList::quickZap: selected %d total %d active bouquet %d total %d\n", cactive, chanlist.size(), bactive, bsize); - if ( (key==g_settings.key_quickzap_down) || (key == CRCInput::RC_left)) { - cactive--; - if(cactive < 0) { + if ( (key==g_settings.key_quickzap_down) || (key == CRCInput::RC_left)) + { + if(cactive == 0) + { if(bactive == 0) bactive = bsize - 1; else bactive--; bouquetList->activateBouquet(bactive, false); cactive = bouquetList->Bouquets[bactive]->channelList->getSize() - 1; - } else + } + else + { selected = cactive; + --cactive; + } } else if ((key==g_settings.key_quickzap_up) || (key == CRCInput::RC_right)) { cactive++; @@ -1503,8 +1508,9 @@ void CChannelList::paintItem(int pos) if ( (width- numwidth- 60- 15- prg_offset - ch_name_len)< ch_desc_len ) ch_desc_len = (width- numwidth- 60- 15- ch_name_len - prg_offset); - if (ch_desc_len< 0) - ch_desc_len = 0; + // Senseless code as ch_desc_len is a NOT signed integer +// if (ch_desc_len< 0) +// ch_desc_len = 0; if(g_settings.channellist_extended){ if(displayNext) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 42cef387a..215f576eb 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -227,12 +227,12 @@ void CEpgData::showText( int startPos, int ypos ) medlineheight = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getHeight(); medlinecount=(oy- botboxheight)/medlineheight; - int textCount = epgText.size(); + int ltextCount = epgText.size(); int y=ypos; frameBuffer->paintBoxRel(sx, y, ox- 15, sb, COL_MENUCONTENT_PLUS_0); - for (int i=startPos; iRenderString(sx+10, y+medlineheight, ox- 15- 15, epgText[i], COL_MENUCONTENT, 0, true); // UTF-8 @@ -242,7 +242,7 @@ void CEpgData::showText( int startPos, int ypos ) frameBuffer->paintBoxRel(sx+ ox- 15, ypos, 15, sb, COL_MENUCONTENT_PLUS_1); - int sbc= ((textCount- 1)/ medlinecount)+ 1; + int sbc= ((ltextCount- 1)/ medlinecount)+ 1; float sbh= (sb- 4)/ sbc; int sbs= (startPos+ 1)/ medlinecount; @@ -742,8 +742,8 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_ } else if (g_settings.recording_choose_direct_rec_dir == 1) { - int id = -1; - CMountChooser recDirs(LOCALE_TIMERLIST_RECORDING_DIR,NEUTRINO_ICON_SETTINGS,&id,NULL,g_settings.network_nfs_recordingdir); + int lid = -1; + CMountChooser recDirs(LOCALE_TIMERLIST_RECORDING_DIR,NEUTRINO_ICON_SETTINGS,&lid,NULL,g_settings.network_nfs_recordingdir); if (recDirs.hasItem()) { hide(); @@ -753,8 +753,8 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_ { printf("no network devices available\n"); } - if (id != -1) - strcpy(recDir, g_settings.network_nfs_local_dir[id]); + if (lid != -1) + strcpy(recDir, g_settings.network_nfs_local_dir[lid]); //recDir = g_settings.network_nfs_local_dir[id]; //else //recDir = NULL; @@ -1021,7 +1021,7 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st // -- 2002-05-13 rasc // -void CEpgData::showTimerEventBar (bool show) +void CEpgData::showTimerEventBar (bool pshow) { int x,y,w,h; @@ -1038,7 +1038,7 @@ void CEpgData::showTimerEventBar (bool show) frameBuffer->paintBackgroundBoxRel(x,y,w,h); // hide only? - if (! show) return; + if (! pshow) return; frameBuffer->paintBoxRel(x,y,w,h, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM);//round diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 280d02256..8950986fa 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -912,20 +912,20 @@ bool CEventFinderMenuHandler::changeNotify(const neutrino_locale_t OptionName, v #define SEARCH_LIST_OPTION_COUNT 3 const CMenuOptionChooser::keyval SEARCH_LIST_OPTIONS[SEARCH_LIST_OPTION_COUNT] = { -// { EventList::SEARCH_LIST_NONE , LOCALE_PICTUREVIEWER_RESIZE_NONE }, - { EventList::SEARCH_LIST_CHANNEL , LOCALE_TIMERLIST_CHANNEL }, - { EventList::SEARCH_LIST_BOUQUET , LOCALE_BOUQUETLIST_HEAD }, - { EventList::SEARCH_LIST_ALL , LOCALE_CHANNELLIST_HEAD } +// { EventList::SEARCH_LIST_NONE , LOCALE_PICTUREVIEWER_RESIZE_NONE ,0 }, + { EventList::SEARCH_LIST_CHANNEL , LOCALE_TIMERLIST_CHANNEL ,0 }, + { EventList::SEARCH_LIST_BOUQUET , LOCALE_BOUQUETLIST_HEAD ,0 }, + { EventList::SEARCH_LIST_ALL , LOCALE_CHANNELLIST_HEAD ,0 } }; #define SEARCH_EPG_OPTION_COUNT 3 const CMenuOptionChooser::keyval SEARCH_EPG_OPTIONS[SEARCH_EPG_OPTION_COUNT] = { -// { EventList::SEARCH_EPG_NONE , LOCALE_PICTUREVIEWER_RESIZE_NONE }, - { EventList::SEARCH_EPG_TITLE , LOCALE_FONTSIZE_EPG_TITLE }, - { EventList::SEARCH_EPG_INFO1 , LOCALE_FONTSIZE_EPG_INFO1 }, - { EventList::SEARCH_EPG_INFO2 , LOCALE_FONTSIZE_EPG_INFO2 } +// { EventList::SEARCH_EPG_NONE , LOCALE_PICTUREVIEWER_RESIZE_NONE ,0 }, + { EventList::SEARCH_EPG_TITLE , LOCALE_FONTSIZE_EPG_TITLE ,0}, + { EventList::SEARCH_EPG_INFO1 , LOCALE_FONTSIZE_EPG_INFO1 ,0 }, + { EventList::SEARCH_EPG_INFO2 , LOCALE_FONTSIZE_EPG_INFO2 ,0 } // ,{ EventList::SEARCH_EPG_GENRE , LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR } }; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 366e82034..fe13b3600 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -694,7 +694,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con void CInfoViewer::showSubchan () { - CFrameBuffer *frameBuffer = CFrameBuffer::getInstance (); + CFrameBuffer *lframeBuffer = CFrameBuffer::getInstance (); CNeutrinoApp *neutrino = CNeutrinoApp::getInstance (); std::string subChannelName; // holds the name of the subchannel/audio channel @@ -746,19 +746,19 @@ void CInfoViewer::showSubchan () } fb_pixel_t pixbuf[(dx + 2 * borderwidth) * (dy + 2 * borderwidth)]; - frameBuffer->SaveScreen (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, dy + 2 * borderwidth, pixbuf); + lframeBuffer->SaveScreen (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, dy + 2 * borderwidth, pixbuf); // clear border - frameBuffer->paintBackgroundBoxRel (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, borderwidth); - frameBuffer->paintBackgroundBoxRel (x - borderwidth, y + dy, dx + 2 * borderwidth, borderwidth); - frameBuffer->paintBackgroundBoxRel (x - borderwidth, y, borderwidth, dy); - frameBuffer->paintBackgroundBoxRel (x + dx, y, borderwidth, dy); + lframeBuffer->paintBackgroundBoxRel (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, borderwidth); + lframeBuffer->paintBackgroundBoxRel (x - borderwidth, y + dy, dx + 2 * borderwidth, borderwidth); + lframeBuffer->paintBackgroundBoxRel (x - borderwidth, y, borderwidth, dy); + lframeBuffer->paintBackgroundBoxRel (x + dx, y, borderwidth, dy); - frameBuffer->paintBoxRel (x, y, dx, dy, COL_MENUCONTENT_PLUS_0); + lframeBuffer->paintBoxRel (x, y, dx, dy, COL_MENUCONTENT_PLUS_0); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + 30, dx - 20, text, COL_MENUCONTENT); if (g_RemoteControl->director_mode) { - frameBuffer->paintIcon (NEUTRINO_ICON_BUTTON_YELLOW, x + 8, y + dy - 20); + lframeBuffer->paintIcon (NEUTRINO_ICON_BUTTON_YELLOW, x + 8, y + dy - 20); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (x + 30, y + dy - 2, dx - 40, g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), COL_MENUCONTENT, 0, true); // UTF-8 } @@ -783,7 +783,7 @@ void CInfoViewer::showSubchan () } } } - frameBuffer->RestoreScreen (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, dy + 2 * borderwidth, pixbuf); + lframeBuffer->RestoreScreen (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, dy + 2 * borderwidth, pixbuf); } else { g_RCInput->postMsg (NeutrinoMessages::SHOW_INFOBAR, 0); } diff --git a/src/gui/moviebrowser.h b/src/gui/moviebrowser.h index 176fb4a28..e5cfab652 100644 --- a/src/gui/moviebrowser.h +++ b/src/gui/moviebrowser.h @@ -492,213 +492,213 @@ class CDirMenu : public CMenuWidget #define GENRE_ALL_COUNT 76 const CMenuOptionChooser::keyval GENRE_ALL[GENRE_ALL_COUNT] = { - { 0x00, LOCALE_GENRE_UNKNOWN}, - { 0x10, LOCALE_GENRE_MOVIE_0}, - { 0x11, LOCALE_GENRE_MOVIE_1}, - { 0x12, LOCALE_GENRE_MOVIE_2}, - { 0x13, LOCALE_GENRE_MOVIE_3}, - { 0x14, LOCALE_GENRE_MOVIE_4}, - { 0x15, LOCALE_GENRE_MOVIE_5}, - { 0x16, LOCALE_GENRE_MOVIE_6}, - { 0x17, LOCALE_GENRE_MOVIE_7}, - { 0x18, LOCALE_GENRE_MOVIE_8}, - { 0x20, LOCALE_GENRE_NEWS_0}, - { 0x21, LOCALE_GENRE_NEWS_1}, - { 0x22, LOCALE_GENRE_NEWS_2}, - { 0x23, LOCALE_GENRE_NEWS_3}, - { 0x24, LOCALE_GENRE_NEWS_4}, - { 0x30, LOCALE_GENRE_SHOW_0}, - { 0x31, LOCALE_GENRE_SHOW_1}, - { 0x32, LOCALE_GENRE_SHOW_2}, - { 0x33, LOCALE_GENRE_SHOW_3}, - { 0x40, LOCALE_GENRE_SPORTS_0}, - { 0x41, LOCALE_GENRE_SPORTS_1}, - { 0x42, LOCALE_GENRE_SPORTS_2}, - { 0x43, LOCALE_GENRE_SPORTS_3}, - { 0x44, LOCALE_GENRE_SPORTS_4}, - { 0x45, LOCALE_GENRE_SPORTS_5}, - { 0x46, LOCALE_GENRE_SPORTS_6}, - { 0x47, LOCALE_GENRE_SPORTS_7}, - { 0x48, LOCALE_GENRE_SPORTS_8}, - { 0x49, LOCALE_GENRE_SPORTS_9}, - { 0x4A, LOCALE_GENRE_SPORTS_10}, - { 0x4B, LOCALE_GENRE_SPORTS_11}, - { 0x50, LOCALE_GENRE_CHILDRENS_PROGRAMMES_0}, - { 0x51, LOCALE_GENRE_CHILDRENS_PROGRAMMES_1}, - { 0x52, LOCALE_GENRE_CHILDRENS_PROGRAMMES_2}, - { 0x53, LOCALE_GENRE_CHILDRENS_PROGRAMMES_3}, - { 0x54, LOCALE_GENRE_CHILDRENS_PROGRAMMES_4}, - { 0x55, LOCALE_GENRE_CHILDRENS_PROGRAMMES_5}, - { 0x60, LOCALE_GENRE_MUSIC_DANCE_0}, - { 0x61, LOCALE_GENRE_MUSIC_DANCE_1}, - { 0x62, LOCALE_GENRE_MUSIC_DANCE_2}, - { 0x63, LOCALE_GENRE_MUSIC_DANCE_3}, - { 0x64, LOCALE_GENRE_MUSIC_DANCE_4}, - { 0x65, LOCALE_GENRE_MUSIC_DANCE_5}, - { 0x66, LOCALE_GENRE_MUSIC_DANCE_6}, - { 0x70, LOCALE_GENRE_ARTS_0}, - { 0x71, LOCALE_GENRE_ARTS_1}, - { 0x72, LOCALE_GENRE_ARTS_2}, - { 0x73, LOCALE_GENRE_ARTS_3}, - { 0x74, LOCALE_GENRE_ARTS_4}, - { 0x75, LOCALE_GENRE_ARTS_5}, - { 0x76, LOCALE_GENRE_ARTS_6}, - { 0x77, LOCALE_GENRE_ARTS_7}, - { 0x78, LOCALE_GENRE_ARTS_8}, - { 0x79, LOCALE_GENRE_ARTS_9}, - { 0x7A, LOCALE_GENRE_ARTS_10}, - { 0x7B, LOCALE_GENRE_ARTS_11}, - { 0x80, LOCALE_GENRE_SOCIAL_POLITICAL_0}, - { 0x81, LOCALE_GENRE_SOCIAL_POLITICAL_1}, - { 0x82, LOCALE_GENRE_SOCIAL_POLITICAL_2}, - { 0x83, LOCALE_GENRE_SOCIAL_POLITICAL_3}, - { 0x90, LOCALE_GENRE_DOCUS_MAGAZINES_0}, - { 0x91, LOCALE_GENRE_DOCUS_MAGAZINES_1}, - { 0x92, LOCALE_GENRE_DOCUS_MAGAZINES_2}, - { 0x93, LOCALE_GENRE_DOCUS_MAGAZINES_3}, - { 0x94, LOCALE_GENRE_DOCUS_MAGAZINES_4}, - { 0x95, LOCALE_GENRE_DOCUS_MAGAZINES_5}, - { 0x96, LOCALE_GENRE_DOCUS_MAGAZINES_6}, - { 0x97, LOCALE_GENRE_DOCUS_MAGAZINES_7}, - { 0xA0, LOCALE_GENRE_TRAVEL_HOBBIES_0}, - { 0xA1, LOCALE_GENRE_TRAVEL_HOBBIES_1}, - { 0xA2, LOCALE_GENRE_TRAVEL_HOBBIES_2}, - { 0xA3, LOCALE_GENRE_TRAVEL_HOBBIES_3}, - { 0xA4, LOCALE_GENRE_TRAVEL_HOBBIES_4}, - { 0xA5, LOCALE_GENRE_TRAVEL_HOBBIES_5}, - { 0xA6, LOCALE_GENRE_TRAVEL_HOBBIES_6}, - { 0xA7, LOCALE_GENRE_TRAVEL_HOBBIES_7} + { 0x00, LOCALE_GENRE_UNKNOWN,0 }, + { 0x10, LOCALE_GENRE_MOVIE_0,0 }, + { 0x11, LOCALE_GENRE_MOVIE_1,0 }, + { 0x12, LOCALE_GENRE_MOVIE_2,0 }, + { 0x13, LOCALE_GENRE_MOVIE_3,0 }, + { 0x14, LOCALE_GENRE_MOVIE_4,0 }, + { 0x15, LOCALE_GENRE_MOVIE_5,0 }, + { 0x16, LOCALE_GENRE_MOVIE_6,0 }, + { 0x17, LOCALE_GENRE_MOVIE_7,0 }, + { 0x18, LOCALE_GENRE_MOVIE_8,0 }, + { 0x20, LOCALE_GENRE_NEWS_0,0 }, + { 0x21, LOCALE_GENRE_NEWS_1,0 }, + { 0x22, LOCALE_GENRE_NEWS_2,0 }, + { 0x23, LOCALE_GENRE_NEWS_3,0 }, + { 0x24, LOCALE_GENRE_NEWS_4,0 }, + { 0x30, LOCALE_GENRE_SHOW_0,0 }, + { 0x31, LOCALE_GENRE_SHOW_1,0 }, + { 0x32, LOCALE_GENRE_SHOW_2,0 }, + { 0x33, LOCALE_GENRE_SHOW_3,0 }, + { 0x40, LOCALE_GENRE_SPORTS_0,0 }, + { 0x41, LOCALE_GENRE_SPORTS_1,0 }, + { 0x42, LOCALE_GENRE_SPORTS_2,0 }, + { 0x43, LOCALE_GENRE_SPORTS_3,0 }, + { 0x44, LOCALE_GENRE_SPORTS_4,0 }, + { 0x45, LOCALE_GENRE_SPORTS_5,0 }, + { 0x46, LOCALE_GENRE_SPORTS_6,0 }, + { 0x47, LOCALE_GENRE_SPORTS_7,0 }, + { 0x48, LOCALE_GENRE_SPORTS_8,0 }, + { 0x49, LOCALE_GENRE_SPORTS_9,0 }, + { 0x4A, LOCALE_GENRE_SPORTS_10,0 }, + { 0x4B, LOCALE_GENRE_SPORTS_11,0 }, + { 0x50, LOCALE_GENRE_CHILDRENS_PROGRAMMES_0,0 }, + { 0x51, LOCALE_GENRE_CHILDRENS_PROGRAMMES_1,0 }, + { 0x52, LOCALE_GENRE_CHILDRENS_PROGRAMMES_2,0 }, + { 0x53, LOCALE_GENRE_CHILDRENS_PROGRAMMES_3,0 }, + { 0x54, LOCALE_GENRE_CHILDRENS_PROGRAMMES_4,0 }, + { 0x55, LOCALE_GENRE_CHILDRENS_PROGRAMMES_5,0 }, + { 0x60, LOCALE_GENRE_MUSIC_DANCE_0,0 }, + { 0x61, LOCALE_GENRE_MUSIC_DANCE_1,0 }, + { 0x62, LOCALE_GENRE_MUSIC_DANCE_2,0 }, + { 0x63, LOCALE_GENRE_MUSIC_DANCE_3,0 }, + { 0x64, LOCALE_GENRE_MUSIC_DANCE_4,0 }, + { 0x65, LOCALE_GENRE_MUSIC_DANCE_5,0 }, + { 0x66, LOCALE_GENRE_MUSIC_DANCE_6,0 }, + { 0x70, LOCALE_GENRE_ARTS_0,0 }, + { 0x71, LOCALE_GENRE_ARTS_1,0 }, + { 0x72, LOCALE_GENRE_ARTS_2,0 }, + { 0x73, LOCALE_GENRE_ARTS_3,0 }, + { 0x74, LOCALE_GENRE_ARTS_4,0 }, + { 0x75, LOCALE_GENRE_ARTS_5,0 }, + { 0x76, LOCALE_GENRE_ARTS_6,0 }, + { 0x77, LOCALE_GENRE_ARTS_7,0 }, + { 0x78, LOCALE_GENRE_ARTS_8,0 }, + { 0x79, LOCALE_GENRE_ARTS_9,0 }, + { 0x7A, LOCALE_GENRE_ARTS_10,0 }, + { 0x7B, LOCALE_GENRE_ARTS_11,0 }, + { 0x80, LOCALE_GENRE_SOCIAL_POLITICAL_0,0 }, + { 0x81, LOCALE_GENRE_SOCIAL_POLITICAL_1,0 }, + { 0x82, LOCALE_GENRE_SOCIAL_POLITICAL_2,0 }, + { 0x83, LOCALE_GENRE_SOCIAL_POLITICAL_3,0 }, + { 0x90, LOCALE_GENRE_DOCUS_MAGAZINES_0,0 }, + { 0x91, LOCALE_GENRE_DOCUS_MAGAZINES_1,0 }, + { 0x92, LOCALE_GENRE_DOCUS_MAGAZINES_2,0 }, + { 0x93, LOCALE_GENRE_DOCUS_MAGAZINES_3,0 }, + { 0x94, LOCALE_GENRE_DOCUS_MAGAZINES_4,0 }, + { 0x95, LOCALE_GENRE_DOCUS_MAGAZINES_5,0 }, + { 0x96, LOCALE_GENRE_DOCUS_MAGAZINES_6,0 }, + { 0x97, LOCALE_GENRE_DOCUS_MAGAZINES_7,0 }, + { 0xA0, LOCALE_GENRE_TRAVEL_HOBBIES_0,0 }, + { 0xA1, LOCALE_GENRE_TRAVEL_HOBBIES_1,0 }, + { 0xA2, LOCALE_GENRE_TRAVEL_HOBBIES_2,0 }, + { 0xA3, LOCALE_GENRE_TRAVEL_HOBBIES_3,0 }, + { 0xA4, LOCALE_GENRE_TRAVEL_HOBBIES_4,0 }, + { 0xA5, LOCALE_GENRE_TRAVEL_HOBBIES_5,0 }, + { 0xA6, LOCALE_GENRE_TRAVEL_HOBBIES_6,0 }, + { 0xA7, LOCALE_GENRE_TRAVEL_HOBBIES_7,0} }; #define GENRE_MOVIE_COUNT 9 const CMenuOptionChooser::keyval genre_movie[GENRE_MOVIE_COUNT] = { - { 0, LOCALE_GENRE_MOVIE_0}, - { 1, LOCALE_GENRE_MOVIE_1}, - { 2, LOCALE_GENRE_MOVIE_2}, - { 3, LOCALE_GENRE_MOVIE_3}, - { 4, LOCALE_GENRE_MOVIE_4}, - { 5, LOCALE_GENRE_MOVIE_5}, - { 6, LOCALE_GENRE_MOVIE_6}, - { 7, LOCALE_GENRE_MOVIE_7}, - { 8, LOCALE_GENRE_MOVIE_8} + { 0, LOCALE_GENRE_MOVIE_0,0 }, + { 1, LOCALE_GENRE_MOVIE_1,0 }, + { 2, LOCALE_GENRE_MOVIE_2,0 }, + { 3, LOCALE_GENRE_MOVIE_3,0 }, + { 4, LOCALE_GENRE_MOVIE_4,0 }, + { 5, LOCALE_GENRE_MOVIE_5,0 }, + { 6, LOCALE_GENRE_MOVIE_6,0 }, + { 7, LOCALE_GENRE_MOVIE_7,0 }, + { 8, LOCALE_GENRE_MOVIE_8,0 } }; #define GENRE_NEWS_COUNT 5 const CMenuOptionChooser::keyval genre_news[GENRE_NEWS_COUNT] = { - { 0, LOCALE_GENRE_NEWS_0}, - { 1, LOCALE_GENRE_NEWS_1}, - { 2, LOCALE_GENRE_NEWS_2}, - { 3, LOCALE_GENRE_NEWS_3}, - { 4, LOCALE_GENRE_NEWS_4} + { 0, LOCALE_GENRE_NEWS_0,0 }, + { 1, LOCALE_GENRE_NEWS_1,0 }, + { 2, LOCALE_GENRE_NEWS_2,0 }, + { 3, LOCALE_GENRE_NEWS_3,0 }, + { 4, LOCALE_GENRE_NEWS_4,0} }; #define GENRE_SHOW_COUNT 4 const CMenuOptionChooser::keyval genre_show[GENRE_SHOW_COUNT] = { - { 0, LOCALE_GENRE_SHOW_0}, - { 1, LOCALE_GENRE_SHOW_1}, - { 2, LOCALE_GENRE_SHOW_2}, - { 3, LOCALE_GENRE_SHOW_3} + { 0, LOCALE_GENRE_SHOW_0,0 }, + { 1, LOCALE_GENRE_SHOW_1,0 }, + { 2, LOCALE_GENRE_SHOW_2,0 }, + { 3, LOCALE_GENRE_SHOW_3,0} }; #define GENRE_SPORTS_COUNT 12 const CMenuOptionChooser::keyval genre_sports[GENRE_SPORTS_COUNT] = { - { 0, LOCALE_GENRE_SPORTS_0}, - { 1, LOCALE_GENRE_SPORTS_1}, - { 2, LOCALE_GENRE_SPORTS_2}, - { 3, LOCALE_GENRE_SPORTS_3}, - { 4, LOCALE_GENRE_SPORTS_4}, - { 5, LOCALE_GENRE_SPORTS_5}, - { 6, LOCALE_GENRE_SPORTS_6}, - { 7, LOCALE_GENRE_SPORTS_7}, - { 8, LOCALE_GENRE_SPORTS_8}, - { 9, LOCALE_GENRE_SPORTS_9}, - {10, LOCALE_GENRE_SPORTS_10}, - {11, LOCALE_GENRE_SPORTS_11} + { 0, LOCALE_GENRE_SPORTS_0,0 }, + { 1, LOCALE_GENRE_SPORTS_1,0 }, + { 2, LOCALE_GENRE_SPORTS_2,0 }, + { 3, LOCALE_GENRE_SPORTS_3,0 }, + { 4, LOCALE_GENRE_SPORTS_4,0 }, + { 5, LOCALE_GENRE_SPORTS_5,0 }, + { 6, LOCALE_GENRE_SPORTS_6,0 }, + { 7, LOCALE_GENRE_SPORTS_7,0 }, + { 8, LOCALE_GENRE_SPORTS_8,0 }, + { 9, LOCALE_GENRE_SPORTS_9,0 }, + {10, LOCALE_GENRE_SPORTS_10,0 }, + {11, LOCALE_GENRE_SPORTS_11,0} }; #define GENRE_CHILDRENS_PROGRAMMES_COUNT 6 const CMenuOptionChooser::keyval genre_childrens_programmes[GENRE_CHILDRENS_PROGRAMMES_COUNT] = { - { 0, LOCALE_GENRE_CHILDRENS_PROGRAMMES_0}, - { 1, LOCALE_GENRE_CHILDRENS_PROGRAMMES_1}, - { 2, LOCALE_GENRE_CHILDRENS_PROGRAMMES_2}, - { 3, LOCALE_GENRE_CHILDRENS_PROGRAMMES_3}, - { 4, LOCALE_GENRE_CHILDRENS_PROGRAMMES_4}, - { 5, LOCALE_GENRE_CHILDRENS_PROGRAMMES_5} + { 0, LOCALE_GENRE_CHILDRENS_PROGRAMMES_0,0 }, + { 1, LOCALE_GENRE_CHILDRENS_PROGRAMMES_1,0 }, + { 2, LOCALE_GENRE_CHILDRENS_PROGRAMMES_2,0 }, + { 3, LOCALE_GENRE_CHILDRENS_PROGRAMMES_3,0 }, + { 4, LOCALE_GENRE_CHILDRENS_PROGRAMMES_4,0 }, + { 5, LOCALE_GENRE_CHILDRENS_PROGRAMMES_5,0} }; #define GENRE_MUSIC_DANCE_COUNT 7 const CMenuOptionChooser::keyval genre_music_dance[GENRE_MUSIC_DANCE_COUNT] = { - { 0, LOCALE_GENRE_MUSIC_DANCE_0}, - { 1, LOCALE_GENRE_MUSIC_DANCE_1}, - { 2, LOCALE_GENRE_MUSIC_DANCE_2}, - { 3, LOCALE_GENRE_MUSIC_DANCE_3}, - { 4, LOCALE_GENRE_MUSIC_DANCE_4}, - { 5, LOCALE_GENRE_MUSIC_DANCE_5}, - { 6, LOCALE_GENRE_MUSIC_DANCE_6} + { 0, LOCALE_GENRE_MUSIC_DANCE_0,0 }, + { 1, LOCALE_GENRE_MUSIC_DANCE_1,0 }, + { 2, LOCALE_GENRE_MUSIC_DANCE_2,0 }, + { 3, LOCALE_GENRE_MUSIC_DANCE_3,0 }, + { 4, LOCALE_GENRE_MUSIC_DANCE_4,0 }, + { 5, LOCALE_GENRE_MUSIC_DANCE_5,0 }, + { 6, LOCALE_GENRE_MUSIC_DANCE_6,0} }; #define GENRE_ARTS_COUNT 12 const CMenuOptionChooser::keyval genre_arts_dance[GENRE_ARTS_COUNT] = { - { 0, LOCALE_GENRE_ARTS_0}, - { 1, LOCALE_GENRE_ARTS_1}, - { 2, LOCALE_GENRE_ARTS_2}, - { 3, LOCALE_GENRE_ARTS_3}, - { 4, LOCALE_GENRE_ARTS_4}, - { 5, LOCALE_GENRE_ARTS_5}, - { 6, LOCALE_GENRE_ARTS_6}, - { 7, LOCALE_GENRE_ARTS_7}, - { 8, LOCALE_GENRE_ARTS_8}, - { 9, LOCALE_GENRE_ARTS_9}, - {10, LOCALE_GENRE_ARTS_10}, - {11, LOCALE_GENRE_ARTS_11} + { 0, LOCALE_GENRE_ARTS_0,0 }, + { 1, LOCALE_GENRE_ARTS_1,0 }, + { 2, LOCALE_GENRE_ARTS_2,0 }, + { 3, LOCALE_GENRE_ARTS_3,0 }, + { 4, LOCALE_GENRE_ARTS_4,0 }, + { 5, LOCALE_GENRE_ARTS_5,0 }, + { 6, LOCALE_GENRE_ARTS_6,0 }, + { 7, LOCALE_GENRE_ARTS_7,0 }, + { 8, LOCALE_GENRE_ARTS_8,0 }, + { 9, LOCALE_GENRE_ARTS_9,0 }, + {10, LOCALE_GENRE_ARTS_10,0 }, + {11, LOCALE_GENRE_ARTS_11,0} }; #define GENRE_SOCIAL_POLITICAL_COUNT 4 const CMenuOptionChooser::keyval genre_social_political[GENRE_SOCIAL_POLITICAL_COUNT] = { - { 0, LOCALE_GENRE_SOCIAL_POLITICAL_0}, - { 1, LOCALE_GENRE_SOCIAL_POLITICAL_1}, - { 2, LOCALE_GENRE_SOCIAL_POLITICAL_2}, - { 3, LOCALE_GENRE_SOCIAL_POLITICAL_3} + { 0, LOCALE_GENRE_SOCIAL_POLITICAL_0,0 }, + { 1, LOCALE_GENRE_SOCIAL_POLITICAL_1,0 }, + { 2, LOCALE_GENRE_SOCIAL_POLITICAL_2,0 }, + { 3, LOCALE_GENRE_SOCIAL_POLITICAL_3,0} }; #define GENRE_DOCUS_MAGAZINES_COUNT 8 const CMenuOptionChooser::keyval genre_docus_magazines[GENRE_DOCUS_MAGAZINES_COUNT] = { - { 0, LOCALE_GENRE_DOCUS_MAGAZINES_0}, - { 1, LOCALE_GENRE_DOCUS_MAGAZINES_1}, - { 2, LOCALE_GENRE_DOCUS_MAGAZINES_2}, - { 3, LOCALE_GENRE_DOCUS_MAGAZINES_3}, - { 4, LOCALE_GENRE_DOCUS_MAGAZINES_4}, - { 5, LOCALE_GENRE_DOCUS_MAGAZINES_5}, - { 6, LOCALE_GENRE_DOCUS_MAGAZINES_6}, - { 7, LOCALE_GENRE_DOCUS_MAGAZINES_7} + { 0, LOCALE_GENRE_DOCUS_MAGAZINES_0,0 }, + { 1, LOCALE_GENRE_DOCUS_MAGAZINES_1,0 }, + { 2, LOCALE_GENRE_DOCUS_MAGAZINES_2,0 }, + { 3, LOCALE_GENRE_DOCUS_MAGAZINES_3,0 }, + { 4, LOCALE_GENRE_DOCUS_MAGAZINES_4,0 }, + { 5, LOCALE_GENRE_DOCUS_MAGAZINES_5,0 }, + { 6, LOCALE_GENRE_DOCUS_MAGAZINES_6,0 }, + { 7, LOCALE_GENRE_DOCUS_MAGAZINES_7,0} }; #define GENRE_TRAVEL_HOBBIES_COUNT 8 const CMenuOptionChooser::keyval genre_travel_hobbies[GENRE_TRAVEL_HOBBIES_COUNT] = { - { 0, LOCALE_GENRE_TRAVEL_HOBBIES_0}, - { 1, LOCALE_GENRE_TRAVEL_HOBBIES_1}, - { 2, LOCALE_GENRE_TRAVEL_HOBBIES_2}, - { 3, LOCALE_GENRE_TRAVEL_HOBBIES_3}, - { 4, LOCALE_GENRE_TRAVEL_HOBBIES_4}, - { 5, LOCALE_GENRE_TRAVEL_HOBBIES_5}, - { 6, LOCALE_GENRE_TRAVEL_HOBBIES_6}, - { 7, LOCALE_GENRE_TRAVEL_HOBBIES_7} + { 0, LOCALE_GENRE_TRAVEL_HOBBIES_0,0 }, + { 1, LOCALE_GENRE_TRAVEL_HOBBIES_1,0 }, + { 2, LOCALE_GENRE_TRAVEL_HOBBIES_2,0 }, + { 3, LOCALE_GENRE_TRAVEL_HOBBIES_3,0 }, + { 4, LOCALE_GENRE_TRAVEL_HOBBIES_4,0 }, + { 5, LOCALE_GENRE_TRAVEL_HOBBIES_5,0 }, + { 6, LOCALE_GENRE_TRAVEL_HOBBIES_6,0 }, + { 7, LOCALE_GENRE_TRAVEL_HOBBIES_7,0} }; #define GENRE_MAJOR_COUNT 10 const CMenuOptionChooser::keyval genre_major[GENRE_MAJOR_COUNT] = { - { 1, LOCALE_GENRE_MOVIE_0}, - { 2, LOCALE_GENRE_NEWS_0}, - { 3, LOCALE_GENRE_SHOW_0}, - { 4, LOCALE_GENRE_SPORTS_0}, - { 5, LOCALE_GENRE_CHILDRENS_PROGRAMMES_0}, - { 6, LOCALE_GENRE_MUSIC_DANCE_0}, - { 7, LOCALE_GENRE_ARTS_0}, - { 8, LOCALE_GENRE_SOCIAL_POLITICAL_0}, - { 9, LOCALE_GENRE_DOCUS_MAGAZINES_0}, - { 10, LOCALE_GENRE_TRAVEL_HOBBIES_0} + { 1, LOCALE_GENRE_MOVIE_0,0 }, + { 2, LOCALE_GENRE_NEWS_0,0 }, + { 3, LOCALE_GENRE_SHOW_0,0 }, + { 4, LOCALE_GENRE_SPORTS_0,0 }, + { 5, LOCALE_GENRE_CHILDRENS_PROGRAMMES_0,0 }, + { 6, LOCALE_GENRE_MUSIC_DANCE_0,0 }, + { 7, LOCALE_GENRE_ARTS_0,0 }, + { 8, LOCALE_GENRE_SOCIAL_POLITICAL_0,0 }, + { 9, LOCALE_GENRE_DOCUS_MAGAZINES_0,0 }, + { 10, LOCALE_GENRE_TRAVEL_HOBBIES_0,0} }; diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index fadcdbc6d..251352dc5 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -59,6 +59,7 @@ #include #include #include +#include #include #include @@ -782,7 +783,7 @@ void CMoviePlayerGui::PlayFile(void) switch(g_ac3flags[count]) { case 1: /*AC3,EAC3*/ - if (apidtitle.find("AC3") < 0 || is_file_player) + if (apidtitle.find("AC3") == std::numeric_limits::max() || is_file_player) apidtitle.append(" (AC3)"); break; case 2: /*teletext*/ diff --git a/src/gui/nfs.cpp b/src/gui/nfs.cpp index ccf1b841b..0fd76867e 100644 --- a/src/gui/nfs.cpp +++ b/src/gui/nfs.cpp @@ -199,16 +199,16 @@ int CNFSMountGui::menu() #define MESSAGEBOX_NO_YES_OPTION_COUNT 2 const CMenuOptionChooser::keyval MESSAGEBOX_NO_YES_OPTIONS[MESSAGEBOX_NO_YES_OPTION_COUNT] = { - { 0, LOCALE_MESSAGEBOX_NO }, - { 1, LOCALE_MESSAGEBOX_YES } + { 0, LOCALE_MESSAGEBOX_NO ,0}, + { 1, LOCALE_MESSAGEBOX_YES ,0} }; #define NFS_TYPE_OPTION_COUNT 3 const CMenuOptionChooser::keyval NFS_TYPE_OPTIONS[NFS_TYPE_OPTION_COUNT] = { - { CFSMounter::NFS , LOCALE_NFS_TYPE_NFS }, - { CFSMounter::CIFS, LOCALE_NFS_TYPE_CIFS } /*, - { CFSMounter::LUFS, LOCALE_NFS_TYPE_LUFS } */ + { CFSMounter::NFS , LOCALE_NFS_TYPE_NFS ,0}, + { CFSMounter::CIFS, LOCALE_NFS_TYPE_CIFS ,0} /*, + { CFSMounter::LUFS, LOCALE_NFS_TYPE_LUFS ,0} */ }; int CNFSMountGui::menuEntry(int nr) diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index ec9afa622..00f6b09fd 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -384,18 +384,18 @@ void CScanTs::hide() freqready = 0; } -void CScanTs::paintLineLocale(int x, int * y, int width, const neutrino_locale_t l) +void CScanTs::paintLineLocale(int px, int * py, int pwidth, const neutrino_locale_t l) { - frameBuffer->paintBoxRel(x, *y, width, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x, *y + mheight, width, g_Locale->getText(l), COL_MENUCONTENTINACTIVE, 0, true); // UTF-8 - *y += mheight; + frameBuffer->paintBoxRel(px, *py, pwidth, mheight, COL_MENUCONTENT_PLUS_0); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, *py + mheight, pwidth, g_Locale->getText(l), COL_MENUCONTENTINACTIVE, 0, true); // UTF-8 + *py += mheight; } -void CScanTs::paintLine(int x, int y, int w, const char * const txt) +void CScanTs::paintLine(int px, int py, int w, const char * const txt) { -//printf("CScanTs::paintLine x %d y %d w %d width %d xpos2 %d: %s\n", x, y, w, width, xpos2, txt); - frameBuffer->paintBoxRel(x, y, w, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x, y + mheight, w, txt, COL_MENUCONTENT, 0, true); // UTF-8 +//printf("CScanTs::paintLine x %d y %d w %d width %d xpos2 %d: %s\n", px, py, w, width, xpos2, txt); + frameBuffer->paintBoxRel(px, py, w, mheight, COL_MENUCONTENT_PLUS_0); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, py + mheight, w, txt, COL_MENUCONTENT, 0, true); // UTF-8 } void CScanTs::paint(bool fortest) diff --git a/src/gui/screensetup.cpp b/src/gui/screensetup.cpp index 47026dfff..497ca0e81 100644 --- a/src/gui/screensetup.cpp +++ b/src/gui/screensetup.cpp @@ -200,9 +200,9 @@ void CScreenSetup::hide() frameBuffer->paintBackgroundBox(0, 0, w, h); } -void CScreenSetup::paintBorder( int selected ) +void CScreenSetup::paintBorder( int pselected ) { - if ( selected == 0 ) + if ( pselected == 0 ) paintBorderUL(); else paintBorderLR(); @@ -233,10 +233,10 @@ void CScreenSetup::paintCoords() //int x=15*19; //int y=15*16; - int x = (frameBuffer->getScreenWidth(true) - w) / 2; - int y = (frameBuffer->getScreenHeight(true) - h) / 2; + int x1 = (frameBuffer->getScreenWidth(true) - w) / 2; + int y1 = (frameBuffer->getScreenHeight(true) - h) / 2; - frameBuffer->paintBoxRel(x,y, 15*9,15*6, COL_MENUCONTENT_PLUS_0); + frameBuffer->paintBoxRel(x1,y1, 15*9,15*6, COL_MENUCONTENT_PLUS_0); char xpos[30]; char ypos[30]; @@ -248,10 +248,10 @@ void CScreenSetup::paintCoords() sprintf((char*) &xepos, "EX: %d", x_coord[1] ); sprintf((char*) &yepos, "EY: %d", y_coord[1] ); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,y+30, 200, xpos, COL_MENUCONTENT); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,y+50, 200, ypos, COL_MENUCONTENT); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,y+70, 200, xepos, COL_MENUCONTENT); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,y+90, 200, yepos, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x1+10,y1+30, 200, xpos, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x1+10,y1+50, 200, ypos, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x1+10,y1+70, 200, xepos, COL_MENUCONTENT); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x1+10,y1+90, 200, yepos, COL_MENUCONTENT); } inline unsigned int make16color(__u32 rgb) @@ -286,9 +286,9 @@ void CScreenSetup::paint() frameBuffer->paintBoxRel(x, y, BoxWidth, BoxHeight/2, COL_MENUCONTENTSELECTED_PLUS_0); //upper selected box frameBuffer->paintBoxRel(x, y+BoxHeight/2, BoxWidth, BoxHeight/2, COL_MENUCONTENT_PLUS_0); //lower selected box - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+30, y+BoxHeight/2, BoxWidth, + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+30, y+BoxHeight/2, BoxWidth, g_Locale->getText(LOCALE_SCREENSETUP_UPPERLEFT ), COL_MENUCONTENTSELECTED , 0, true); // UTF-8 - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+30, y+BoxHeight, BoxWidth, + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+30, y+BoxHeight, BoxWidth, g_Locale->getText(LOCALE_SCREENSETUP_LOWERRIGHT), COL_MENUCONTENT, 0, true); // UTF-8 //new end #if 0 // old diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 6dd16af5e..dbd56a9ba 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -893,20 +893,20 @@ std::string CTimerList::convertChannelId2String(const t_channel_id id) // UTF-8 #define TIMERLIST_REPEAT_OPTION_COUNT 7 const CMenuOptionChooser::keyval TIMERLIST_REPEAT_OPTIONS[TIMERLIST_REPEAT_OPTION_COUNT] = { - { CTimerd::TIMERREPEAT_ONCE , LOCALE_TIMERLIST_REPEAT_ONCE }, - { CTimerd::TIMERREPEAT_DAILY , LOCALE_TIMERLIST_REPEAT_DAILY }, - { CTimerd::TIMERREPEAT_WEEKLY , LOCALE_TIMERLIST_REPEAT_WEEKLY }, - { CTimerd::TIMERREPEAT_BIWEEKLY , LOCALE_TIMERLIST_REPEAT_BIWEEKLY }, - { CTimerd::TIMERREPEAT_FOURWEEKLY , LOCALE_TIMERLIST_REPEAT_FOURWEEKLY }, - { CTimerd::TIMERREPEAT_MONTHLY , LOCALE_TIMERLIST_REPEAT_MONTHLY }, - { CTimerd::TIMERREPEAT_WEEKDAYS , LOCALE_TIMERLIST_REPEAT_WEEKDAYS } + { CTimerd::TIMERREPEAT_ONCE , LOCALE_TIMERLIST_REPEAT_ONCE ,0}, + { CTimerd::TIMERREPEAT_DAILY , LOCALE_TIMERLIST_REPEAT_DAILY ,0}, + { CTimerd::TIMERREPEAT_WEEKLY , LOCALE_TIMERLIST_REPEAT_WEEKLY ,0}, + { CTimerd::TIMERREPEAT_BIWEEKLY , LOCALE_TIMERLIST_REPEAT_BIWEEKLY ,0}, + { CTimerd::TIMERREPEAT_FOURWEEKLY , LOCALE_TIMERLIST_REPEAT_FOURWEEKLY ,0}, + { CTimerd::TIMERREPEAT_MONTHLY , LOCALE_TIMERLIST_REPEAT_MONTHLY ,0}, + { CTimerd::TIMERREPEAT_WEEKDAYS , LOCALE_TIMERLIST_REPEAT_WEEKDAYS ,0} }; #define TIMERLIST_STANDBY_OPTION_COUNT 2 const CMenuOptionChooser::keyval TIMERLIST_STANDBY_OPTIONS[TIMERLIST_STANDBY_OPTION_COUNT] = { - { 0 , LOCALE_TIMERLIST_STANDBY_OFF }, - { 1 , LOCALE_TIMERLIST_STANDBY_ON } + { 0 , LOCALE_TIMERLIST_STANDBY_OFF ,0}, + { 1 , LOCALE_TIMERLIST_STANDBY_ON ,0} }; #if 1 @@ -916,23 +916,23 @@ const CMenuOptionChooser::keyval TIMERLIST_STANDBY_OPTIONS[TIMERLIST_STANDBY_OPT #endif const CMenuOptionChooser::keyval TIMERLIST_TYPE_OPTIONS[TIMERLIST_TYPE_OPTION_COUNT] = { - { CTimerd::TIMER_SHUTDOWN , LOCALE_TIMERLIST_TYPE_SHUTDOWN }, + { CTimerd::TIMER_SHUTDOWN , LOCALE_TIMERLIST_TYPE_SHUTDOWN ,0}, #if 0 { CTimerd::TIMER_NEXTPROGRAM, LOCALE_TIMERLIST_TYPE_NEXTPROGRAM }, #endif - { CTimerd::TIMER_ZAPTO , LOCALE_TIMERLIST_TYPE_ZAPTO }, - { CTimerd::TIMER_STANDBY , LOCALE_TIMERLIST_TYPE_STANDBY }, - { CTimerd::TIMER_RECORD , LOCALE_TIMERLIST_TYPE_RECORD }, - { CTimerd::TIMER_SLEEPTIMER , LOCALE_TIMERLIST_TYPE_SLEEPTIMER }, - { CTimerd::TIMER_REMIND , LOCALE_TIMERLIST_TYPE_REMIND }, - { CTimerd::TIMER_EXEC_PLUGIN, LOCALE_TIMERLIST_TYPE_EXECPLUGIN } + { CTimerd::TIMER_ZAPTO , LOCALE_TIMERLIST_TYPE_ZAPTO ,0}, + { CTimerd::TIMER_STANDBY , LOCALE_TIMERLIST_TYPE_STANDBY ,0}, + { CTimerd::TIMER_RECORD , LOCALE_TIMERLIST_TYPE_RECORD ,0}, + { CTimerd::TIMER_SLEEPTIMER , LOCALE_TIMERLIST_TYPE_SLEEPTIMER ,0}, + { CTimerd::TIMER_REMIND , LOCALE_TIMERLIST_TYPE_REMIND ,0}, + { CTimerd::TIMER_EXEC_PLUGIN, LOCALE_TIMERLIST_TYPE_EXECPLUGIN ,0} }; #define MESSAGEBOX_NO_YES_OPTION_COUNT 2 const CMenuOptionChooser::keyval MESSAGEBOX_NO_YES_OPTIONS[MESSAGEBOX_NO_YES_OPTION_COUNT] = { - { 0, LOCALE_MESSAGEBOX_NO }, - { 1, LOCALE_MESSAGEBOX_YES } + { 0, LOCALE_MESSAGEBOX_NO ,0}, + { 1, LOCALE_MESSAGEBOX_YES ,0} }; int CTimerList::modifyTimer() diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 554286f01..020d1175a 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -112,9 +112,9 @@ class CNonLocalizedMenuSeparator : public CMenuSeparator const char * the_text; public: - CNonLocalizedMenuSeparator(const char * text, const neutrino_locale_t Text) : CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, Text) + CNonLocalizedMenuSeparator(const char * ptext, const neutrino_locale_t Text1) : CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, Text1) { - the_text = text; + the_text = ptext; } virtual const char * getString(void) @@ -200,7 +200,7 @@ printf("[update] url %s version %s md5 %s name %s\n", url.c_str(), version.c_str description += versionInfo.getDate(); description += ' '; description += versionInfo.getTime(); - + descriptions.push_back(description); /* workaround since CMenuForwarder does not store the Option String itself */ SelectionWidget.addItem(new CMenuForwarderNonLocalized(names[i].c_str(), enabled, descriptions[i].c_str(), new CUpdateMenuTarget(i, &selected))); @@ -216,7 +216,7 @@ printf("[update] url %s version %s md5 %s name %s\n", url.c_str(), version.c_str ShowHintUTF(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_FLASHUPDATE_GETINFOFILEERROR)); // UTF-8 return false; } - + SelectionWidget.exec(NULL, ""); if (selected == -1) @@ -273,13 +273,13 @@ printf("[update] mode is %d\n", g_settings.softupdate_mode); showLocalStatus(100); showGlobalStatus(20); hide(); - + msg_body = LOCALE_FLASHUPDATE_MSGBOX; #ifdef SQUASHFS versionInfo = new CFlashVersionInfo(newVersion);//Memory leak: versionInfo sprintf(msg, g_Locale->getText(msg_body), versionInfo->getDate(), versionInfo->getTime(), versionInfo->getReleaseCycle(), versionInfo->getType()); - if(fileType < '3') + if(fileType < '3') { if ((strncmp(RELEASE_CYCLE, versionInfo->getReleaseCycle(), 2) != 0) && (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_WRONGBASE), CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, "softupdate.raw") != CMessageBox::mbrYes)) @@ -456,7 +456,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &) free(buffer); } } - else // not image, install + else // not image, install { char cmd[100]; sprintf(cmd, "install.sh %s %s", g_settings.update_dir, filename.c_str()); @@ -483,25 +483,25 @@ CFlashExpert::CFlashExpert() selectedMTD = -1; } -void CFlashExpert::readmtd(int readmtd) +void CFlashExpert::readmtd(int preadmtd) { char tmp[10]; - sprintf(tmp, "%d", readmtd); + sprintf(tmp, "%d", preadmtd); std::string filename = "/tmp/mtd"; filename += tmp; filename += ".img"; // US-ASCII (subset of UTF-8 and ISO8859-1) - if (readmtd == -1) { + if (preadmtd == -1) { filename = "/tmp/flashimage.img"; // US-ASCII (subset of UTF-8 and ISO8859-1) - readmtd = MTD_OF_WHOLE_IMAGE; + preadmtd = MTD_OF_WHOLE_IMAGE; } setTitle(LOCALE_FLASHUPDATE_TITLEREADFLASH); paint(); showGlobalStatus(0); - showStatusMessageUTF((std::string(g_Locale->getText(LOCALE_FLASHUPDATE_ACTIONREADFLASH)) + " (" + CMTDInfo::getInstance()->getMTDName(readmtd) + ')')); // UTF-8 + showStatusMessageUTF((std::string(g_Locale->getText(LOCALE_FLASHUPDATE_ACTIONREADFLASH)) + " (" + CMTDInfo::getInstance()->getMTDName(preadmtd) + ')')); // UTF-8 CFlashTool ft; ft.setStatusViewer( this ); - ft.setMTDDevice(CMTDInfo::getInstance()->getMTDFileName(readmtd)); + ft.setMTDDevice(CMTDInfo::getInstance()->getMTDFileName(preadmtd)); if(!ft.readFromMTD(filename, 100)) { showStatusMessageUTF(ft.getErrorMessage()); // UTF-8 @@ -560,10 +560,10 @@ void CFlashExpert::showMTDSelector(const std::string & actionkey) mtdselector->addItem(new CMenuForwarder(LOCALE_MESSAGEBOX_CANCEL)); mtdselector->addItem(GenericMenuSeparatorLine); CMTDInfo* mtdInfo =CMTDInfo::getInstance(); - for(int x=0;xgetMTDCount();x++) { + for(int lx=0;lxgetMTDCount();lx++) { char sActionKey[20]; - sprintf(sActionKey, "%s%d", actionkey.c_str(), x); - mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(x).c_str(), true, NULL, this, sActionKey)); + sprintf(sActionKey, "%s%d", actionkey.c_str(), lx); + mtdselector->addItem(new CMenuForwarderNonLocalized(mtdInfo->getMTDName(lx).c_str(), true, NULL, this, sActionKey)); } mtdselector->exec(NULL,""); delete mtdselector; diff --git a/src/gui/widget/colorchooser.cpp b/src/gui/widget/colorchooser.cpp index 5ee4c85e9..9f6b16757 100644 --- a/src/gui/widget/colorchooser.cpp +++ b/src/gui/widget/colorchooser.cpp @@ -244,13 +244,13 @@ void CColorChooser::paint() frameBuffer->paintBoxRel(x+222,y+hheight+2+5, mheight*4-4 ,mheight*4-4-10, 254); } -void CColorChooser::paintSlider(int x, int y, unsigned char *spos, const neutrino_locale_t text, const char * const iconname, const bool selected) +void CColorChooser::paintSlider(int px, int py, unsigned char *spos, const neutrino_locale_t text, const char * const iconname, const bool selected) { if (!spos) return; - frameBuffer->paintBoxRel(x+70,y,120,mheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintIcon("volumebody.raw",x+70,y+2+mheight/4); - frameBuffer->paintIcon(selected ? iconname : "volumeslider2.raw",x+73+(*spos),y+mheight/4); + frameBuffer->paintBoxRel(px+70,py,120,mheight, COL_MENUCONTENT_PLUS_0); + frameBuffer->paintIcon("volumebody.raw",px+70,py+2+mheight/4); + frameBuffer->paintIcon(selected ? iconname : "volumeslider2.raw",px+73+(*spos),py+mheight/4); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x,y+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px,py+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 } diff --git a/src/gui/widget/keychooser.cpp b/src/gui/widget/keychooser.cpp index c3b4de631..0345fd77f 100644 --- a/src/gui/widget/keychooser.cpp +++ b/src/gui/widget/keychooser.cpp @@ -124,10 +124,12 @@ int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &) get_Message: g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd ); - + if (msg != CRCInput::RC_timeout) { - if ((msg >= 0) && (msg <= CRCInput::RC_MaxRC)) +// comparing an unsigned int against >= 0 is senseless! +// if ((msg >= 0) && (msg <= CRCInput::RC_MaxRC)) + if ((msg >0 ) && (msg <= CRCInput::RC_MaxRC)) *key = msg; else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all) res = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/widget/listbox.cpp b/src/gui/widget/listbox.cpp index 3fb92bd65..14da2632a 100644 --- a/src/gui/widget/listbox.cpp +++ b/src/gui/widget/listbox.cpp @@ -124,14 +124,14 @@ int CListBox::getItemHeight() return fheight; } -void CListBox::paintItem(unsigned int /*itemNr*/, int paintNr, bool selected) +void CListBox::paintItem(unsigned int /*itemNr*/, int paintNr, bool pselected) { int ypos = y+ theight + paintNr*getItemHeight(); uint8_t color; fb_pixel_t bgcolor; - if (selected) + if (pselected) { color = COL_MENUCONTENTSELECTED; bgcolor = COL_MENUCONTENTSELECTED_PLUS_0; diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index 78ac063a9..4fd8bb586 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -32,7 +32,7 @@ Module Name: listframe.cpp . Description: Implementation of the CListFrame class - This class provides a plain Listbox with numerous rows and lines. + This class provides a plain Listbox with numerous rows and lines. Date: Nov 2005 @@ -61,10 +61,10 @@ #define SCROLL_MARKER_BORDER 2 #define MAX_WINDOW_WIDTH (frameBuffer->getScreenWidth() - 40) -#define MAX_WINDOW_HEIGHT (frameBuffer->getScreenHeight() - 40) +#define MAX_WINDOW_HEIGHT (frameBuffer->getScreenHeight() - 40) #define MIN_WINDOW_WIDTH (frameBuffer->getScreenWidth() >> 1) -#define MIN_WINDOW_HEIGHT 40 +#define MIN_WINDOW_HEIGHT 40 #define TITLE_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUHEAD_PLUS_0) #define HEADER_LIST_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUCONTENT_PLUS_0) @@ -75,7 +75,7 @@ #define TITLE_FONT_COLOR COL_MENUHEAD #define HEADER_LIST_FONT_COLOR COL_MENUCONTENT #define LIST_FONT_COLOR COL_MENUCONTENT -//#define LIST_FONT_COLOR_SELECTED COL_MENUCONTENT +//#define LIST_FONT_COLOR_SELECTED COL_MENUCONTENT #define LIST_FONT_COLOR_SELECTED COL_MENUCONTENTSELECTED #define FONT_LIST g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2] @@ -86,7 +86,7 @@ // Construction/Destruction ////////////////////////////////////////////////////////////////////// -CListFrame::CListFrame( LF_LINES* lines, Font* font_text, const int mode, +CListFrame::CListFrame( LF_LINES* lines, Font* font_text, const int pmode, const CBox* position, const char* textTitle, Font* font_title) { //TRACE("[CListFrame] new\r\n"); @@ -106,20 +106,20 @@ CListFrame::CListFrame( LF_LINES* lines, Font* font_text, const int mode, m_nMaxWidth = m_cFrame.iWidth; } - m_nMode = mode; + m_nMode = pmode; #if 0 TRACE(" Mode: "); - if(mode & SCROLL) TRACE("SCROLL "); - if(mode & AUTO_WIDTH) TRACE("AUTO_WIDTH "); - if(mode & AUTO_HIGH) TRACE("AUTO_HIGH"); + if(pmode & SCROLL) TRACE("SCROLL "); + if(pmode & AUTO_WIDTH) TRACE("AUTO_WIDTH "); + if(pmode & AUTO_HIGH) TRACE("AUTO_HIGH"); TRACE("\r\n"); #endif - if(font_title != NULL) + if(font_title != NULL) m_pcFontTitle = font_title; - if( textTitle != NULL) + if( textTitle != NULL) m_textTitle = textTitle; m_nFontListHeight = m_pcFontList->getHeight(); @@ -131,7 +131,7 @@ CListFrame::CListFrame( LF_LINES* lines, Font* font_text, const int mode, /* Initialise the window frames first */ initFramesRel(); - // than refresh text line array + // than refresh text line array onNewLineArray(); } @@ -151,7 +151,7 @@ CListFrame::CListFrame( LF_LINES* lines) /* Initialise the window frames first */ initFramesRel(); - // than refresh text line array + // than refresh text line array onNewLineArray(); } @@ -160,7 +160,7 @@ CListFrame::CListFrame() //TRACE("[CListFrame] new\r\n"); initVar(); initFramesRel(); - + m_pLines = NULL; } @@ -175,19 +175,19 @@ void CListFrame::initVar(void) frameBuffer = CFrameBuffer::getInstance(); //TRACE("[CListFrame]->InitVar\r\n"); m_nMode = SCROLL; - + m_showSelection = true; m_pcFontList = FONT_LIST ; m_nFontListHeight = m_pcFontList->getHeight(); - + m_pcFontHeaderList = FONT_HEADER_LIST ; m_nFontHeaderListHeight = m_pcFontHeaderList->getHeight(); - + m_pcFontTitle = FONT_TITLE; m_textTitle = "MovieBrowser"; m_nFontTitleHeight = m_pcFontTitle->getHeight(); - + m_nNrOfPages = 1; m_nNrOfLines = 0; m_nNrOfRows = 1; @@ -289,7 +289,7 @@ void CListFrame::initFramesRel(void) } m_cFrameListRel.iWidth = m_cFrame.iWidth - m_cFrameScrollRel.iWidth; - + if(m_nMode & HEADER_LINE) { m_cFrameHeaderListRel.iWidth = m_cFrame.iWidth - m_cFrameScrollRel.iWidth; @@ -299,7 +299,7 @@ void CListFrame::initFramesRel(void) } void CListFrame::onNewLineArray(void) -{ +{ //TRACE("[CListFrame]->onNewLineArray \r\n"); int maxTextWidth = 0; @@ -312,7 +312,7 @@ void CListFrame::onNewLineArray(void) { reSizeMainFrameWidth(maxTextWidth); } - + if(m_nMode & AUTO_HIGH) { reSizeMainFrameHeight(m_nNrOfLines * m_nFontListHeight); @@ -357,12 +357,12 @@ void CListFrame::refreshTitle(void) //TRACE("[CListFrame]->refreshHeaderList \r\n"); if( frameBuffer == NULL) return; - frameBuffer->paintBoxRel(m_cFrameTitleRel.iX+m_cFrame.iX, m_cFrameTitleRel.iY+m_cFrame.iY, + frameBuffer->paintBoxRel(m_cFrameTitleRel.iX+m_cFrame.iX, m_cFrameTitleRel.iY+m_cFrame.iY, m_cFrameTitleRel.iWidth, m_cFrameTitleRel.iHeight, TITLE_BACKGROUND_COLOR); - m_pcFontTitle->RenderString(m_cFrameTitleRel.iX + TEXT_BORDER_WIDTH + m_cFrame.iX, - m_cFrameTitleRel.iY + m_cFrameTitleRel.iHeight + m_cFrame.iY, - m_cFrameTitleRel.iWidth - (TEXT_BORDER_WIDTH << 1), + m_pcFontTitle->RenderString(m_cFrameTitleRel.iX + TEXT_BORDER_WIDTH + m_cFrame.iX, + m_cFrameTitleRel.iY + m_cFrameTitleRel.iHeight + m_cFrame.iY, + m_cFrameTitleRel.iWidth - (TEXT_BORDER_WIDTH << 1), m_textTitle.c_str(), TITLE_FONT_COLOR, 0, true); // UTF-8 } @@ -372,19 +372,19 @@ void CListFrame::refreshScroll(void) if( frameBuffer == NULL) return; if(!(m_nMode & SCROLL)) return; - if (m_nNrOfPages > 1) + if (m_nNrOfPages > 1) { - frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, + frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, COL_MENUCONTENT_PLUS_1); unsigned int marker_size = m_cFrameScrollRel.iHeight / m_nNrOfPages; - frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX, - m_cFrameScrollRel.iY + m_nCurrentPage * marker_size +m_cFrame.iY, - m_cFrameScrollRel.iWidth - (2*SCROLL_MARKER_BORDER), + frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX, + m_cFrameScrollRel.iY + m_nCurrentPage * marker_size +m_cFrame.iY, + m_cFrameScrollRel.iWidth - (2*SCROLL_MARKER_BORDER), marker_size, COL_MENUCONTENT_PLUS_3); } else { - frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, + frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, COL_MENUCONTENT_PLUS_0); } } @@ -393,15 +393,15 @@ void CListFrame::refreshList(void) { //TRACE("[CListFrame]->refreshList: %d\r\n",m_nCurrentLine); if( frameBuffer == NULL) return; - frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, m_cFrameListRel.iY+m_cFrame.iY, + frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, m_cFrameListRel.iY+m_cFrame.iY, m_cFrameListRel.iWidth, m_cFrameListRel.iHeight, LIST_BACKGROUND_COLOR); - if( m_nNrOfLines <= 0) + if( m_nNrOfLines <= 0) return; int y = m_cFrameListRel.iY + TEXT_BORDER_WIDTH ; for(int line = m_nCurrentLine; - line < m_nNrOfLines && line < m_nCurrentLine + m_nLinesPerPage; + line < m_nNrOfLines && line < m_nCurrentLine + m_nLinesPerPage; line++) { int color = LIST_FONT_COLOR; @@ -409,8 +409,8 @@ void CListFrame::refreshList(void) if(line == m_nSelectedLine && m_showSelection == true) { color = LIST_FONT_COLOR_SELECTED; - frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, - y+m_cFrame.iY, m_cFrameListRel.iWidth, + frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, + y+m_cFrame.iY, m_cFrameListRel.iWidth, m_nFontListHeight, LIST_BACKGROUND_COLOR_SELECTED, ROUND_RADIUS); } @@ -425,10 +425,10 @@ void CListFrame::refreshList(void) width = m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - TEXT_BORDER_WIDTH; //TRACE(" normalize width to %d , x:%d \r\n",width,x); } - m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, - width, m_pLines->lineArray[row][line].c_str(), + m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, + width, m_pLines->lineArray[row][line].c_str(), color, 0, true); // UTF-8 - x += m_pLines->rowWidth[row] + ROW_BORDER_WIDTH; + x += m_pLines->rowWidth[row] + ROW_BORDER_WIDTH; } } } @@ -448,14 +448,14 @@ void CListFrame::refreshLine(int line) if(line == m_nSelectedLine && m_showSelection == true) { color = LIST_FONT_COLOR_SELECTED; - frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, y+m_cFrame.iY, + frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, y+m_cFrame.iY, m_cFrameListRel.iWidth, m_nFontListHeight, LIST_BACKGROUND_COLOR_SELECTED, ROUND_RADIUS); } else { color = LIST_FONT_COLOR; - frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, y+m_cFrame.iY, + frameBuffer->paintBoxRel(m_cFrameListRel.iX+m_cFrame.iX, y+m_cFrame.iY, m_cFrameListRel.iWidth, m_nFontListHeight, LIST_BACKGROUND_COLOR); } int width; @@ -469,10 +469,10 @@ void CListFrame::refreshLine(int line) width = m_cFrameListRel.iWidth - x + m_cFrameListRel.iX - 2*TEXT_BORDER_WIDTH; //TRACE(" normalize to %d,x:%d\r\n",width,x); } - m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, - width, m_pLines->lineArray[row][line].c_str(), + m_pcFontList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, + width, m_pLines->lineArray[row][line].c_str(), color, 0, true); // UTF-8 - x += m_pLines->rowWidth[row] + ROW_BORDER_WIDTH; + x += m_pLines->rowWidth[row] + ROW_BORDER_WIDTH; } } @@ -482,7 +482,7 @@ void CListFrame::refreshHeaderList(void) if( frameBuffer == NULL) return; if(!(m_nMode & HEADER_LINE))return; - frameBuffer->paintBoxRel(m_cFrameHeaderListRel.iX+m_cFrame.iX, m_cFrameHeaderListRel.iY+m_cFrame.iY, + frameBuffer->paintBoxRel(m_cFrameHeaderListRel.iX+m_cFrame.iX, m_cFrameHeaderListRel.iY+m_cFrame.iY, m_cFrameHeaderListRel.iWidth, m_cFrameHeaderListRel.iHeight, HEADER_LIST_BACKGROUND_COLOR); int width; @@ -498,10 +498,10 @@ void CListFrame::refreshHeaderList(void) //TRACE(" normalize width to %d , x:%d \r\n",width,x); loop = false; } - m_pcFontHeaderList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, - width, m_pLines->lineHeader[row].c_str(), + m_pcFontHeaderList->RenderString(x+m_cFrame.iX, y+m_cFrame.iY, + width, m_pLines->lineHeader[row].c_str(), HEADER_LIST_FONT_COLOR, 0, true); // UTF-8 - x += m_pLines->rowWidth[row] + ROW_BORDER_WIDTH; + x += m_pLines->rowWidth[row] + ROW_BORDER_WIDTH; } } @@ -511,7 +511,7 @@ void CListFrame::scrollLineDown(const int lines) if( !(m_nMode & SCROLL)) return; if( m_nNrOfLines <= 1) return; - + if(m_nSelectedLine < m_nNrOfLines - 1) { m_nSelectedLine++; // check if the cursor moves out of the window @@ -528,7 +528,7 @@ void CListFrame::scrollLineDown(const int lines) m_nCurrentLine = m_nSelectedLine = 0; refreshList(); } - + } void CListFrame::scrollLineUp(const int lines) @@ -562,16 +562,16 @@ void CListFrame::scrollPageDown(const int pages) if( !(m_nMode & SCROLL)) return; if( m_nNrOfLines <= 1) return; - + if(m_nCurrentPage + pages < m_nNrOfPages) { - m_nCurrentPage += pages; + m_nCurrentPage += pages; } - else + else { m_nCurrentPage = m_nNrOfPages - 1; } - m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage; + m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage; if(m_nSelectedLine < m_nCurrentLine || m_nSelectedLine -m_nCurrentLine >= m_nLinesPerPage ) { m_nSelectedLine = m_nCurrentLine; @@ -589,13 +589,13 @@ void CListFrame::scrollPageUp(const int pages) if(m_nCurrentPage - pages > 0) { - m_nCurrentPage -= pages; + m_nCurrentPage -= pages; } - else + else { m_nCurrentPage = 0; } - m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage; + m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage; if(m_nSelectedLine < m_nCurrentLine || m_nSelectedLine - m_nCurrentLine >= m_nLinesPerPage ) { m_nSelectedLine = m_nCurrentLine; @@ -617,7 +617,7 @@ void CListFrame::refresh(void) bool CListFrame::setLines(LF_LINES* lines) { - if(lines == NULL) + if(lines == NULL) return(false); //TRACE("[CListFrame]->setLines \r\n"); @@ -628,7 +628,7 @@ bool CListFrame::setLines(LF_LINES* lines) m_nNrOfRows = LF_MAX_ROWS; onNewLineArray(); refresh(); - + return(true); } @@ -640,7 +640,7 @@ bool CListFrame::setTitle(char* title) m_textTitle = title; refreshTitle(); - + return(true); } @@ -649,7 +649,7 @@ bool CListFrame::setSelectedLine(int selection) //TRACE("[CListFrame]->setSelectedLine %d \r\n",selection); bool result = false; if(selection >= 0 && selection < m_nNrOfLines) - { + { m_nSelectedLine = selection; m_nCurrentPage = selection / m_nLinesPerPage; m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage; @@ -658,7 +658,7 @@ bool CListFrame::setSelectedLine(int selection) result = true; //TRACE(" selected line: %d,%d,%d \r\n",m_nSelectedLine,m_nCurrentPage,m_nCurrentLine); } - + return (result); } diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index cd1639924..2aa6196a8 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -372,12 +372,12 @@ class CLockedMenuForwarder : public CMenuForwarder, public CPINProtection protected: virtual CMenuTarget* getParent(){ return Parent;}; public: - CLockedMenuForwarder(const neutrino_locale_t Text, char* validPIN, bool alwaysAsk=false, const bool Active=true, char *Option=NULL, + CLockedMenuForwarder(const neutrino_locale_t Text, char* pvalidPIN, bool alwaysAsk=false, const bool Active=true, char *Option=NULL, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL) : CMenuForwarder(Text, Active, Option, Target, ActionKey, DirectKey, IconName) , - CPINProtection( validPIN){AlwaysAsk = alwaysAsk;}; + CPINProtection( pvalidPIN){AlwaysAsk = alwaysAsk;}; virtual int exec(CMenuTarget* parent); }; diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 523caf27d..e98f00216 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -736,11 +736,11 @@ int CMsgBox::exec( int timeout, int returnDefaultOnTimeout) ////////////////////////////////////////////////////////////////////// bool CMsgBox::setText(const std::string* newText) { - bool result = false; + bool lresult = false; // update text in textbox if there is one if(m_pcTextBox != NULL && newText != NULL) { - result = m_pcTextBox->setText(newText); + lresult = m_pcTextBox->setText(newText); if(m_nMode & AUTO_WIDTH || m_nMode & AUTO_HIGH) { /* window might changed in size ...*/ @@ -760,7 +760,7 @@ bool CMsgBox::setText(const std::string* newText) } } - return(result); + return(lresult); }; diff --git a/src/gui/widget/rgbcsynccontroler.cpp b/src/gui/widget/rgbcsynccontroler.cpp index f74a48d49..a6117c634 100644 --- a/src/gui/widget/rgbcsynccontroler.cpp +++ b/src/gui/widget/rgbcsynccontroler.cpp @@ -173,17 +173,17 @@ void CRGBCSyncControler::paint() // frameBuffer->paintHLineRel(x+10, width-20, y+hheight+mheight*3+mheight/4, COL_MENUCONTENT_PLUS_3); } -void CRGBCSyncControler::paintSlider(int x, int y, unsigned int spos, float factor, const neutrino_locale_t text, bool selected) +void CRGBCSyncControler::paintSlider(int px, int py, unsigned int spos, float factor, const neutrino_locale_t text, bool selected) { int startx = 200; char wert[5]; - frameBuffer->paintBoxRel(x + startx, y, 120, mheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintIcon("volumebody.raw", x + startx, y+2+mheight/4); - frameBuffer->paintIcon(selected ? "volumeslider2blue.raw" : "volumeslider2.raw", (int)(x + (startx+3)+(spos / factor)), y+mheight/4); + frameBuffer->paintBoxRel(px + startx, py, 120, mheight, COL_MENUCONTENT_PLUS_0); + frameBuffer->paintIcon("volumebody.raw", px + startx, py+2+mheight/4); + frameBuffer->paintIcon(selected ? "volumeslider2blue.raw" : "volumeslider2.raw", (int)(px + (startx+3)+(spos / factor)), py+mheight/4); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x, y+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, py+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 sprintf(wert, "%3d", spos); // UTF-8 encoded - frameBuffer->paintBoxRel(x + startx + 120 + 10, y, 50, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x + startx + 120 + 10, y+mheight, width, wert, COL_MENUCONTENT, 0, true); // UTF-8 + frameBuffer->paintBoxRel(px + startx + 120 + 10, py, 50, mheight, COL_MENUCONTENT_PLUS_0); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px + startx + 120 + 10, py+mheight, width, wert, COL_MENUCONTENT, 0, true); // UTF-8 } diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 4463091c3..1f95a495c 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -3,8 +3,8 @@ Homepage: http://dbox.cyberphoria.org/ - Kommentar: - + Kommentar: + Diese GUI wurde von Grund auf neu programmiert und sollte nun vom Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert auf der Client-Server Idee, diese GUI ist also von der direkten DBox- @@ -63,12 +63,12 @@ #define SCROLL_MARKER_BORDER 2 #define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX - 40) -#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40) +#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40) #define MIN_WINDOW_WIDTH ((g_settings.screen_EndX - g_settings.screen_StartX)>>1) -#define MIN_WINDOW_HEIGHT 40 +#define MIN_WINDOW_HEIGHT 40 -CTextBox::CTextBox(const char * text, Font* font_text, const int mode, +CTextBox::CTextBox(const char * text, Font* font_text, const int pmode, const CBox* position, CFBWindow::color_t textBackgroundColor) { //TRACE("[CTextBox] new\r\n"); @@ -86,20 +86,20 @@ CTextBox::CTextBox(const char * text, Font* font_text, const int mode, m_nMaxWidth = m_cFrame.iWidth; } - m_nMode = mode; + m_nMode = pmode; /* in case of auto line break, we do no support auto width yet */ - if( !(mode & NO_AUTO_LINEBREAK)) + if( !(pmode & NO_AUTO_LINEBREAK)) { m_nMode = m_nMode & ~AUTO_WIDTH; /* delete any AUTO_WIDTH*/ } #if 0 TRACE(" Mode: "); - if(mode & SCROLL) TRACE("SCROLL "); - if(mode & NO_AUTO_LINEBREAK) TRACE("NO_AUTO_LINEBREAK "); - if(mode & AUTO_WIDTH) TRACE("AUTO_WIDTH "); - if(mode & AUTO_HIGH) TRACE("AUTO_HIGH"); + if(pmode & SCROLL) TRACE("SCROLL "); + if(pmode & NO_AUTO_LINEBREAK) TRACE("NO_AUTO_LINEBREAK "); + if(pmode & AUTO_WIDTH) TRACE("AUTO_WIDTH "); + if(pmode & AUTO_HIGH) TRACE("AUTO_HIGH"); TRACE("\r\n"); #endif @@ -112,7 +112,7 @@ CTextBox::CTextBox(const char * text, Font* font_text, const int mode, /* Initialise the window frames first */ initFramesRel(); - // than refresh text line array + // than refresh text line array refreshTextLineArray(); } @@ -127,7 +127,7 @@ CTextBox::CTextBox(const char * text) /* Initialise the window frames first */ initFramesRel(); - // than refresh text line array + // than refresh text line array refreshTextLineArray(); } @@ -171,7 +171,7 @@ void CTextBox::initVar(void) m_nMaxHeight = MAX_WINDOW_HEIGHT; m_nMaxWidth = MAX_WINDOW_WIDTH; - + m_textBackgroundColor = COL_MENUCONTENT_PLUS_0; m_cLineArray.clear(); @@ -196,7 +196,7 @@ void CTextBox::reSizeMainFrameHeight(int textHeight) { TRACE("[CTextBox]->ReSizeMainFrameHeight: %d, current: %d\r\n",textHeight,m_cFrameTextRel.iHeight); - int iNewWindowHeight = textHeight + int iNewWindowHeight = textHeight + 2*TEXT_BORDER_WIDTH; if( iNewWindowHeight > m_nMaxHeight) iNewWindowHeight = m_nMaxHeight; @@ -215,7 +215,7 @@ void CTextBox::initFramesRel(void) m_cFrameTextRel.iX = 0; m_cFrameTextRel.iY = 0; m_cFrameTextRel.iHeight = m_cFrame.iHeight ; - + if(m_nMode & SCROLL) { m_cFrameScrollRel.iX = m_cFrame.iWidth - SCROLL_FRAME_WIDTH; @@ -258,7 +258,7 @@ void CTextBox::initFramesRel(void) } void CTextBox::refreshTextLineArray(void) -{ +{ //TRACE("[CTextBox]->RefreshLineArray \r\n"); int loop = true; int pos_prev = 0; @@ -291,7 +291,7 @@ void CTextBox::refreshTextLineArray(void) lineBreakWidth = max_width; //printf("TextBox: lineBreakWidth %d\n", lineBreakWidth); int TextChars = m_cText.size(); - // do not parse, if text is empty + // do not parse, if text is empty if(TextChars > 0) { while(loop) @@ -386,7 +386,7 @@ void CTextBox::refreshTextLineArray(void) m_nCurrentLine = 0; m_nLinesPerPage = 1; } -#if 0 +#if 0 TRACE_1(" m_nNrOfPages: %d\r\n",m_nNrOfPages); TRACE_1(" m_nNrOfLines: %d\r\n",m_nNrOfLines); TRACE_1(" m_nNrOfNewLine: %d\r\n",m_nNrOfNewLine); @@ -403,21 +403,21 @@ void CTextBox::refreshScroll(void) if( !(m_nMode & SCROLL)) return; if( frameBuffer == NULL) return; - if (m_nNrOfPages > 1) + if (m_nNrOfPages > 1) { - frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, - m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, + frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, + m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, COL_MENUCONTENT_PLUS_1); unsigned int marker_size = m_cFrameScrollRel.iHeight / m_nNrOfPages; - frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX, - m_cFrameScrollRel.iY + m_nCurrentPage * marker_size+m_cFrame.iY, - m_cFrameScrollRel.iWidth - 2*SCROLL_MARKER_BORDER, + frameBuffer->paintBoxRel(m_cFrameScrollRel.iX + SCROLL_MARKER_BORDER+m_cFrame.iX, + m_cFrameScrollRel.iY + m_nCurrentPage * marker_size+m_cFrame.iY, + m_cFrameScrollRel.iWidth - 2*SCROLL_MARKER_BORDER, marker_size, COL_MENUCONTENT_PLUS_3); } else { - frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, - m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, + frameBuffer->paintBoxRel(m_cFrameScrollRel.iX+m_cFrame.iX, m_cFrameScrollRel.iY+m_cFrame.iY, + m_cFrameScrollRel.iWidth, m_cFrameScrollRel.iHeight, m_textBackgroundColor); } } @@ -427,7 +427,7 @@ void CTextBox::refreshText(void) if( frameBuffer == NULL) return; //TRACE(" CTextBox::refreshText: %d,%s\r\n",m_nCurrentLine,m_cLineArray[m_nCurrentLine].c_str()); //Paint Text Background - frameBuffer->paintBoxRel(m_cFrameTextRel.iX+m_cFrame.iX, m_cFrameTextRel.iY+m_cFrame.iY, + frameBuffer->paintBoxRel(m_cFrameTextRel.iX+m_cFrame.iX, m_cFrameTextRel.iY+m_cFrame.iY, m_cFrameTextRel.iWidth, m_cFrameTextRel.iHeight, m_textBackgroundColor); if( m_nNrOfLines <= 0) return; @@ -444,8 +444,8 @@ void CTextBox::refreshText(void) x_center = (m_cFrameTextRel.iWidth - m_pcFontText->getRenderWidth(m_cLineArray[i], true))>>1; } - m_pcFontText->RenderString(m_cFrameTextRel.iX + TEXT_BORDER_WIDTH + x_center+m_cFrame.iX, - y+m_cFrame.iY, m_cFrameTextRel.iWidth, m_cLineArray[i].c_str(), + m_pcFontText->RenderString(m_cFrameTextRel.iX + TEXT_BORDER_WIDTH + x_center+m_cFrame.iX, + y+m_cFrame.iY, m_cFrameTextRel.iWidth, m_cLineArray[i].c_str(), COL_MENUCONTENT, 0, true); // UTF-8 } } @@ -459,13 +459,13 @@ void CTextBox::scrollPageDown(const int pages) if(m_nCurrentPage + pages < m_nNrOfPages) { - m_nCurrentPage += pages; + m_nCurrentPage += pages; } - else + else { m_nCurrentPage = m_nNrOfPages - 1; } - m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage; + m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage; refresh(); } @@ -478,13 +478,13 @@ void CTextBox::scrollPageUp(const int pages) if(m_nCurrentPage - pages > 0) { - m_nCurrentPage -= pages; + m_nCurrentPage -= pages; } - else + else { m_nCurrentPage = 0; } - m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage; + m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage; refresh(); } diff --git a/src/gui/widget/vfdcontroler.cpp b/src/gui/widget/vfdcontroler.cpp index 3f7456437..b63e8f108 100644 --- a/src/gui/widget/vfdcontroler.cpp +++ b/src/gui/widget/vfdcontroler.cpp @@ -254,17 +254,17 @@ void CVfdControler::paint() g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10, y+hheight+mheight*3+mheight/2, width, g_Locale->getText(LOCALE_OPTIONS_DEFAULT), COL_MENUCONTENT, 0, true); // UTF-8 } -void CVfdControler::paintSlider(int x, int y, unsigned int spos, float factor, const neutrino_locale_t text, bool selected) +void CVfdControler::paintSlider(int px, int py, unsigned int spos, float factor, const neutrino_locale_t text, bool selected) { int startx = 200; char wert[5]; - frameBuffer->paintBoxRel(x + startx, y, 120, mheight, COL_MENUCONTENT_PLUS_0); - frameBuffer->paintIcon("volumebody.raw", x + startx, y+2+mheight/4); - frameBuffer->paintIcon(selected ? "volumeslider2blue.raw" : "volumeslider2.raw", (int)(x + (startx+3)+(spos / factor)), y+mheight/4); + frameBuffer->paintBoxRel(px + startx, py, 120, mheight, COL_MENUCONTENT_PLUS_0); + frameBuffer->paintIcon("volumebody.raw", px + startx, py+2+mheight/4); + frameBuffer->paintIcon(selected ? "volumeslider2blue.raw" : "volumeslider2.raw", (int)(px + (startx+3)+(spos / factor)), py+mheight/4); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x, y+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px, py+mheight, width, g_Locale->getText(text), COL_MENUCONTENT, 0, true); // UTF-8 sprintf(wert, "%3d", spos); // UTF-8 encoded - frameBuffer->paintBoxRel(x + startx + 120 + 10, y, 50, mheight, COL_MENUCONTENT_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x + startx + 120 + 10, y+mheight, width, wert, COL_MENUCONTENT, 0, true); // UTF-8 + frameBuffer->paintBoxRel(px + startx + 120 + 10, py, 50, mheight, COL_MENUCONTENT_PLUS_0); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(px + startx + 120 + 10, py+mheight, width, wert, COL_MENUCONTENT, 0, true); // UTF-8 } diff --git a/src/zapit/src/bouquets.cpp b/src/zapit/src/bouquets.cpp index b2524470f..10ca95b3d 100644 --- a/src/zapit/src/bouquets.cpp +++ b/src/zapit/src/bouquets.cpp @@ -88,7 +88,8 @@ CZapitChannel* CZapitBouquet::getChannelByChannelID(const t_channel_id channel_i } unsigned int i; - for (i=0; (isize()) && ((*channels)[i]->getChannelID() != channel_id); i++); + for (i=0; (isize()) && ((*channels)[i]->getChannelID() != channel_id); i++) + {}; if (isize()) result = (*channels)[i]; @@ -379,12 +380,12 @@ void CBouquetManager::parseBouquetsXml(const xmlNodePtr root, bool bUser) newBouquet->bFav = (strcmp(name, "favorites") == 0); channel_node = search->xmlChildrenNode; while ((channel_node = xmlGetNextOccurence(channel_node, "S")) != NULL) { - std::string name = xmlGetAttribute(channel_node, "n"); - GET_ATTR(channel_node, "i", SCANF_SERVICE_ID_TYPE, service_id); - GET_ATTR(channel_node, "on", SCANF_ORIGINAL_NETWORK_ID_TYPE, original_network_id); - GET_ATTR(channel_node, "s", SCANF_SATELLITE_POSITION_TYPE, satellitePosition); - GET_ATTR(channel_node, "t", SCANF_TRANSPORT_STREAM_ID_TYPE, transport_stream_id); - GET_ATTR(channel_node, "frq", SCANF_SATELLITE_POSITION_TYPE, freq); + std::string name2 = xmlGetAttribute(channel_node, (char *) "n"); + GET_ATTR(channel_node, (char *) "i", SCANF_SERVICE_ID_TYPE, service_id); + GET_ATTR(channel_node, (char *) "on", SCANF_ORIGINAL_NETWORK_ID_TYPE, original_network_id); + GET_ATTR(channel_node, (char *) "s", SCANF_SATELLITE_POSITION_TYPE, satellitePosition); + GET_ATTR(channel_node, (char *) "t", SCANF_TRANSPORT_STREAM_ID_TYPE, transport_stream_id); + GET_ATTR(channel_node, (char *) "frq", SCANF_SATELLITE_POSITION_TYPE, freq); if(freq > 20000) freq = freq/1000; CZapitChannel* chan; @@ -395,8 +396,8 @@ void CBouquetManager::parseBouquetsXml(const xmlNodePtr root, bool bUser) //printf("found\n"); DBG("%04x %04x %04x %s\n", transport_stream_id, original_network_id, service_id, xmlGetAttribute(channel_node, "n")); #if 0 - if(bUser && (name.length() > 1)) - chan->setName(name); + if(bUser && (name2.length() > 1)) + chan->setName(name2); #endif if(!bUser) chan->pname = (char *) newBouquet->Name.c_str(); diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index 108ebad1a..ba921d9ec 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -54,7 +54,7 @@ extern CEventServer *eventServer; #define USALS static struct dtv_property clr_cmdargs[] = { - { DTV_CLEAR, {}, { 0 } }, + { DTV_CLEAR, {0,0,0}, { 0 },0 }, }; static struct dtv_properties clr_cmdseq = { @@ -63,15 +63,15 @@ static struct dtv_properties clr_cmdseq = { /* stolen from dvb.c from vlc */ static struct dtv_property dvbs_cmdargs[] = { - { DTV_FREQUENCY, {}, { 0 } }, - { DTV_MODULATION, {}, { QPSK } }, - { DTV_INVERSION, {}, { INVERSION_AUTO } }, - { DTV_SYMBOL_RATE, {}, { 27500000 } }, - { DTV_VOLTAGE, {}, { SEC_VOLTAGE_OFF } }, - { DTV_TONE, {}, { SEC_TONE_OFF } }, - { DTV_INNER_FEC, {}, { FEC_AUTO } }, - { DTV_DELIVERY_SYSTEM, {}, { SYS_DVBS } }, - { DTV_TUNE }, + { DTV_FREQUENCY, {0,0,0}, { 0 },0 }, + { DTV_MODULATION, {0,0,0}, { QPSK },0 }, + { DTV_INVERSION, {0,0,0}, { INVERSION_AUTO },0 }, + { DTV_SYMBOL_RATE, {0,0,0}, { 27500000 },0 }, + { DTV_VOLTAGE, {0,0,0}, { SEC_VOLTAGE_OFF },0 }, + { DTV_TONE, {0,0,0}, { SEC_TONE_OFF },0 }, + { DTV_INNER_FEC, {0,0,0}, { FEC_AUTO },0 }, + { DTV_DELIVERY_SYSTEM, {0,0,0}, { SYS_DVBS },0 }, + { DTV_TUNE,{0,0,0}, { 0 },0 }, }; static struct dtv_properties dvbs_cmdseq = { @@ -79,17 +79,17 @@ static struct dtv_properties dvbs_cmdseq = { }; static struct dtv_property dvbs2_cmdargs[] = { - { DTV_FREQUENCY, {}, { 0 } }, - { DTV_MODULATION, {}, { PSK_8 } }, - { DTV_INVERSION, {}, { INVERSION_AUTO } }, - { DTV_SYMBOL_RATE, {}, { 27500000 } }, - { DTV_VOLTAGE, {}, { SEC_VOLTAGE_OFF } }, - { DTV_TONE, {}, { SEC_TONE_OFF } }, - { DTV_INNER_FEC, {}, { FEC_AUTO } }, - { DTV_DELIVERY_SYSTEM, {}, { SYS_DVBS2 } }, - { DTV_PILOT, {}, { PILOT_AUTO } }, - { DTV_ROLLOFF, {}, { ROLLOFF_AUTO } }, - { DTV_TUNE }, + { DTV_FREQUENCY, {}, { 0 },0 }, + { DTV_MODULATION, {}, { PSK_8 } ,0}, + { DTV_INVERSION, {}, { INVERSION_AUTO } ,0}, + { DTV_SYMBOL_RATE, {}, { 27500000 } ,0}, + { DTV_VOLTAGE, {}, { SEC_VOLTAGE_OFF } ,0}, + { DTV_TONE, {}, { SEC_TONE_OFF } ,0}, + { DTV_INNER_FEC, {}, { FEC_AUTO } ,0}, + { DTV_DELIVERY_SYSTEM, {}, { SYS_DVBS2 } ,0}, + { DTV_PILOT, {}, { PILOT_AUTO } ,0}, + { DTV_ROLLOFF, {}, { ROLLOFF_AUTO } ,0}, + { DTV_TUNE, {}, { 0 } ,0 }, }; static struct dtv_properties dvbs2_cmdseq = { @@ -97,12 +97,12 @@ static struct dtv_properties dvbs2_cmdseq = { }; static struct dtv_property dvbc_cmdargs[] = { - { DTV_FREQUENCY, {}, { 0 } }, - { DTV_MODULATION, {}, { QAM_AUTO } }, - { DTV_INVERSION, {}, { INVERSION_AUTO } }, - { DTV_SYMBOL_RATE, {}, { 27500000 } }, - { DTV_DELIVERY_SYSTEM, {}, { SYS_DVBC_ANNEX_AC } }, - { DTV_TUNE }, + { DTV_FREQUENCY, {}, { 0 } ,0}, + { DTV_MODULATION, {}, { QAM_AUTO } ,0}, + { DTV_INVERSION, {}, { INVERSION_AUTO } ,0}, + { DTV_SYMBOL_RATE, {}, { 27500000 } ,0}, + { DTV_DELIVERY_SYSTEM, {}, { SYS_DVBC_ANNEX_AC } ,0}, + { DTV_TUNE, {}, { 0 },0 }, }; static struct dtv_properties dvbc_cmdseq = { diff --git a/src/zapit/src/getservices.cpp b/src/zapit/src/getservices.cpp index cb3f0bf90..aa4cabd4e 100644 --- a/src/zapit/src/getservices.cpp +++ b/src/zapit/src/getservices.cpp @@ -184,18 +184,18 @@ void ParseChannels(xmlNodePtr node, const t_transport_stream_id transport_stream name.c_str(), chid, freq, ret.first->second.getName().c_str(), ret.first->second.getFreqId()); } else { scnt++; - tallchans_iterator cit = ret.first; - cit->second.scrambled = scrambled; + tallchans_iterator cit1 = ret.first; + cit1->second.scrambled = scrambled; service_type = cit->second.getServiceType(); if(pmtpid != 0 && (((service_type == 2) && (apid > 0)) || ( (service_type == 1) && (vpid > 0) && (apid > 0))) ) { DBG("[getserv] preset chan %s vpid %X sid %X tpid %X onid %X\n", name.c_str(), vpid, service_id, transport_stream_id, transport_stream_id); - cit->second.setVideoPid(vpid); - cit->second.setAudioPid(apid); - cit->second.setPcrPid(pcrpid); - cit->second.setPmtPid(pmtpid); - cit->second.setTeletextPid(txpid); - cit->second.setPidsFlag(); - cit->second.type = vtype; + cit1->second.setVideoPid(vpid); + cit1->second.setAudioPid(apid); + cit1->second.setPcrPid(pcrpid); + cit1->second.setPmtPid(pmtpid); + cit1->second.setTeletextPid(txpid); + cit1->second.setPidsFlag(); + cit1->second.type = vtype; } } } diff --git a/src/zapit/src/pmt.cpp b/src/zapit/src/pmt.cpp index 887593b01..33f939617 100644 --- a/src/zapit/src/pmt.cpp +++ b/src/zapit/src/pmt.cpp @@ -153,8 +153,8 @@ unsigned short parse_ES_info(const unsigned char * const buffer, CZapitChannel * case 0x59: if (esInfo->stream_type==0x06) { - unsigned char fieldCount=descriptor_length/8; - for (unsigned char fIdx=0;fIdxSendPMT(buffer, pmtlen); - fout = fopen("/tmp/pmt.tmp","wb"); + fout = fopen("/tmp/pmt.tmp","wb"); if(fout != NULL) { if ((int) fwrite(buffer, sizeof(unsigned char), pmtlen, fout) != pmtlen) { unlink("/tmp/pmt.tmp"); @@ -480,7 +480,7 @@ int parse_pmt(CZapitChannel * const channel) /* pmt */ section_length = ((buffer[1] & 0x0F) << 8) + buffer[2]; - //if(!channel->getPidsFlag()) + //if(!channel->getPidsFlag()) channel->setPcrPid(((buffer[8] & 0x1F) << 8) + buffer[9]); program_info_length = ((buffer[10] & 0x0F) << 8) | buffer[11]; @@ -506,7 +506,7 @@ int parse_pmt(CZapitChannel * const channel) channel->setCaPmt(NULL); delete caPmt; } else { - if(channel->getCaPmt() != 0) + if(channel->getCaPmt() != 0) delete channel->getCaPmt(); channel->setCaPmt(caPmt); } @@ -574,7 +574,7 @@ int pmt_set_update_filter(CZapitChannel * const channel, int * fd) } int pmt_stop_update_filter(int * fd) -{ +{ printf("[pmt] stop update filter\n"); if(pmtDemux) pmtDemux->Stop(); diff --git a/src/zapit/src/pzapit.cpp b/src/zapit/src/pzapit.cpp index 9c41bd840..1f29de393 100644 --- a/src/zapit/src/pzapit.cpp +++ b/src/zapit/src/pzapit.cpp @@ -270,7 +270,7 @@ int main (int argc, char** argv) set_pal = true; continue; } - + else if (!strncmp(argv[i], "--1080", 6)) { set_hd = 8; @@ -336,7 +336,7 @@ int main (int argc, char** argv) zapit.sendMotorCommand(motorCmdType, motorAddr, motorCmd, motorNumParameters, motorParam1, motorParam2); return 0; } - + /* kill zapit*/ if (killzapit) { @@ -389,8 +389,8 @@ int main (int argc, char** argv) { #define NEUTRINO_UDS_NAME "/tmp/neutrino.sock" std::cout << "registering neutrino" << std::endl; - for (int i = CZapitClient::FIRST_EVENT_MARKER; i < CZapitClient::LAST_EVENT_MARKER; i++) - zapit.registerEvent(i, 222, NEUTRINO_UDS_NAME); + for (int ic = CZapitClient::FIRST_EVENT_MARKER; ic < CZapitClient::LAST_EVENT_MARKER; ic++) + zapit.registerEvent(ic, 222, NEUTRINO_UDS_NAME); return 0; } @@ -495,7 +495,7 @@ int main (int argc, char** argv) //zapit.startPlayBack(); return 0; } - + if (set_hd) { //zapit.stopPlayBack(); @@ -537,7 +537,7 @@ int main (int argc, char** argv) goto channel_found; } } - + std::cout << "channel not found." << std::endl; return 0; } @@ -584,9 +584,9 @@ int main (int argc, char** argv) std::cout << "zapped to " << channels[channel-1].name << std::endl; } - + if(!quiet) - { + { CZapitClient::responseGetPIDs pids; zapit.getPIDS(pids); diff --git a/src/zapit/src/scan.cpp b/src/zapit/src/scan.cpp index 153fe6e78..1636728c0 100644 --- a/src/zapit/src/scan.cpp +++ b/src/zapit/src/scan.cpp @@ -123,14 +123,14 @@ int add_to_scan(transponder_id_t TsidOnid, FrontendParameters *feparams, uint8_t if(poltmp2 != poltmp1) { t_transport_stream_id transport_stream_id = tI->second.transport_stream_id; t_original_network_id original_network_id = tI->second.original_network_id; - uint16_t freq = GET_FREQ_FROM_TPID(tI->first); + uint16_t freq1 = GET_FREQ_FROM_TPID(tI->first); t_satellite_position satellitePosition = GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xFFF; if(GET_SATELLITEPOSITION_FROM_TRANSPONDER_ID(tI->first) & 0xF000) satellitePosition = -satellitePosition; - freq++; + freq1++; TsidOnid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID( - freq, satellitePosition, original_network_id, transport_stream_id); + freq1, satellitePosition, original_network_id, transport_stream_id); printf("[scan] add_to_scan: SAME freq %d pol1 %d pol2 %d tpid %llx\n", feparams->frequency, poltmp1, poltmp2, TsidOnid); feparams->frequency = feparams->frequency+1000; tI = scanedtransponders.find(TsidOnid); @@ -256,7 +256,7 @@ _repeat: } TsidOnid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID( - tI->second.feparams.frequency/1000, satellitePosition, tI->second.original_network_id, + tI->second.feparams.frequency/1000, satellitePosition, tI->second.original_network_id, tI->second.transport_stream_id); //scanedtransponders.insert(std::pair (TsidOnid, true)); @@ -624,7 +624,7 @@ void * scan_transponder(void * arg) scantransponders.clear(); scanedtransponders.clear(); nittransponders.clear(); - if(cable) + if(cable) DBG("[scan_transponder] done scan freq %d rate %d fec %d mod %d\n", TP->feparams.frequency, TP->feparams.u.qam.symbol_rate, TP->feparams.u.qam.fec_inner,TP->feparams.u.qam.modulation); else DBG("[scan_transponder] done scan freq %d rate %d fec %d pol %d\n", TP->feparams.frequency, TP->feparams.u.qpsk.symbol_rate, TP->feparams.u.qpsk.fec_inner, TP->polarization); diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 5925a03f1..cec40d1c0 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -656,7 +656,7 @@ void unsetRecordMode(void) rec_channel_id = 0; } -int prepare_channels(fe_type_t frontendType, diseqc_t diseqcType) +int prepare_channels(fe_type_t frontendType, diseqc_t pdiseqcType) { channel = 0; transponders.clear(); @@ -667,7 +667,7 @@ int prepare_channels(fe_type_t frontendType, diseqc_t diseqcType) scanInputParser = NULL; } - if (LoadServices(frontendType, diseqcType, false) < 0) + if (LoadServices(frontendType, pdiseqcType, false) < 0) return -1; INFO("LoadServices: success"); @@ -1503,9 +1503,9 @@ DBG("NVOD insert %llx\n", CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPO if (msgBoolean.truefalse) { // if(videoDecoder && (currentMode & RECORD_MODE)) videoDecoder->freeze(); enterStandby(); - CZapitMessages::responseCmd response; - response.cmd = CZapitMessages::CMD_READY; - CBasicServer::send_data(connfd, &response, sizeof(response)); + CZapitMessages::responseCmd presponse; + presponse.cmd = CZapitMessages::CMD_READY; + CBasicServer::send_data(connfd, &presponse, sizeof(presponse)); } else leaveStandby(); break; @@ -1924,7 +1924,7 @@ void leaveStandby(void) zapit(live_channel_id, current_is_nvod, false, true); } -unsigned zapTo(const unsigned int bouquet, const unsigned int channel) +unsigned zapTo(const unsigned int bouquet, const unsigned int pchannel) { if (bouquet >= g_bouquetManager->Bouquets.size()) { WARN("Invalid bouquet %d", bouquet); @@ -1938,12 +1938,12 @@ unsigned zapTo(const unsigned int bouquet, const unsigned int channel) else channels = &(g_bouquetManager->Bouquets[bouquet]->tvChannels); - if (channel >= channels->size()) { - WARN("Invalid channel %d in bouquet %d", channel, bouquet); + if (pchannel >= channels->size()) { + WARN("Invalid channel %d in bouquet %d", pchannel, bouquet); return CZapitClient::ZAP_INVALID_PARAM; } - return zapTo_ChannelID((*channels)[channel]->getChannelID(), false); + return zapTo_ChannelID((*channels)[pchannel]->getChannelID(), false); } unsigned int zapTo_ChannelID(t_channel_id channel_id, bool isSubService) @@ -1974,9 +1974,9 @@ DBG("[zapit] NVOD chid %llx\n", channel_id); return result; } -unsigned zapTo(const unsigned int channel) +unsigned zapTo(const unsigned int pchannel) { - CBouquetManager::ChannelIterator cit = ((currentMode & RADIO_MODE) ? g_bouquetManager->radioChannelsBegin() : g_bouquetManager->tvChannelsBegin()).FindChannelNr(channel); + CBouquetManager::ChannelIterator cit = ((currentMode & RADIO_MODE) ? g_bouquetManager->radioChannelsBegin() : g_bouquetManager->tvChannelsBegin()).FindChannelNr(pchannel); if (!(cit.EndOfChannels())) return zapTo_ChannelID((*cit)->getChannelID(), false); else