mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-17 10:23:37 +02:00
eventlist: make additional infos switchable
* new menu 'eventlist' in osd-setup
* fix offset in infozone
* fontsize for infozone adjustable
Origin commit data
------------------
Commit: 473d6f38ba
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-04-13 (Sat, 13 Apr 2013)
Origin message was:
------------------
- eventlist: make additional infos switchable
* new menu 'eventlist' in osd-setup
* fix offset in infozone
* fontsize for infozone adjustable
This commit is contained in:
@@ -249,7 +249,10 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c
|
||||
full_width = frameBuffer->getScreenWidthRel();
|
||||
x = getScreenStartX(full_width);
|
||||
|
||||
width = full_width / 3 * 2;
|
||||
if (g_settings.eventlist_additional)
|
||||
width = full_width / 3 * 2;
|
||||
else
|
||||
width = full_width;
|
||||
height = frameBuffer->getScreenHeightRel();
|
||||
|
||||
iheight = ::paintButtons(0, 0, 0, 1, tmp_button, 0, 0, false, COL_INFOBAR_SHADOW, NULL, 0, false);
|
||||
@@ -282,7 +285,8 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c
|
||||
infozone_width = full_width - width;
|
||||
|
||||
// init right info_zone
|
||||
cc_infozone = new CComponentsText(x+width+5, y+theight+10, infozone_width-10, listmaxshow*fheight-20);
|
||||
if (g_settings.eventlist_additional)
|
||||
cc_infozone = new CComponentsText(x+width+10, y+theight, infozone_width-20, listmaxshow*fheight);
|
||||
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
//printf("CNeutrinoEventList::exec: channel_id %llx\n", channel_id);
|
||||
@@ -673,7 +677,8 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c
|
||||
}
|
||||
}
|
||||
|
||||
delete cc_infozone;
|
||||
if (cc_infozone)
|
||||
delete cc_infozone;
|
||||
cc_infozone = NULL;
|
||||
oldIndex = -1;
|
||||
oldEventID = -1;
|
||||
@@ -816,6 +821,9 @@ void CNeutrinoEventList::paintItem(unsigned int pos, t_channel_id channel_idI)
|
||||
|
||||
void CNeutrinoEventList::paintDescription(int index)
|
||||
{
|
||||
if (!g_settings.eventlist_additional)
|
||||
return;
|
||||
|
||||
if (evtlist[index].eventID == oldEventID) {
|
||||
if (oldEventID == 0) {
|
||||
if (index == oldIndex)
|
||||
@@ -838,7 +846,7 @@ void CNeutrinoEventList::paintDescription(int index)
|
||||
else
|
||||
infozone_text = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS);
|
||||
|
||||
cc_infozone->setText(infozone_text, CTextBox::TOP, g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE]);
|
||||
cc_infozone->setText(infozone_text, CTextBox::TOP, g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_EVENT]);
|
||||
cc_infozone->doPaintBg(false);
|
||||
cc_infozone->paint(CC_SAVE_SCREEN_NO);
|
||||
}
|
||||
@@ -901,7 +909,7 @@ void CNeutrinoEventList::paint(t_channel_id channel_id)
|
||||
}
|
||||
|
||||
// paint background for right box
|
||||
if (!bgRightBoxPaint) {
|
||||
if (g_settings.eventlist_additional && !bgRightBoxPaint) {
|
||||
frameBuffer->paintBoxRel(x+width,y+theight,infozone_width,listmaxshow*fheight,COL_MENUCONTENT_PLUS_0);
|
||||
bgRightBoxPaint = true;
|
||||
}
|
||||
|
@@ -91,12 +91,13 @@ const SNeutrinoSettings::FONT_TYPES channellist_font_sizes[5] =
|
||||
SNeutrinoSettings::FONT_TYPE_CHANNEL_NUM_ZAP
|
||||
};
|
||||
|
||||
const SNeutrinoSettings::FONT_TYPES eventlist_font_sizes[4] =
|
||||
const SNeutrinoSettings::FONT_TYPES eventlist_font_sizes[5] =
|
||||
{
|
||||
SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE,
|
||||
SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMLARGE,
|
||||
SNeutrinoSettings::FONT_TYPE_EVENTLIST_ITEMSMALL,
|
||||
SNeutrinoSettings::FONT_TYPE_EVENTLIST_DATETIME,
|
||||
SNeutrinoSettings::FONT_TYPE_EVENTLIST_EVENT
|
||||
};
|
||||
|
||||
const SNeutrinoSettings::FONT_TYPES infobar_font_sizes[4] =
|
||||
@@ -134,7 +135,7 @@ font_sizes_groups font_sizes_groups[6] =
|
||||
{
|
||||
{LOCALE_FONTMENU_MENU , 5, other_font_sizes , "fontsize.doth", LOCALE_MENU_HINT_MENU_FONTS },
|
||||
{LOCALE_FONTMENU_CHANNELLIST, 5, 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_EVENTLIST , 5, eventlist_font_sizes , "fontsize.deve", LOCALE_MENU_HINT_EVENTLIST_FONTS },
|
||||
{LOCALE_FONTMENU_EPG , 4, epg_font_sizes , "fontsize.depg", LOCALE_MENU_HINT_EPG_FONTS },
|
||||
{LOCALE_FONTMENU_INFOBAR , 4, infobar_font_sizes , "fontsize.dinf", LOCALE_MENU_HINT_INFOBAR_FONTS },
|
||||
{LOCALE_FONTMENU_GAMELIST , 2, gamelist_font_sizes , "fontsize.dgam", LOCALE_MENU_HINT_GAMELIST_FONTS }
|
||||
@@ -157,6 +158,7 @@ font_sizes_struct neutrino_font[FONT_TYPE_COUNT] =
|
||||
{LOCALE_FONTSIZE_EVENTLIST_ITEMLARGE, 20, FONT_STYLE_BOLD , 1},
|
||||
{LOCALE_FONTSIZE_EVENTLIST_ITEMSMALL, 14, FONT_STYLE_REGULAR, 1},
|
||||
{LOCALE_FONTSIZE_EVENTLIST_DATETIME , 16, FONT_STYLE_REGULAR, 1},
|
||||
{LOCALE_FONTSIZE_EVENTLIST_EVENT , 17, FONT_STYLE_REGULAR, 1},
|
||||
{LOCALE_FONTSIZE_GAMELIST_ITEMLARGE , 20, FONT_STYLE_BOLD , 1},
|
||||
{LOCALE_FONTSIZE_GAMELIST_ITEMSMALL , 16, FONT_STYLE_REGULAR, 1},
|
||||
{LOCALE_FONTSIZE_CHANNELLIST , 20, FONT_STYLE_BOLD , 1},
|
||||
@@ -447,10 +449,17 @@ int COsdSetup::showOsdSetup()
|
||||
mf->setHint("", LOCALE_MENU_HINT_CHANNELLIST_SETUP);
|
||||
osd_menu->addItem(mf);
|
||||
|
||||
//eventlist
|
||||
CMenuWidget osd_menu_eventlist(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_EVENTLIST);
|
||||
showOsdEventlistSetup(&osd_menu_eventlist);
|
||||
mf = new CMenuForwarder(LOCALE_EVENTLIST_NAME, true, NULL, &osd_menu_eventlist, NULL, CRCInput::RC_4);
|
||||
mf->setHint("", LOCALE_MENU_HINT_EVENTLIST_SETUP);
|
||||
osd_menu->addItem(mf);
|
||||
|
||||
//screenshot
|
||||
CMenuWidget osd_menu_screenshot(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_OSDSETUP_SCREENSHOT);
|
||||
showOsdScreenShotSetup(&osd_menu_screenshot);
|
||||
mf = new CMenuForwarder(LOCALE_SCREENSHOT_MENU, true, NULL, &osd_menu_screenshot, NULL, CRCInput::RC_4);
|
||||
mf = new CMenuForwarder(LOCALE_SCREENSHOT_MENU, true, NULL, &osd_menu_screenshot, NULL, CRCInput::RC_5);
|
||||
mf->setHint("", LOCALE_MENU_HINT_SCREENSHOT_SETUP);
|
||||
osd_menu->addItem(mf);
|
||||
|
||||
@@ -834,6 +843,19 @@ void COsdSetup::showOsdChanlistSetup(CMenuWidget *menu_chanlist)
|
||||
menu_chanlist->addItem(mc);
|
||||
}
|
||||
|
||||
//eventlist
|
||||
void COsdSetup::showOsdEventlistSetup(CMenuWidget *menu_eventlist)
|
||||
{
|
||||
CMenuOptionChooser * mc;
|
||||
|
||||
menu_eventlist->addIntroItems(LOCALE_EVENTLIST_NAME);
|
||||
|
||||
// eventlist additional
|
||||
mc = new CMenuOptionChooser(LOCALE_EVENTLIST_ADDITIONAL, &g_settings.eventlist_additional, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true);
|
||||
mc->setHint("", LOCALE_MENU_HINT_EVENTLIST_ADDITIONAL);
|
||||
menu_eventlist->addItem(mc);
|
||||
}
|
||||
|
||||
bool COsdSetup::changeNotify(const neutrino_locale_t OptionName, void * data)
|
||||
{
|
||||
if(ARE_LOCALES_EQUAL(OptionName, LOCALE_COLORMENU_CONTRAST_FONTS))
|
||||
|
@@ -57,6 +57,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver
|
||||
void showOsdTimeoutSetup(CMenuWidget *menu_timeout);
|
||||
void showOsdInfobarSetup(CMenuWidget *menu_infobar);
|
||||
void showOsdChanlistSetup(CMenuWidget *menu_chanlist);
|
||||
void showOsdEventlistSetup(CMenuWidget *menu_eventlist);
|
||||
void showOsdScreenShotSetup(CMenuWidget *menu_screenshot);
|
||||
|
||||
void AddFontSettingItem(CMenuWidget &font_Settings, const SNeutrinoSettings::FONT_TYPES number_of_fontsize_entry);
|
||||
|
Reference in New Issue
Block a user