Compare commits

..

6 Commits

Author SHA1 Message Date
Thilo Graf
335afa7938 update to version 3.7.1
bugfixes
2017-12-23 16:34:30 +01:00
Thilo Graf
01350745c7 COPKGManager: fix path search for ../opkg/info
Since changed TARGET_PREFIX variable, path was wrong and causing
possible long timeout while opening the manager window.
2017-12-23 16:31:47 +01:00
Thilo Graf
a48d9dc626 .version: fix path to .version in some relevant files 2017-12-23 16:31:47 +01:00
Thilo Graf
2ce57350ba CNetworkSetup: cleanup and unify debug output 2017-12-23 16:31:28 +01:00
Thilo Graf
51fc78c7e7 CComponentsWindow: add method to set background image in window classes
- setBodyBGImage() exists as member of base class CCDraw and had
  no visual effect in this class, because visibility of window container is disabled.
  This additional member overloads the original methode and is using functionality from
  window body object. Example for buildinfo added.

TODO:
- background behavior of embedded objects must be global adapted if a background image is used
2017-12-23 16:30:11 +01:00
Thilo Graf
516ad45bfd CImageInfo: fix path to .version file 2017-12-22 15:23:53 +01:00
10 changed files with 68 additions and 40 deletions

View File

@@ -1,3 +1,31 @@
2017-12-23 Thilo Graf <dbt@novatux.de>
update to version 3.7.1
bugfixes
COPKGManager: fix path search for ../opkg/info
Since changed TARGET_PREFIX variable, path was wrong and causing
possible long timeout while opening the manager window.
.version: fix path to .version in some relevant files
CNetworkSetup: cleanup and unify debug output
2017-12-23 Thilo Graf <dbt@novatux.de>
CComponentsWindow: add method to set background image in window classes
- setBodyBGImage() exists as member of base class CCDraw and had
no visual effect in this class, because visibility of window container is disabled.
This additional member overloads the original methode and is using functionality from
window body object. Example for buildinfo added.
TODO:
- background behavior of embedded objects must be global adapted if a background image is used
2017-12-22 Thilo Graf <dbt@novatux.de>
CImageInfo: fix path to .version file
2017-12-21 Thilo Graf <dbt@novatux.de>
update version to 3.7.0
@@ -15,7 +43,7 @@
Fileplay: add separat fileplay for audio and video
2017-12-19 svenhoefer <svenhoefer@svenhoefer.com>
2017-12-21 svenhoefer <svenhoefer@svenhoefer.com>
- user-menu: add audio fileplay item
Conflicts:
@@ -35,10 +63,6 @@
src/driver/rcinput.cpp
src/driver/rcinput.h
2017-12-18 GetAway <get-away@t-online.de>
audiomute.cpp: fix clear screen after audiomute
2017-12-18 svenhoefer <svenhoefer@svenhoefer.com>
- acinclude: configure for generic hardware by default
@@ -62,6 +86,10 @@
Icons: add missing hint icons and fix some files with format errors
2017-12-18 GetAway <get-away@t-online.de>
audiomute.cpp: fix clear screen after audiomute
2017-12-17 Thilo Graf <dbt@novatux.de>
icons: fix assignment of settings, network and mainmenu icons

View File

@@ -1,4 +1,4 @@
AC_INIT(Tuxbox-Neutrino,3.7.0)
AC_INIT(Tuxbox-Neutrino,3.7.1)
AM_INIT_AUTOMAKE([1.0.1 nostdinc])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])

View File

@@ -3,7 +3,7 @@
Copyright (C) 2001 by Steffen Hehn 'McClean'
Copyright (C) 2013, M. Liebmann 'micha-bbg'
Copyright (C) 2013-2014, Thilo Graf 'dbt'
Copyright (C) 2013-2017, Thilo Graf 'dbt'
License: GPL
@@ -40,6 +40,7 @@ using namespace std;
CBuildInfo::CBuildInfo(bool show) : CComponentsWindow(0, 0, CCW_PERCENT 85, CCW_PERCENT 85, LOCALE_BUILDINFO_MENU, NEUTRINO_ICON_INFO)
{
initVarBuildInfo();
setBodyBGImage(DATADIR "/neutrino/icons/start.jpg");
if (show)
exec(NULL, "");
else

View File

@@ -3,7 +3,7 @@
Copyright (C) 2001 by Steffen Hehn 'McClean'
Classes for generic GUI-related components.
Copyright (C) 2012-2016 Thilo Graf 'dbt'
Copyright (C) 2012-2017 Thilo Graf 'dbt'
Copyright (C) 2012, Michael Liebmann 'micha-bbg'
License: GPL
@@ -444,3 +444,8 @@ void CComponentsWindow::paint(bool do_save_bg)
//paint form contents
paintForm(do_save_bg);
}
bool CComponentsWindow::setBodyBGImage(const std::string& image_path)
{
return getBodyObject()->setBodyBGImage(image_path);
}

View File

