fix conflicts:

adding hints is work in progress, so until most is finished,
please avoid sorting locals.h, locals_intern.h, english.locale.
to resolve i had to sort (real, case-insensitive) this files


Origin commit data
------------------
Branch: ni/coolstream
Commit: 58d513d963
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-07-12 (Thu, 12 Jul 2012)



------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-07-12 12:53:53 +04:00
10 changed files with 1492 additions and 1298 deletions

View File

@@ -131,7 +131,7 @@ int CAudioSetup::showAudioSetup()
//dd subchannel auto on/off
CMenuOptionChooser * as_oj_ddsubchn = new CMenuOptionChooser(LOCALE_AUDIOMENU_DOLBYDIGITAL, &g_settings.audio_DolbyDigital, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier);
as_oj_ddsubchn->setHint("", LOCALE_MENU_HINT_AUDIO_DOLBYDIGITAL);
as_oj_ddsubchn->setHint("", LOCALE_MENU_HINT_AUDIO_DD);
//dd via hdmi
CMenuOptionChooser * as_oj_dd_hdmi = new CMenuOptionChooser(LOCALE_AUDIOMENU_HDMI_DD, &g_settings.hdmi_dd, AUDIOMENU_HDMI_DD_OPTIONS, AUDIOMENU_HDMI_DD_OPTION_COUNT, true, audioSetupNotifier);

View File

@@ -276,7 +276,7 @@ void CMiscMenue::showMiscSettingsMenuEnergy(CMenuWidget *ms_energy)
ms_energy->addIntroItems(LOCALE_MISCSETTINGS_ENERGY);
CMenuOptionChooser *m1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_SHUTDOWN_REAL_RCDELAY, &g_settings.shutdown_real_rcdelay, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, !g_settings.shutdown_real);
m1->setHint("", LOCALE_MENU_HINT_SHUTDOWN_REAL_RCDELAY);
m1->setHint("", LOCALE_MENU_HINT_SHUTDOWN_RCDELAY);
CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, g_settings.shutdown_count, 3, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT2, "0123456789 ");
CMenuForwarder *m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, !g_settings.shutdown_real, g_settings.shutdown_count, miscSettings_shutdown_count);

View File

