remove cross-team settings

Origin commit data
------------------
Commit: 61d3083d6a
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-05-24 (Thu, 24 May 2018)

Origin message was:
------------------
- remove cross-team settings
This commit is contained in:
vanhofen
2018-05-24 22:18:52 +02:00
parent 794e7d75a4
commit ef4e82b970
9 changed files with 0 additions and 321 deletions

View File

@@ -395,10 +395,6 @@ cpu.freq CPU Frequenz
cpu.freq_default Standard Frequenz
cpu.freq_normal Normale 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_backup Team-übergreifende Einstellungen sichern
crossteam.hint_settings_teams_help Hilfe zu den Team-übergreifenden Einstellungen
crossteam.hint_settings_teams_restore Team-übergreifende Einstellungen wiederherstellen
daemon_control Daemon-Steuerung
daemon_item.crond_desc cron Daemon kann zeitgesteuerte Aufgaben ausführen
daemon_item.crond_name crond
@@ -2558,14 +2554,6 @@ settings.pos_top_left oben links
settings.pos_top_right oben rechts
settings.restore NI-Backup wiederherstellen
settings.restore_warn Alle Settings werden ersetzt.\nDie Box wird neu gestartet.\nWeiter?
settings.teams Team-übergreifende Einstellungen
settings.teams.backup Sichern
settings.teams.backup_failed Sicherung fehlgeschlagen!
settings.teams.backup_to Sichern nach
settings.teams.help Hilfe
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_warn Team-übergreifende Einstellungen werden ersetzt.\nDie Box wird neu gestartet.\nWeiter?
shoutcast.dev_id SHOUTcast Dev ID
shoutcast.enabled SHOUTcast-Unterstützung
shutdown.recording_query Aufnahme läuft. Trotzdem beenden?

View File

@@ -395,10 +395,6 @@ cpu.freq CPU frequency
cpu.freq_default Default frequency
cpu.freq_normal Normal frequency
cpu.freq_standby Standby frequency
crossteam.hint_settings_teams Save and restore settings, which\nare compatible with participating Team-Images.
crossteam.hint_settings_teams_backup Save cross-team settings
crossteam.hint_settings_teams_help Help about cross-team settings
crossteam.hint_settings_teams_restore Restore cross-team settings
daemon_control Daemon control
daemon_item.crond_desc Cron daemon allows scheduled tasks
daemon_item.crond_name crond
@@ -2558,14 +2554,6 @@ settings.pos_top_left top left
settings.pos_top_right top right
settings.restore Load NI-Backup
settings.restore_warn This will replace all settings and reboot\nContinue ?
settings.teams Cross-Team Settings
settings.teams.backup Save
settings.teams.backup_failed Backup failed!
settings.teams.backup_to Saving to
settings.teams.help Help
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_warn This will replace all cross-team settings and reboot\nContinue ?
shoutcast.dev_id SHOUTcast Dev ID
shoutcast.enabled SHOUTcast support
shutdown.recording_query You really want to to stop record ?

View File

@@ -98,7 +98,6 @@ libneutrino_gui_a_SOURCES = \
screensaver.cpp \
screensetup.cpp \
settings_manager.cpp \
settings_manager_teams.cpp \
sleeptimer.cpp \
start_wizard.cpp \
subchannel_select.cpp \

View File

