remove duplicate code

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1312 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2011-03-19 10:31:43 +00:00
parent 156681e223
commit 8818eeb320

View File

@@ -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);