@@ -3,7 +3,7 @@
Copyright (C) 2001 by Steffen Hehn 'McClean'
Classes for generic GUI-related components.
Copyright (C) 2012-2016, Thilo Graf 'dbt'
Copyright (C) 2012-2017, Thilo Graf 'dbt'
License: GPL
@@ -435,6 +435,12 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes
* @note use addExitKey() if new exec key is required
*/
virtual void removeExitKeys(){getBodyObject()->removeExitKeys();}
/**
* Sets an image for window background.
* @note The assigned image is assigned into body object! Main container, header and footer will be not touched.
*/
bool setBodyBGImage(const std::string& image_path);
};
class CComponentsWindowMax : public CComponentsWindow

View File

@@ -49,7 +49,7 @@
#include <nhttpd/yconfig.h>
#include <ctype.h>
#define VERSION_FILE TARGET_PREFIX "/.version"
#define VERSION_FILE "/.version"
using namespace std;

View File

@@ -87,7 +87,7 @@ CNetworkSetup* CNetworkSetup::getInstance()
if(!me) {
me = new CNetworkSetup();
dprintf(DEBUG_DEBUG, "CNetworkSetup Instance created\n");
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], Instance created\n", __func__, __LINE__);
}
return me;
}
@@ -108,21 +108,11 @@ int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey)
}
else if(actionKey=="networktest")
{
printf("[network setup] doing network test...\n");
#if 0
testNetworkSettings( networkConfig->address.c_str(),
networkConfig->netmask.c_str(),
networkConfig->broadcast.c_str(),
networkConfig->gateway.c_str(),
networkConfig->nameserver.c_str(),
networkConfig->inet_static);
#endif
testNetworkSettings();
return res;
}
else if(actionKey=="networkshow")
{
dprintf(DEBUG_INFO, "show current network settings...\n");
showCurrentNetworkSettings();
return res;
}
@@ -144,7 +134,7 @@ int CNetworkSetup::exec(CMenuTarget* parent, const std::string &actionKey)
return res;
}
printf("[neutrino] init network setup...\n");
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], init network setup...\n", __func__, __LINE__);
res = showNetworkSetup();
return res;
@@ -453,9 +443,7 @@ bool CNetworkSetup::checkIntSettings()
};
for (uint i = 0; i < (sizeof(n_isettings) / sizeof(n_isettings[0])); i++)
if (n_isettings[i].old_network_setting != n_isettings[i].network_setting) {
#ifdef DEBUG
printf("CNetworkSetup::checkIntSettings: %d %d -> %d\n", i, n_isettings[i].old_network_setting, n_isettings[i].network_setting);
#endif
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], %d %d -> %d\n", __func__, __LINE__, i, n_isettings[i].old_network_setting, n_isettings[i].network_setting);
return true;
}
@@ -483,9 +471,7 @@ bool CNetworkSetup::checkStringSettings()
};
for (uint i = 0; i < (sizeof(n_ssettings) / sizeof(n_ssettings[0])); i++)
if (n_ssettings[i].old_network_setting != n_ssettings[i].network_setting) {
#ifdef DEBUG
printf("CNetworkSetup::checkStringSettings: %d: %s -> %s\n", i, n_ssettings[i].old_network_setting.c_str(), n_ssettings[i].network_setting.c_str());
#endif
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], %d: %s -> %s\n", __func__, __LINE__, i, n_ssettings[i].old_network_setting.c_str(), n_ssettings[i].network_setting.c_str());
return true;
}
if(CNetworkConfig::getInstance()->wireless) {
@@ -547,7 +533,7 @@ bool CNetworkSetup::checkForIP()
{
if (n_settings[i].network_settings.empty()) //no definied setting
{
printf("[network setup] empty address %s\n", g_Locale->getText(n_settings[i].addr_name));
dprintf(DEBUG_NORMAL, "\033[33m\[CNetworkSetup]\t[%s - %d], empty address %s\033[0m\n", __func__, __LINE__, g_Locale->getText(n_settings[i].addr_name));
char msg[64];
snprintf(msg, 64, g_Locale->getText(LOCALE_NETWORKMENU_ERROR_NO_ADDRESS), g_Locale->getText(n_settings[i].addr_name));
ShowMsg(LOCALE_MAINSETTINGS_NETWORK, msg, CMsgBox::mbrOk, CMsgBox::mbOk, NEUTRINO_ICON_ERROR, width);
@@ -562,7 +548,7 @@ bool CNetworkSetup::checkForIP()
//saves settings without apply, reboot is required
void CNetworkSetup::saveNetworkSettings()
{
printf("[network setup] saving current network settings...\n");
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], saving current network settings...\n", __func__, __LINE__);
prepareSettings();
networkConfig->commitConfig();
@@ -571,7 +557,7 @@ void CNetworkSetup::saveNetworkSettings()
//saves settings and apply
void CNetworkSetup::applyNetworkSettings()
{
printf("[network setup] apply network settings...\n");
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], apply network settings...\n", __func__, __LINE__);
if (!checkForIP())
return;
@@ -656,7 +642,7 @@ bool CNetworkSetup::changeNotify(const neutrino_locale_t locale, void * /*Data*/
} else if(locale == LOCALE_NETWORKMENU_SELECT_IF) {
networkConfig->readConfig(g_settings.ifname);
readNetworkSettings();
printf("CNetworkSetup::changeNotify: using %s, static %d\n", g_settings.ifname.c_str(), CNetworkConfig::getInstance()->inet_static);
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], using %s, static %d\n", __func__, __LINE__, g_settings.ifname.c_str(), CNetworkConfig::getInstance()->inet_static);
changeNotify(LOCALE_NETWORKMENU_DHCP, &CNetworkConfig::getInstance()->inet_static);
@@ -670,6 +656,7 @@ bool CNetworkSetup::changeNotify(const neutrino_locale_t locale, void * /*Data*/
void CNetworkSetup::showCurrentNetworkSettings()
{
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], show current network settings...\n", __func__, __LINE__);
std::string ip, mask, broadcast, router, nameserver, text;
netGetIP(g_settings.ifname, ip, mask, broadcast);
if (ip[0] == 0) {
@@ -709,6 +696,7 @@ const char * CNetworkSetup::mypinghost(std::string &host)
void CNetworkSetup::testNetworkSettings()
{
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], doing network test...\n", __func__, __LINE__);
std::string our_ip, our_mask, our_broadcast, our_gateway, our_nameserver;
std::string text, testsite, offset = " ";
@@ -722,7 +710,7 @@ void CNetworkSetup::testNetworkSettings()
//get www-domain testsite from /.version
CConfigFile config('\t');
config.loadConfig(TARGET_PREFIX "/.version");
config.loadConfig("/.version");
testsite = config.getString("homepage",defaultsite);
testsite.replace( 0, testsite.find("www",0), "" );
@@ -830,7 +818,7 @@ int CNetworkSetup::showWlanList()
res = wlist.exec(NULL, "");
delete selector;
printf("CNetworkSetup::showWlanList: selected: %d\n", select);
dprintf(DEBUG_NORMAL, "[CNetworkSetup]\t[%s - %d], selected: %d\n", __func__, __LINE__, select);
if (select >= 0) {
network_ssid = networks[select].ssid;
}

View File

@@ -655,12 +655,12 @@ bool COPKGManager::hasOpkgSupport()
string COPKGManager::getInfoDir()
{
/* /opt/opkg/... is path in patched opkg, /var/lib/opkg/... is original path */
string dirs[] = {TARGET_PREFIX"/opt/opkg/info", TARGET_PREFIX"/var/lib/opkg/info"};
string dirs[] = {TARGET_PREFIX"/opt/opkg/info", TARGET_PREFIX"/var/lib/opkg/info", "/var/lib/opkg/info", "/opt/opkg/info"};
for (size_t i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++) {
if (access(dirs[i].c_str(), R_OK) == 0)
return dirs[i];
dprintf(DEBUG_NORMAL, "[COPKGManager] [%s - %d] InfoDir [%s] not found\n", __func__, __LINE__, dirs[i].c_str());
}
dprintf(DEBUG_NORMAL, "[COPKGManager] [%s - %d] InfoDir not found\n", __func__, __LINE__);
return "";
}

View File

@@ -146,7 +146,7 @@ bool CFlashUpdate::checkOnlineVersion()
std::vector<CUpdateMenuTarget*> update_t_list;
CConfigFile _configfile('\t');
const char * versionString = (_configfile.loadConfig(TARGET_PREFIX "/.version")) ? (_configfile.getString( "version", "????????????????").c_str()) : "????????????????";
const char * versionString = (_configfile.loadConfig( "/.version")) ? (_configfile.getString( "version", "????????????????").c_str()) : "????????????????";
#ifdef DEBUG
printf("[update] file %s\n", g_settings.softupdate_url_file.c_str());
#endif
@@ -203,7 +203,7 @@ bool CFlashUpdate::selectHttpImage(void)
CConfigFile _configfile('\t');
std::string versionString = "????????????????";
if (_configfile.loadConfig(TARGET_PREFIX "/.version"))
if (_configfile.loadConfig("/.version"))
versionString = _configfile.getString("version", "????????????????");
CFlashVersionInfo curInfo(versionString.c_str());

View File

@@ -822,7 +822,7 @@ void CControlAPI::InfoCGI(CyhookHandler *hh)
if (hh->ParamList["1"] == "streaminfo") // print streaminfo
SendStreamInfo(hh);
else if (hh->ParamList["1"] == "version") // send version file
hh->SendFile(TARGET_PREFIX "/.version");
hh->SendFile("/.version");
else if (hh->ParamList["1"] == "httpdversion") // print httpd version typ (just for compatibility)
hh->Write("3");
else if (hh->ParamList["1"] == "nhttpd_version")// print nhttpd version
@@ -2052,7 +2052,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh)
//-----------------------------------------------------------------------------
void CControlAPI::VersionCGI(CyhookHandler *hh)
{
hh->SendFile(TARGET_PREFIX "/.version");
hh->SendFile("/.version");
}
//-----------------------------------------------------------------------------
void CControlAPI::ReloadNeutrinoSetupCGI(CyhookHandler *hh)