@@ -121,17 +121,18 @@ const SNeutrinoSettings::FONT_TYPES gamelist_font_sizes[2] =
SNeutrinoSettings::FONT_TYPE_GAMELIST_ITEMSMALL
};
const SNeutrinoSettings::FONT_TYPES other_font_sizes[4] =
const SNeutrinoSettings::FONT_TYPES other_font_sizes[5] =
{
SNeutrinoSettings::FONT_TYPE_MENU_TITLE,
SNeutrinoSettings::FONT_TYPE_MENU,
SNeutrinoSettings::FONT_TYPE_MENU_INFO,
SNeutrinoSettings::FONT_TYPE_MENU_HINT,
SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM
};
font_sizes_groups font_sizes_groups[6] =
{
{LOCALE_FONTMENU_MENU , 4, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS },
{LOCALE_FONTMENU_MENU , 5, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS },
{LOCALE_FONTMENU_CHANNELLIST, 4, channellist_font_sizes, "fontsize.dcha", LOCALE_MENU_HINT_CHANNELLIST_FONTS },
{LOCALE_FONTMENU_EVENTLIST , 4, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS },
{LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS },
@@ -166,7 +167,8 @@ font_sizes_struct neutrino_font[FONT_TYPE_COUNT] =
{LOCALE_FONTSIZE_INFOBAR_CHANNAME , 30, FONT_STYLE_BOLD , 0},
{LOCALE_FONTSIZE_INFOBAR_INFO , 20, FONT_STYLE_REGULAR, 1},
{LOCALE_FONTSIZE_INFOBAR_SMALL , 14, FONT_STYLE_REGULAR, 1},
{LOCALE_FONTSIZE_FILEBROWSER_ITEM , 16, FONT_STYLE_BOLD , 1}
{LOCALE_FONTSIZE_FILEBROWSER_ITEM , 16, FONT_STYLE_BOLD , 1},
{LOCALE_FONTSIZE_MENU_HINT , 16, FONT_STYLE_REGULAR, 0}
};
int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey)
@@ -457,7 +459,7 @@ int COsdSetup::showOsdSetup()
// subchannel menu position
mc = new CMenuOptionChooser(LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, &g_settings.infobar_subchan_disp_pos, INFOBAR_SUBCHAN_DISP_POS_OPTIONS, INFOBAR_SUBCHAN_DISP_POS_OPTIONS_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_SUBCHAN_POS);
mc->setHint("", LOCALE_MENU_HINT_SUBCHANNEL_POS);
osd_menu->addItem(mc);
// volume position
@@ -531,7 +533,7 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUHEAD));
mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chHeadcolor );
mf->setHint("", LOCALE_MENU_HINT_HEAD_BACKGROUND);
mf->setHint("", LOCALE_MENU_HINT_HEAD_BACK);
menu_colors->addItem(mf);
mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chHeadTextcolor );
@@ -540,7 +542,7 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT));
mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentcolor );
mf->setHint("", LOCALE_MENU_HINT_CONTENT_BACKGROUND);
mf->setHint("", LOCALE_MENU_HINT_CONTENT_BACK);
menu_colors->addItem(mf);
mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chContentTextcolor );
@@ -549,7 +551,7 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT_INACTIVE));
mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentInactivecolor );
mf->setHint("", LOCALE_MENU_HINT_INACTIVE_BACKGROUND);
mf->setHint("", LOCALE_MENU_HINT_INACTIVE_BACK);
menu_colors->addItem(mf);
mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chContentInactiveTextcolor);
@@ -558,11 +560,11 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORMENUSETUP_MENUCONTENT_SELECTED));
mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chContentSelectedcolor );
mf->setHint("", LOCALE_MENU_HINT_SELECTED_BACKGROUND);
mf->setHint("", LOCALE_MENU_HINT_SELECTED_BACK);
menu_colors->addItem(mf);
mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chContentSelectedTextcolor );
mf->setHint("", LOCALE_MENU_HINT_SELECTED_TEXTCOLOR);
mf->setHint("", LOCALE_MENU_HINT_SELECTED_TEXT);
menu_colors->addItem(mf);
CColorChooser* chInfobarcolor = new CColorChooser(LOCALE_COLORMENU_BACKGROUND, &g_settings.infobar_red,
@@ -572,7 +574,7 @@ void COsdSetup::showOsdMenueColorSetup(CMenuWidget *menu_colors)
menu_colors->addItem( new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_COLORSTATUSBAR_TEXT));
mf = new CMenuDForwarder(LOCALE_COLORMENU_BACKGROUND, true, NULL, chInfobarcolor );
mf->setHint("", LOCALE_MENU_HINT_INFOBAR_BACKGROUND);
mf->setHint("", LOCALE_MENU_HINT_INFOBAR_BACK);
menu_colors->addItem(mf);
mf = new CMenuDForwarder(LOCALE_COLORMENU_TEXTCOLOR, true, NULL, chInfobarTextcolor );

View File

