settings_manager_teams: small reworks; unify locales

* cleanup from unused code
* remove RC_help hotkey from menu (this hotkey breaks global hint-switch)
* fix text alignment in help-box


Origin commit data
------------------
Branch: ni/coolstream
Commit: 8eb3a61829
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-09 (Sat, 09 Sep 2017)

Origin message was:
------------------
- settings_manager_teams: small reworks; unify locales

* cleanup from unused code
* remove RC_help hotkey from menu (this hotkey breaks global hint-switch)
* fix text alignment in help-box


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-09-09 11:03:52 +02:00
parent ab5d217f63
commit 2e5f07ec99
5 changed files with 13 additions and 24 deletions

View File

@@ -385,9 +385,9 @@ cpu.freq_default Standard Frequenz
cpu.freq_normal Normale Frequenz cpu.freq_normal Normale Frequenz
cpu.freq_standby Standby Frequenz cpu.freq_standby Standby Frequenz
crossteam.hint_settings_teams Einstellungen sichern und wiederherstellen,\ndie zu teilnehmenden Team-Images kompatibel sind. crossteam.hint_settings_teams Einstellungen sichern und wiederherstellen,\ndie zu teilnehmenden Team-Images kompatibel sind.
crossteam.hint_settings_teams_backup Teamübergreifende Einstellungen sichern crossteam.hint_settings_teams_backup Team-übergreifende Einstellungen sichern
crossteam.hint_settings_teams_help Hilfe zu teamübergreifenden Einstellungen crossteam.hint_settings_teams_help Hilfe zu den Team-übergreifenden Einstellungen
crossteam.hint_settings_teams_restore Teamübergreifende Einstellungen wiederherstellen crossteam.hint_settings_teams_restore Team-übergreifende Einstellungen wiederherstellen
date.Apr Apr date.Apr Apr
date.Aug Aug date.Aug Aug
date.Dec Dez date.Dec Dez
@@ -2557,7 +2557,7 @@ settings.teams.backup Sichern
settings.teams.backup_failed Sicherung fehlgeschlagen! settings.teams.backup_failed Sicherung fehlgeschlagen!
settings.teams.backup_to Sichern nach settings.teams.backup_to Sichern nach
settings.teams.help Hilfe settings.teams.help Hilfe
settings.teams.help_text In diesem Menü können Einstellungen gesichert und\nwiederhergestellt werden, die zu folgenden Team-Images\nkompatibel sind:\n \n - BluePeer HD\n - NI CS-Image\n \nGesichert werden:\n \n * Kanallisten\n * Timer und Timer-Einstellungen\n * Netzwerkeinstellungen (LAN und WLAN) settings.teams.help_text In diesem Menü können Einstellungen\ngesichert und wiederhergestellt werden,\ndie zu folgenden Team-Images kompatibel sind:\n \n - BluePeer HD\n - NI-Image\n \nGesichert werden:\n \n * Kanallisten\n * Timer und Timer-Einstellungen\n * Netzwerkeinstellungen (LAN und WLAN)
settings.teams.restore Wiederherstellen settings.teams.restore Wiederherstellen
settings.teams.restore_warn Team-übergreifende Einstellungen werden ersetzt.\nDie Box wird neu gestartet.\nWeiter? settings.teams.restore_warn Team-übergreifende Einstellungen werden ersetzt.\nDie Box wird neu gestartet.\nWeiter?
shoutcast.dev_id SHOUTcast Dev ID shoutcast.dev_id SHOUTcast Dev ID

View File

@@ -2557,7 +2557,7 @@ settings.teams.backup Save
settings.teams.backup_failed Backup failed! settings.teams.backup_failed Backup failed!
settings.teams.backup_to Saving to settings.teams.backup_to Saving to
settings.teams.help Help settings.teams.help Help
settings.teams.help_text In this menu, settings can be saved and restored,\nwhich are compatible with these Team-Images:\n \n - BluePeer HD\n - NI CS-Image\n \nSaved will be:\n \n * Channellists\n * Timer and Timer-Settings\n * Network-Settings (LAN and WLAN) settings.teams.help_text In this menu can settings be saved and restored,\nwhich are compatible with following Team-Images:\n \n - BluePeer HD\n - NI-Image\n \nSaved will be:\n \n * Channellists\n * Timer and timer-settings\n * Network-settings (LAN and WLAN)
settings.teams.restore Restore settings.teams.restore Restore
settings.teams.restore_warn This will replace all cross-team settings and reboot\nContinue ? settings.teams.restore_warn This will replace all cross-team settings and reboot\nContinue ?
shoutcast.dev_id SHOUTcast Dev ID shoutcast.dev_id SHOUTcast Dev ID

View File

