Merge branch 'cst-next' into nmp-cst-next

Origin commit data
------------------
Commit: db8a9e6388
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-01-25 (Mon, 25 Jan 2016)
This commit is contained in:
Michael Liebmann
2016-01-25 13:20:10 +01:00
13 changed files with 38 additions and 19 deletions

View File

@@ -859,6 +859,7 @@ lcdmenu.dim_brightness nach Dimm-Timeout
lcdmenu.dim_time Dimm-Timeout
lcdmenu.head VFD/LED Einstellungen
lcdmenu.lcdcontroler Helligkeit
lcdmenu.notify_rclock Benachrichtigung bei FB-Sperre
lcdmenu.scroll Laufschrift
lcdmenu.statusline Statuszeile
lcdmenu.statusline.both Lautstärke/Fortschritt
@@ -1399,6 +1400,7 @@ menu.hint_vfd_brightnessstandby Definiert die Helligkeit im Standby-Modus
menu.hint_vfd_defaults Zurücksetzen der Helligkeitswerte auf die Standardeinstellungen
menu.hint_vfd_dimtime Geben Sie einen Wert in Sekunden ein, nachdem sich das Display automatisch auf den gewünschten Wert dimmt
menu.hint_vfd_infoline Wählen Sie, was in der Infozeile angezeigt werden soll
menu.hint_vfd_notify_rclock Zeigt eine Meldung im Display, wenn bei gesperrter Fernbedienung eine Taste gedrückt wird
menu.hint_vfd_scroll Laufschrift im Display ein- oder ausschalten
menu.hint_vfd_statusline Wählen Sie, was in der Statuszeile angezeigt werden soll
menu.hint_video Video-Ausgang, Auflösung, Format, Seitenverhältnisse und mehr

View File

@@ -859,6 +859,7 @@ lcdmenu.dim_brightness Brightness after dim timeout
lcdmenu.dim_time Dim timeout
lcdmenu.head VFD/LED Settings
lcdmenu.lcdcontroler Brightness
lcdmenu.notify_rclock Notify when RC is locked
lcdmenu.scroll Enable text scroll
lcdmenu.statusline status line
lcdmenu.statusline.both volume / playtime
@@ -1399,6 +1400,7 @@ menu.hint_vfd_brightnessstandby Brightness in soft-standby mode
menu.hint_vfd_defaults Restore default brightness values
menu.hint_vfd_dimtime Auto-dim time, in seconds
menu.hint_vfd_infoline Choose what to display in main VFD line
menu.hint_vfd_notify_rclock Displays a notification when a key is pressed while remote control is locked
menu.hint_vfd_scroll Enable or disable text scrolling on VFD
menu.hint_vfd_statusline Choose what to display in short\nVFD status line
menu.hint_video Video output, resolution, format\nAspect ratio, fast mode switch options

View File