@@ -1069,13 +1069,13 @@ void CMenuWidget::paintHint(int pos)
int xpos = x - ConnectLineBox_Width;
int ypos2 = y + height + rad + SHADOW_OFFSET;
int iwidth = width+sb_width+SHADOW_OFFSET;
int iwidth = width+sb_width;
if (hint_painted) {
/* clear line box */
frameBuffer->paintBackgroundBoxRel(xpos, y+SHADOW_OFFSET, ConnectLineBox_Width, height+hint_height+rad);
/* clear info box */
frameBuffer->paintBackgroundBoxRel(x, ypos2, iwidth, hint_height);
frameBuffer->paintBackgroundBoxRel(x, ypos2, iwidth+SHADOW_OFFSET, hint_height+SHADOW_OFFSET);
hint_painted = false;
}
@@ -1119,10 +1119,9 @@ printf("paintHint: icon %s text %s\n", item->hintIcon.c_str(), g_Locale->getText
/* vertical info line | */
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-15, ypos2a, 11, 4, col1);
frameBuffer->paintBoxRel(xpos+ConnectLineBox_Width-12, ypos2a, 8, 1, col2);
#if 0
/* box shadow */
frameBuffer->paintBoxRel(x+SHADOW_OFFSET, ypos2+SHADOW_OFFSET, width + sb_width, hint_height, COL_MENUCONTENTDARK_PLUS_0, rad);
#endif
/* box frame and fill */
frameBuffer->paintBoxFrame(x, ypos2, iwidth, hint_height, 2, col1, rad);
/* box frame and fill */
@@ -1142,7 +1141,8 @@ printf("paintHint: icon %s text %s\n", item->hintIcon.c_str(), g_Locale->getText
if (item->hint == NONEXISTANT_LOCALE)
return;
int fheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
int HintFont = SNeutrinoSettings::FONT_TYPE_MENU_HINT;
int fheight = g_Font[HintFont]->getHeight();
std::string str1, str2;
std::string str = g_Locale->getText(item->hint);
@@ -1150,13 +1150,61 @@ printf("paintHint: icon %s text %s\n", item->hintIcon.c_str(), g_Locale->getText
if (spos != std::string::npos) {
str1 = str.substr(0, spos);
str2 = str.substr(spos+1);
} else {
str1 = str;
}
if (!str1.empty())
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+offset, ypos2+5+fheight, iwidth-4-offset, str1, COL_MENUCONTENT, 0, true); // UTF-8
if (!str2.empty())
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+offset, ypos2+5+fheight*2, iwidth-4-offset, str2, COL_MENUCONTENT, 0, true); // UTF-8
else
str1 = str;
if ((!str1.empty()) || (!str1.empty())) {
int wBox = iwidth - 6 - offset;
int wStr1 = 0, wStr2 = 0;
if (!str1.empty())
wStr1 = g_Font[HintFont]->getRenderWidth(str1);
if (!str2.empty())
wStr2 = g_Font[HintFont]->getRenderWidth(str2);
if ((wStr1 > wBox) || (wStr2 > wBox)) {
str = g_Locale->getText(item->hint);
// replace "\n" with " "
spos = str.find_first_of("\n");
if (spos != std::string::npos)
str.replace(spos, 1, " ");
spos = str.length();
if (spos >= 1) {
std::string BreakChars = "+-/";
str1 = str;
wStr1 = g_Font[HintFont]->getRenderWidth(str1);
int count = 0;
std::string bChar;
while (wStr1 > wBox) {
spos = str1.find_last_of(BreakChars + " ");
if (spos != std::string::npos) {
str1 = str1.substr(0, spos+1);
// Last delimiter remember if it's not a whitespace
size_t len = str1.length();
size_t spos2 = str1.find_last_of(BreakChars);
if (len == spos2+1)
bChar = str1.substr(spos2, spos2+1);
else
bChar = "";
// Remove last delimiter
str1 = str1.substr(0, spos);
}
// Width of string with delimiter
wStr1 = g_Font[HintFont]->getRenderWidth(str1 + bChar);
count++;
if (count > 20)
break;
}
// Last delimiter append again
str1 += bChar;
str2 = str.substr(spos+1);
}
}
ypos2 += (hint_height-fheight*2)/2;
if (!str1.empty())
g_Font[HintFont]->RenderString(x+offset, ypos2+fheight, wBox, str1, COL_MENUCONTENT, 0, true); // UTF-8
if (!str2.empty())
g_Font[HintFont]->RenderString(x+offset, ypos2+fheight*2, wBox, str2, COL_MENUCONTENT, 0, true); // UTF-8
}
}
//-------------------------------------------------------------------------------------------------------------------------------

View File

@@ -140,6 +140,7 @@ void CNeutrinoApp::InitMenuMain()
//tv <-> radio toggle
CMenuForwarder *tvradio_switch = new CMenuForwarder(LOCALE_MAINMENU_TVRADIO_SWITCH, true, NULL, this, "tv_radio_switch", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
tvradio_switch->setHint("", LOCALE_MENU_HINT_TVRADIO_SWITCH);
personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE]);
//tv-mode
@@ -266,7 +267,7 @@ void CNeutrinoApp::InitMenuSettings()
// miscSettings
mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MISC, true, NULL, new CMiscMenue() , NULL, CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE);
mf->setHint(NEUTRINO_ICON_HINT_EXTENDED, LOCALE_MENU_HINT_EXTENDEED);
mf->setHint(NEUTRINO_ICON_HINT_EXTENDED, LOCALE_MENU_HINT_EXTENDED);
personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MISC]);
//separator

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -456,7 +456,7 @@ struct SNeutrinoSettings
// Font sizes
#define FONT_TYPE_COUNT 22
#define FONT_TYPE_COUNT 23
enum FONT_TYPES {
FONT_TYPE_MENU = 0,
FONT_TYPE_MENU_TITLE = 1,
@@ -479,7 +479,8 @@ struct SNeutrinoSettings
FONT_TYPE_INFOBAR_CHANNAME = 18,
FONT_TYPE_INFOBAR_INFO = 19,
FONT_TYPE_INFOBAR_SMALL = 20,
FONT_TYPE_FILEBROWSER_ITEM = 21
FONT_TYPE_FILEBROWSER_ITEM = 21,
FONT_TYPE_MENU_HINT = 22
};
// lcdd