diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index a95905e3f..0cf2422f1 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1723,7 +1723,7 @@ void CAudioPlayerGui::paintTitleBox() if (!m_titlebox) { m_titlebox = new CComponentsShapeSquare(m_x, m_y, m_width, m_title_height, NULL, CC_SHADOW_ON); - m_titlebox->enableFrame(true, FRAME_MIN_WIDTH); + m_titlebox->enableFrame(true, FRAME_WIDTH_MIN); m_titlebox->setCorner(RADIUS_LARGE); } m_titlebox->paint(false); diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index a9a88987a..9a23f8c62 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -741,5 +741,5 @@ void CBouquetList::paint() int total_pages; int current_page; getScrollBarData(&total_pages, ¤t_page, Bouquets.size(), listmaxshow, selected); - paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page, CC_SHADOW_ON); + paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page, CC_SHADOW_RIGHT_CORNER_ALL); } diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 40803433f..cceea6b44 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -3449,7 +3449,9 @@ bool CMovieBrowser::showMenu(bool calledExternally) if (!calledExternally) { CMenuWidget mainMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER); mainMenu.addIntroItems(LOCALE_MOVIEBROWSER_MENU_MAIN_HEAD); - mainMenu.addItem(new CMenuForwarder(m_movieSelectionHandler->epgTitle, false)); + if (m_movieSelectionHandler){ + mainMenu.addItem(new CMenuForwarder(m_movieSelectionHandler->epgTitle, false)); + } mainMenu.addItem(GenericMenuSeparator); mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_HEAD, (m_movieSelectionHandler != NULL), NULL, this, "show_movie_info_menu", CRCInput::RC_red)); mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_CUT_HEAD, (m_movieSelectionHandler != NULL), NULL, this, "show_movie_cut_menu", CRCInput::RC_green)); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index fa3eb49df..7553ce221 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1281,6 +1281,11 @@ bool CMoviePlayerGui::SetPosition(int pos, bool absolute) { clearSubtitle(); bool res = playback->SetPosition(pos, absolute); + if(is_file_player && res && speed == 0 && playstate == CMoviePlayerGui::PAUSE){ + playstate = CMoviePlayerGui::PLAY; + speed = 1; + playback->SetSpeed(speed); + } return res; } @@ -1566,7 +1571,8 @@ void CMoviePlayerGui::PlayFileLoop(void) makeScreenShot(); } else if ((msg == (neutrino_msg_t) g_settings.mpkey_rewind) || (msg == (neutrino_msg_t) g_settings.mpkey_forward)) { - int newspeed; + int newspeed = 0; + bool setSpeed = false; if (msg == (neutrino_msg_t) g_settings.mpkey_rewind) { newspeed = (speed >= 0) ? -1 : speed - 1; } else { @@ -1579,9 +1585,10 @@ void CMoviePlayerGui::PlayFileLoop(void) if (playstate != CMoviePlayerGui::PAUSE) playstate = msg == (neutrino_msg_t) g_settings.mpkey_rewind ? CMoviePlayerGui::REW : CMoviePlayerGui::FF; updateLcd(); + setSpeed = true; } - if (!FileTimeOSD->IsVisible() && !time_forced) { + if (!FileTimeOSD->IsVisible() && !time_forced && setSpeed) { FileTimeOSD->switchMode(position, duration); time_forced = true; } diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index be24d6a45..12582b865 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -682,9 +682,10 @@ string COPKGManager::getPkgDescription(std::string pkgName, std::string pkgDesc) fseek(fd, 0, SEEK_END); fgetpos(fd, &fz); fseek(fd, 0, SEEK_SET); - if (fz.__pos == 0) + if (fz.__pos == 0){ + fclose(fd); return pkgDesc; - + } char buf[512]; string package, version, description; while (fgets(buf, sizeof(buf), fd)) { diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 0fbb2026e..d796dcc1d 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -1818,7 +1818,7 @@ int CTimerList::newTimer() bool CTimerList::askUserOnRemoteTimerConflict(time_t announceTime, time_t stopTime, char * remotebox_name) { CTimerd::TimerList overlappingTimers; - int pre,post; + int pre = 0,post = 0; Timer->getRecordingSafety(pre,post); for (CTimerd::TimerList::iterator it = timerlist.begin(); it != timerlist.end();++it) diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index dbfcf8aa7..55c4ce3bc 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -93,7 +93,7 @@ void CUpnpBrowserGui::Init() topbox.setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0, COL_MENUHEAD_TEXT); topbox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]); topbox.enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Head_gradient_direction); - topbox.enableShadow(CC_SHADOW_ON, -1, true); + topbox.enableShadow(CC_SHADOW_ON); infobox.enableFrame(true, 2); infobox.setCorner(RADIUS_LARGE); @@ -101,7 +101,7 @@ void CUpnpBrowserGui::Init() infobox.setTextColor(COL_MENUCONTENTDARK_TEXT); infobox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU]); infobox.enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Hint_gradient_direction); - infobox.enableShadow(CC_SHADOW_ON, -1, true); + infobox.enableShadow(CC_SHADOW_ON); timebox.enableFrame(true, 2); timebox.setCorner(RADIUS_LARGE); @@ -109,7 +109,7 @@ void CUpnpBrowserGui::Init() timebox.setTextColor(infobox.getTextColor()); timebox.setTextFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU]); timebox.enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Hint_gradient_direction); - timebox.enableShadow(CC_SHADOW_ON, -1, true); + timebox.enableShadow(CC_SHADOW_ON); m_width = m_frameBuffer->getScreenWidthRel(); m_height = m_frameBuffer->getScreenHeightRel(); @@ -193,7 +193,7 @@ int CUpnpBrowserGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/ stopAudio(); m_frameBuffer->stopFrame(); - m_frameBuffer->Clear(); + topbox.kill(); CZapit::getInstance()->EnablePlayback(true); CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::CHANGEMODE , m_LastMode); @@ -916,7 +916,6 @@ bool CUpnpBrowserGui::selectItem(std::string id) delete entries; timeout = 0; - m_frameBuffer->Clear(); return endall; } @@ -942,8 +941,8 @@ void CUpnpBrowserGui::paintDeviceInfo() topbox.setDimensionsAll(m_x, m_y, m_width, m_topbox_height); topbox.setCorner(RADIUS_LARGE); - topbox.setText(tmp, CTextBox::AUTO_WIDTH | CTextBox::CENTER); - topbox.paint0(); + if (topbox.setText(tmp, CTextBox::AUTO_WIDTH | CTextBox::CENTER)) + topbox.paint0(); } void CUpnpBrowserGui::paintDevice(unsigned int _pos) @@ -1144,8 +1143,8 @@ void CUpnpBrowserGui::paintItemInfo(UPnPEntry *entry) } topbox.setCorner(RADIUS_LARGE); - topbox.setText(tmp, CTextBox::AUTO_WIDTH | CTextBox::CENTER); - topbox.paint0(); + if (topbox.setText(tmp, CTextBox::AUTO_WIDTH | CTextBox::CENTER)) + topbox.paint0(); } void CUpnpBrowserGui::paintItems(std::vector *entry, unsigned int selected, unsigned int max, unsigned int offset) @@ -1205,8 +1204,8 @@ void CUpnpBrowserGui::paintDetails(UPnPEntry *entry, bool use_playing) text = m_playing_entry.title; text += !m_playing_entry.artist.empty() ? " - " + m_playing_entry.artist : ""; text += "\n" + m_playing_entry.album; - infobox.setText(text, CTextBox::AUTO_WIDTH); - infobox.paint0(); + if (infobox.setText(text, CTextBox::AUTO_WIDTH)) + infobox.paint0(); } }else{ if (!entry) @@ -1215,8 +1214,8 @@ void CUpnpBrowserGui::paintDetails(UPnPEntry *entry, bool use_playing) text = entry->title; text += !entry->artist.empty() ? " - " + entry->artist : ""; text += "\n" + entry->album; - infobox.setText(text, CTextBox::AUTO_WIDTH); - infobox.paint0(); + if (infobox.setText(text, CTextBox::AUTO_WIDTH)) + infobox.paint0(); } if (image) image->paint0(); @@ -1226,8 +1225,11 @@ void CUpnpBrowserGui::paintDetails(UPnPEntry *entry, bool use_playing) void CUpnpBrowserGui::paintItem2DetailsLine(int pos) { - if (pos < 0) + if (pos < 0){ + if (dline) + dline->kill(); return; + } int xpos = m_x - DETAILSLINE_WIDTH; int ypos1 = m_item_y + pos*m_item_height; diff --git a/src/system/settings.h b/src/system/settings.h index 03314d907..ba7367e4e 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -940,7 +940,7 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO #define SCROLLBAR_WIDTH (OFFSET_INNER_MID + 2*OFFSET_INNER_MIN) -#define FRAME_MIN_WIDTH CFrameBuffer::getInstance()->scale2Res(2) +#define FRAME_WIDTH_MIN CFrameBuffer::getInstance()->scale2Res(2) #define DETAILSLINE_WIDTH CFrameBuffer::getInstance()->scale2Res(16)