@@ -406,7 +406,7 @@ void CVFD::showTime(bool force)
void CVFD::showRCLock(int duration)
{
if (!has_lcd)
if (!has_lcd || !g_settings.lcd_notify_rclock)
{
sleep(duration);
return;

View File

@@ -1355,7 +1355,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
snprintf(runningRest, sizeof(runningRest), "%d / %d %s", (curr_pos + 30000) / 60000, (duration - curr_pos + 30000) / 60000, unit_short_minute);
display_Info(NULL, NULL, false, CMoviePlayerGui::getInstance().file_prozent, NULL, runningRest);
} else if (!IS_WEBTV(current_channel_id)) {
show_Data( true );
show_Data(false);
}
}
showLcdPercentOver ();
@@ -1819,7 +1819,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current)
{
if (info_CurrentNext.current_uniqueKey != last_curr_id)
if (!calledFromEvent || info_CurrentNext.current_uniqueKey != last_curr_id)
{
last_curr_id = info_CurrentNext.current_uniqueKey;
curr_time = runningStart;

View File

@@ -221,8 +221,8 @@ void CInfoViewerBB::getBBButtonInfo()
icon = NEUTRINO_ICON_BUTTON_RED;
frameBuffer->getIconSize(icon.c_str(), &w, &h);
mode = CNeutrinoApp::getInstance()->getMode();
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) {
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active);
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) {
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_red, active, g_settings.infobar_buttons_usertitle);
if (!text.empty())
break;
}
@@ -236,8 +236,8 @@ void CInfoViewerBB::getBBButtonInfo()
icon = NEUTRINO_ICON_BUTTON_GREEN;
frameBuffer->getIconSize(icon.c_str(), &w, &h);
mode = CNeutrinoApp::getInstance()->getMode();
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) {
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active);
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) {
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_green, active, g_settings.infobar_buttons_usertitle);
if (!text.empty())
break;
}
@@ -251,8 +251,8 @@ void CInfoViewerBB::getBBButtonInfo()
icon = NEUTRINO_ICON_BUTTON_YELLOW;
frameBuffer->getIconSize(icon.c_str(), &w, &h);
mode = CNeutrinoApp::getInstance()->getMode();
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) {
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active);
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) {
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_yellow, active, g_settings.infobar_buttons_usertitle);
if (!text.empty())
break;
}
@@ -266,8 +266,8 @@ void CInfoViewerBB::getBBButtonInfo()
icon = NEUTRINO_ICON_BUTTON_BLUE;
frameBuffer->getIconSize(icon.c_str(), &w, &h);
mode = CNeutrinoApp::getInstance()->getMode();
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) {
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active);
if (mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_audio) {
text = CKeybindSetup::getMoviePlayerButtonName(CRCInput::RC_blue, active, g_settings.infobar_buttons_usertitle);
if (!text.empty())
break;
}

View File