@@ -49,7 +49,6 @@
#include <sys/vfs.h>
#include <gui/widget/hintbox.h> //NI
#include "gui/settings_manager_teams.h" //NI cross-team settings
CSettingsManager::CSettingsManager(int wizard_mode)
{
@@ -239,13 +238,6 @@ int CSettingsManager::showMenu()
mf->setHint(NEUTRINO_ICON_HINT_RESTORE, LOCALE_MENU_HINT_RESTORE);
mset->addItem(mf);
//NI cross-team settings
mset->addItem(GenericMenuSeparatorLine);
CSettingsManagerTeams * teamsettings = new CSettingsManagerTeams();
mf = new CMenuForwarder(LOCALE_SETTINGS_TEAMS, true, NULL, teamsettings, NULL, CRCInput::convertDigitToKey(0));
mf->setHint("", LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS);
mset->addItem(mf);
mset->addItem(GenericMenuSeparatorLine);
mf = new CMenuForwarder(LOCALE_RESET_ALL, true, NULL, resetNotifier, "all", CRCInput::RC_standby);
mf->setHint(NEUTRINO_ICON_HINT_FACTORY, LOCALE_MENU_HINT_FACTORY);

View File

@@ -1,204 +0,0 @@
/*
cross-team settings manager menue - Neutrino-GUI
Copyright (C) 2011 'defans'
Homepage: http://www.bluepeercrew.us/
Copyright (C) 2017 'vanhofen'
Homepage: http://www.neutrino-images.de/
License: GPL
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <global.h>
#include <neutrino.h>
#include <neutrino_menue.h>
#include "gui/settings_manager_teams.h"
#include "gui/widget/hintbox.h"
#include "gui/widget/msgbox.h"
#include <driver/screen_max.h>
#include <system/setting_helpers.h>
#include <sys/vfs.h>
#include <unistd.h>
#define TAREXT "teams"
#define TARCHIVE "settings." TAREXT
#define SYSCALLBACKUP "tar -cz -f"
#define SYSCALLRESTORE "cd /; tar -xz -f"
const char * object[] =
{
CONFIGDIR "/cables.xml",
CONFIGDIR "/satellites.xml",
CONFIGDIR "/timerd.conf",
CONFIGDIR "/zapit/",
"/etc/network/interfaces",
"/etc/wpa_supplicant.conf"
};
const int OBJECT_COUNT = sizeof(object) / sizeof(object[0]);
CSettingsManagerTeams::CSettingsManagerTeams()
{
width = 40;
}
CSettingsManagerTeams::~CSettingsManagerTeams()
{
}
int CSettingsManagerTeams::exec(CMenuTarget* parent, const std::string &actionKey)
{
//printf("[neutrino] CSettingsManagerTeams %s: init...\n",__FUNCTION__);
if(parent)
parent->hide();
if(actionKey == "help")
{
showHelp();
return menu_return::RETURN_REPAINT;
}
else if(actionKey == "backup")
{
doBackup();
return menu_return::RETURN_REPAINT;
}
else if(actionKey == "restore")
{
doRestore();
return menu_return::RETURN_REPAINT;
}
int res = showMenu();
return res;
}
int CSettingsManagerTeams::showMenu()
{
//printf("[neutrino] CSettingsManagerTeams call %s...\n", __FUNCTION__);
CMenuWidget * teamset = new CMenuWidget(LOCALE_SETTINGS_TEAMS, NEUTRINO_ICON_SETTINGS, width, MN_WIDGET_ID_TEAMS_SETTINGS);
teamset->addIntroItems();
CMenuForwarder * mf;
mf = new CMenuForwarder(LOCALE_SETTINGS_TEAMS_HELP, true, NULL, this, "help");
mf->setHint("", LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS_HELP);
teamset->addItem(mf);
teamset->addItem(GenericMenuSeparatorLine);
mf =new CMenuForwarder(LOCALE_SETTINGS_TEAMS_BACKUP, true, NULL, this, "backup", CRCInput::RC_red);
mf->setHint("", LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS_BACKUP);
teamset->addItem(mf);
mf = new CMenuForwarder(LOCALE_SETTINGS_TEAMS_RESTORE, true, NULL, this, "restore", CRCInput::RC_green);
mf->setHint("", LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS_RESTORE);
teamset->addItem(mf);
int res = teamset->exec(NULL, "");
teamset->hide();
delete teamset;
return res;
}
void CSettingsManagerTeams::showHelp()
{
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;
}
void CSettingsManagerTeams::doBackup()
{
int objectCounter = 0;
std::string objects = " ";
for(int i=0 ; i < OBJECT_COUNT; i++)
{
if ( access((object[i]), F_OK) )
continue;
objects += object[i];
objects += " ";
objectCounter++;
}
fileBrowser.Dir_Mode = true;
if(fileBrowser.exec("/media") == true)
{
std::string TDirectory = fileBrowser.getSelectedFile()->Name.c_str();
std::string hintBoxContent = g_Locale->getText(LOCALE_SETTINGS_TEAMS_BACKUP_TO) + TDirectory + "/" + TARCHIVE;
struct statfs s;
int ret = ::statfs(TDirectory.c_str(), &s);
if(objectCounter && ret == 0 && s.f_type != 0x72b6L/* && s.f_type != 0x858458f6L*/) /*jffs2 and ramfs*/
{
CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, hintBoxContent.c_str());
hintBox.paint();
char buf[256];
sprintf(buf, SYSCALLBACKUP " %s/" TARCHIVE "%s", TDirectory.c_str(), objects.c_str());
//printf("CSettingsManagerTeams::doBackup: %s/%s\n", TDirectory.c_str(), TARCHIVE);
if (system(buf) != 0)
printf("CSettingsManagerTeams::Backup: failed\n");
hintBox.hide();
}
else
ShowMsg(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_SETTINGS_TEAMS_BACKUP_FAILED),CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_ERROR);
}
return;
}
void CSettingsManagerTeams::doRestore()
{
fileFilter.addFilter(TAREXT);
fileBrowser.Filter = &fileFilter;
fileBrowser.Dir_Mode = false;
if(fileBrowser.exec("/media") == true)
{
std::string TFile = fileBrowser.getSelectedFile()->Name.c_str();
int result = ShowMsg(LOCALE_SETTINGS_TEAMS_RESTORE, g_Locale->getText(LOCALE_SETTINGS_TEAMS_RESTORE_WARN), CMsgBox::mbrNo, CMsgBox::mbYes | CMsgBox::mbNo);
if(result == CMsgBox::mbrYes)
{
char buf[256];
sprintf(buf, SYSCALLRESTORE " %s", TFile.c_str());
//printf("CSettingsManagerTeams::doRestore: %s\n", TFile.c_str());
if (system(buf) != 0)
printf("CSettingsManagerTeams::doRestore: failed\n");
else
doReboot();
}
}
return;
}
void CSettingsManagerTeams::doReboot()
{
CNeutrinoApp::getInstance()->exec(NULL, "reboot");
return;
}

