From eb28e00f49fdf1c04c17e3101c71b28d8489fdab Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 19 Mar 2011 10:31:43 +0000 Subject: [PATCH] remove duplicate code git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1312 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/8818eeb32067fe7c717816877d20d9dea6d038f2 Author: Jacek Jendrzej Date: 2011-03-19 (Sat, 19 Mar 2011) ------------------ This commit was generated by Migit --- src/neutrino_menue.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 9f559e3e9..ee535e4aa 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -486,17 +486,12 @@ void CNeutrinoApp::InitScanSettings(CMenuWidget &settings) //scale to max sat/cable name lenght unsigned int sat_txt_w = 0, max_txt_w = 0; sat_iterator_t sit; - if (g_info.delivery_system == DVB_S) { - for (sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++) { - sat_txt_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(sit->second.name.c_str(), true); - max_txt_w = std::max(max_txt_w,sat_txt_w); - } - } else if (g_info.delivery_system == DVB_C) { - for (sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++) { - sat_txt_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(sit->second.name.c_str(), true); - max_txt_w = std::max(max_txt_w,sat_txt_w); - } + + for (sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++) { + sat_txt_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(sit->second.name.c_str(), true); + max_txt_w = std::max(max_txt_w,sat_txt_w); } + int w, h; const unsigned int mini_w = 30;//mini width 30% frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_RED, &w, &h);