@@ -571,7 +571,7 @@ bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void * /* d
return false;
}
const char *CKeybindSetup::getMoviePlayerButtonName(const neutrino_msg_t key, bool &active)
const char *CKeybindSetup::getMoviePlayerButtonName(const neutrino_msg_t key, bool &active, bool return_title)
{
active = false;
for (unsigned int i = MPKEY_REWIND; i <= MPKEY_PLUGIN; i++)
@@ -579,6 +579,9 @@ const char *CKeybindSetup::getMoviePlayerButtonName(const neutrino_msg_t key, bo
if ((uint32_t)*key_settings[i].keyvalue_p == (unsigned int)key)
{
active = true;
if (!return_title && (key_settings[i].keydescription == LOCALE_MPKEY_PLUGIN))
return g_settings.movieplayer_plugin.c_str();
else
return g_Locale->getText(key_settings[i].keydescription);
}
}

View File

@@ -112,7 +112,7 @@ class CKeybindSetup : public CMenuTarget, public CChangeObserver
~CKeybindSetup();
int exec(CMenuTarget* parent, const std::string & actionKey);
bool changeNotify(const neutrino_locale_t OptionName, void * data);
static const char *getMoviePlayerButtonName(const neutrino_msg_t key, bool &active);
static const char *getMoviePlayerButtonName(const neutrino_msg_t key, bool &active, bool return_title = false);
};
#endif

View File

@@ -343,11 +343,11 @@ PluginParam * CPlugins::makeParam(const char * const id, const int value, Plugin
}
#endif
void CPlugins::startPlugin_by_name(const std::string & filename)
void CPlugins::startPlugin_by_name(const std::string & name)
{
for (int i = 0; i < (int) plugin_list.size(); i++)
{
if (!filename.compare(g_PluginList->getFileName(i)))
if (name.compare(g_PluginList->getName(i)) == 0)
{
startPlugin(i);
return;
@@ -355,13 +355,13 @@ void CPlugins::startPlugin_by_name(const std::string & filename)
}
}
void CPlugins::startPlugin(const char * const name)
void CPlugins::startPlugin(const char * const filename)
{
int pluginnr = find_plugin(name);
int pluginnr = find_plugin(filename);
if (pluginnr > -1)
startPlugin(pluginnr);
else
printf("[CPlugins] could not find %s\n", name);
printf("[CPlugins] could not find %s\n", filename);
}

View File

@@ -156,6 +156,10 @@ int CVfdSetup::showSetup()
oj = new CMenuOptionChooser(LOCALE_LCDMENU_SCROLL, &g_settings.lcd_scroll, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled);
oj->setHint("", LOCALE_MENU_HINT_VFD_SCROLL);
vfds->addItem(oj);
oj = new CMenuOptionChooser(LOCALE_LCDMENU_NOTIFY_RCLOCK, &g_settings.lcd_notify_rclock, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, vfd_enabled);
oj->setHint("", LOCALE_MENU_HINT_VFD_NOTIFY_RCLOCK);
vfds->addItem(oj);
}
int res = vfds->exec(NULL, "");

View File

@@ -459,6 +459,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.backlight_standby = configfile.getInt32( "backlight_standby", 0);
g_settings.backlight_deepstandby = configfile.getInt32( "backlight_deepstandby", 0);
g_settings.lcd_scroll = configfile.getInt32( "lcd_scroll", 1);
g_settings.lcd_notify_rclock = configfile.getInt32("lcd_notify_rclock", 1);
g_settings.hdd_fs = configfile.getInt32( "hdd_fs", 0);
g_settings.hdd_sleep = configfile.getInt32( "hdd_sleep", 120);
@@ -1016,6 +1017,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32( "backlight_standby", g_settings.backlight_standby);
configfile.setInt32( "backlight_deepstandby", g_settings.backlight_deepstandby);
configfile.setInt32( "lcd_scroll", g_settings.lcd_scroll);
configfile.setInt32( "lcd_notify_rclock", g_settings.lcd_notify_rclock);
//misc
configfile.setInt32( "power_standby", g_settings.power_standby);

View File

@@ -886,6 +886,7 @@ typedef enum
LOCALE_LCDMENU_DIM_TIME,
LOCALE_LCDMENU_HEAD,
LOCALE_LCDMENU_LCDCONTROLER,
LOCALE_LCDMENU_NOTIFY_RCLOCK,
LOCALE_LCDMENU_SCROLL,
LOCALE_LCDMENU_STATUSLINE,
LOCALE_LCDMENU_STATUSLINE_BOTH,
@@ -1426,6 +1427,7 @@ typedef enum
LOCALE_MENU_HINT_VFD_DEFAULTS,
LOCALE_MENU_HINT_VFD_DIMTIME,
LOCALE_MENU_HINT_VFD_INFOLINE,
LOCALE_MENU_HINT_VFD_NOTIFY_RCLOCK,
LOCALE_MENU_HINT_VFD_SCROLL,
LOCALE_MENU_HINT_VFD_STATUSLINE,
LOCALE_MENU_HINT_VIDEO,

View File

@@ -886,6 +886,7 @@ const char * locale_real_names[] =
"lcdmenu.dim_time",
"lcdmenu.head",
"lcdmenu.lcdcontroler",
"lcdmenu.notify_rclock",
"lcdmenu.scroll",
"lcdmenu.statusline",
"lcdmenu.statusline.both",
@@ -1426,6 +1427,7 @@ const char * locale_real_names[] =
"menu.hint_vfd_defaults",
"menu.hint_vfd_dimtime",
"menu.hint_vfd_infoline",
"menu.hint_vfd_notify_rclock",
"menu.hint_vfd_scroll",
"menu.hint_vfd_statusline",
"menu.hint_video",

View File

@@ -688,6 +688,8 @@ struct SNeutrinoSettings
int backlight_standby;
int backlight_deepstandby;
int lcd_scroll;
int lcd_notify_rclock;
//#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
#define FILESYSTEM_ENCODING_TO_UTF8(a) (isUTF8(a) ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
#define UTF8_TO_FILESYSTEM_ENCODING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::UTF8_to_Latin1(a).c_str())