View File

@@ -1,57 +0,0 @@
/*
cross-team settings manager menue - Neutrino-GUI
Copyright (C) 2011 'defans'
Homepage: http://www.bluepeercrew.us/
Copyright (C) 2011 'vanhofen'
Homepage: http://www.neutrino-images.de/
License: GPL
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __settings_manager_teams__
#define __settings_manager_teams__
#include <gui/widget/menue.h>
#include "gui/filebrowser.h"
#include <string>
class CSettingsManagerTeams : public CMenuTarget
{
private:
int width;
int showMenu();
void showHelp();
void doBackup();
void doRestore();
void doReboot();
CFileBrowser fileBrowser;
CFileFilter fileFilter;
public:
CSettingsManagerTeams();
~CSettingsManagerTeams();
int exec(CMenuTarget* parent, const std::string & actionKey);
};
#endif

View File

@@ -174,9 +174,6 @@ enum MN_WIDGET_ID
MN_WIDGET_ID_PLUGINS_CONTROL,
MN_WIDGET_ID_PLUGINS_HIDE,
//Cross-Team
MN_WIDGET_ID_TEAMS_SETTINGS,
//update file selector
MN_WIDGET_ID_IMAGESELECTOR,
MN_WIDGET_ID_MTDREAD_SELECTOR,

View File

@@ -422,10 +422,6 @@ typedef enum
LOCALE_CPU_FREQ_DEFAULT,
LOCALE_CPU_FREQ_NORMAL,
LOCALE_CPU_FREQ_STANDBY,
LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS,
LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS_BACKUP,
LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS_HELP,
LOCALE_CROSSTEAM_HINT_SETTINGS_TEAMS_RESTORE,
LOCALE_DAEMON_CONTROL,
LOCALE_DAEMON_ITEM_CROND_DESC,
LOCALE_DAEMON_ITEM_CROND_NAME,
@@ -2585,14 +2581,6 @@ typedef enum
LOCALE_SETTINGS_POS_TOP_RIGHT,
LOCALE_SETTINGS_RESTORE,
LOCALE_SETTINGS_RESTORE_WARN,
LOCALE_SETTINGS_TEAMS,
LOCALE_SETTINGS_TEAMS_BACKUP,
LOCALE_SETTINGS_TEAMS_BACKUP_FAILED,
LOCALE_SETTINGS_TEAMS_BACKUP_TO,
LOCALE_SETTINGS_TEAMS_HELP,
LOCALE_SETTINGS_TEAMS_HELP_TEXT,
LOCALE_SETTINGS_TEAMS_RESTORE,
LOCALE_SETTINGS_TEAMS_RESTORE_WARN,
LOCALE_SHOUTCAST_DEV_ID,
LOCALE_SHOUTCAST_ENABLED,
LOCALE_SHUTDOWN_RECORDING_QUERY,

View File

@@ -422,10 +422,6 @@ const char * locale_real_names[] =
"cpu.freq_default",
"cpu.freq_normal",
"cpu.freq_standby",
"crossteam.hint_settings_teams",
"crossteam.hint_settings_teams_backup",
"crossteam.hint_settings_teams_help",
"crossteam.hint_settings_teams_restore",
"daemon_control",
"daemon_item.crond_desc",
"daemon_item.crond_name",
@@ -2585,14 +2581,6 @@ const char * locale_real_names[] =
"settings.pos_top_right",
"settings.restore",
"settings.restore_warn",
"settings.teams",
"settings.teams.backup",
"settings.teams.backup_failed",
"settings.teams.backup_to",
"settings.teams.help",
"settings.teams.help_text",
"settings.teams.restore",
"settings.teams.restore_warn",
"shoutcast.dev_id",
"shoutcast.enabled",
"shutdown.recording_query",