@@ -4,7 +4,7 @@
Copyright (C) 2011 'defans' Copyright (C) 2011 'defans'
Homepage: http://www.bluepeercrew.us/ Homepage: http://www.bluepeercrew.us/
Copyright (C) 2011 'vanhofen' Copyright (C) 2017 'vanhofen'
Homepage: http://www.neutrino-images.de/ Homepage: http://www.neutrino-images.de/
License: GPL License: GPL
@@ -37,7 +37,6 @@
#include "gui/widget/hintbox.h" #include "gui/widget/hintbox.h"
#include "gui/widget/msgbox.h" #include "gui/widget/msgbox.h"
#include "gui/widget/stringinput.h"
#include <driver/screen_max.h> #include <driver/screen_max.h>
#include <system/setting_helpers.h> #include <system/setting_helpers.h>
@@ -51,8 +50,7 @@
#define SYSCALLBACKUP "tar -cz -f" #define SYSCALLBACKUP "tar -cz -f"
#define SYSCALLRESTORE "cd /; tar -xz -f" #define SYSCALLRESTORE "cd /; tar -xz -f"
#define OBJECT_COUNT 6 const char * object[] =
const char * object[OBJECT_COUNT] =
{ {
CONFIGDIR "/cables.xml", CONFIGDIR "/cables.xml",
CONFIGDIR "/satellites.xml", CONFIGDIR "/satellites.xml",
@@ -61,8 +59,7 @@ const char * object[OBJECT_COUNT] =
"/etc/network/interfaces", "/etc/network/interfaces",
"/etc/wpa_supplicant.conf" "/etc/wpa_supplicant.conf"
}; };
const int OBJECT_COUNT = sizeof(object) / sizeof(object[0]);
//int CSettingsManagerTeams::selected = -1; // remember location in old style
CSettingsManagerTeams::CSettingsManagerTeams() CSettingsManagerTeams::CSettingsManagerTeams()
{ {
@@ -105,14 +102,12 @@ int CSettingsManagerTeams::showMenu()
//printf("[neutrino] CSettingsManagerTeams call %s...\n", __FUNCTION__); //printf("[neutrino] CSettingsManagerTeams call %s...\n", __FUNCTION__);
CMenuWidget * teamset = new CMenuWidget(LOCALE_SETTINGS_TEAMS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_TEAMS_SETTINGS); CMenuWidget * teamset = new CMenuWidget(LOCALE_SETTINGS_TEAMS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_TEAMS_SETTINGS);
// CMenuWidget * teamset = new CMenuWidget(LOCALE_SETTINGS_TEAMS, NEUTRINO_ICON_SETTINGS, width);
// teamset->setSelected(selected);
teamset->addIntroItems(); teamset->addIntroItems();
CMenuForwarder * mf; CMenuForwarder * mf;
mf = new CMenuForwarder(LOCALE_SETTINGS_TEAMS_HELP, true, NULL, this, "help", CRCInput::RC_help, NEUTRINO_ICON_BUTTON_HELP_SMALL); //ToDo? mf = new CMenuForwarder(LOCALE_SETTINGS_TEAMS_HELP, true, NULL, this, "help");
mf->setHint("", LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS_HELP); mf->setHint("", LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS_HELP);
teamset->addItem(mf); teamset->addItem(mf);
@@ -128,7 +123,6 @@ int CSettingsManagerTeams::showMenu()
int res = teamset->exec(NULL, ""); int res = teamset->exec(NULL, "");
teamset->hide(); teamset->hide();
// selected = teamset->getSelected();
delete teamset; delete teamset;
return res; return res;
@@ -136,7 +130,8 @@ int CSettingsManagerTeams::showMenu()
void CSettingsManagerTeams::showHelp() void CSettingsManagerTeams::showHelp()
{ {
ShowMsg(LOCALE_SETTINGS_TEAMS_HELP, g_Locale->getText(LOCALE_SETTINGS_TEAMS_HELP_TEXT), CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO); // UTF-8 ShowMsg(LOCALE_SETTINGS_TEAMS_HELP, LOCALE_SETTINGS_TEAMS_HELP_TEXT, CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO,
MSGBOX_MIN_WIDTH, NO_TIMEOUT, false, (CMsgBox::AUTO_WIDTH | CMsgBox::AUTO_HIGH));
return; return;
} }
@@ -204,10 +199,6 @@ void CSettingsManagerTeams::doRestore()
void CSettingsManagerTeams::doReboot() void CSettingsManagerTeams::doReboot()
{ {
FILE *f = fopen("/tmp/.reboot", "w"); CNeutrinoApp::getInstance()->exec(NULL, "reboot");
fclose(f);
// we need a public ExitRun() in src/neutrino.h
CNeutrinoApp::getInstance()->ExitRun(true);
unlink("/tmp/.reboot");
return; return;
} }

View File

@@ -37,7 +37,6 @@ class CSettingsManagerTeams : public CMenuTarget
{ {
private: private:
int width; int width;
// static int selected;
int showMenu(); int showMenu();
void showHelp(); void showHelp();

View File

@@ -122,7 +122,7 @@ private:
void standbyMode( bool bOnOff, bool fromDeepStandby = false ); void standbyMode( bool bOnOff, bool fromDeepStandby = false );
void getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::string &name); void getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::string &name);
//NI void ExitRun(int can_shutdown = 0); void ExitRun(int can_shutdown = 0);
void RealRun(); void RealRun();
void InitZapper(); void InitZapper();
void InitTimerdClient(); void InitTimerdClient();
@@ -163,7 +163,6 @@ public:
CUserMenu usermenu; CUserMenu usermenu;
void ExitRun(int can_shutdown = 0); //NI cross-team settings
void saveSetup(const char * fname); void saveSetup(const char * fname);
int loadSetup(const char * fname); int loadSetup(const char * fname);
void setScreenSettings(); void setScreenSettings();