mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-16 09:53:36 +02:00
SNeutrinoSettings: convert more char[...] configuration values to std::string
Origin commit data
------------------
Commit: 004aa84e32
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-01-18 (Sat, 18 Jan 2014)
This commit is contained in:
@@ -87,12 +87,13 @@ int CSettingsManager::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
fileBrowser.Dir_Mode = true;
|
||||
if (fileBrowser.exec("/var/tuxbox") == true)
|
||||
{
|
||||
char fname[256] = "neutrino.conf", sname[256];
|
||||
CStringInputSMS * sms = new CStringInputSMS(LOCALE_EXTRA_SAVECONFIG, fname, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789. ");
|
||||
std::string fname = "neutrino.conf";
|
||||
CStringInputSMS * sms = new CStringInputSMS(LOCALE_EXTRA_SAVECONFIG, &fname, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789. ");
|
||||
sms->exec(NULL, "");
|
||||
sprintf(sname, "%s/%s", fileBrowser.getSelectedFile()->Name.c_str(), fname);
|
||||
printf("[neutrino] save settings: %s\n", sname);
|
||||
CNeutrinoApp::getInstance()->saveSetup(sname);
|
||||
|
||||
std::string sname = fileBrowser.getSelectedFile()->Name + "/" + fname;
|
||||
printf("[neutrino] save settings: %s\n", sname.c_str());
|
||||
CNeutrinoApp::getInstance()->saveSetup(sname.c_str());
|
||||
delete sms;
|
||||
}
|
||||
return res;
|
||||
|
@@ -163,9 +163,9 @@ bool CFlashUpdate::selectHttpImage(void)
|
||||
SelectionWidget.addItem(new CMenuSeparator(CMenuSeparator::LINE));
|
||||
|
||||
SelectionWidget.addItem(new CMenuForwarder(current, false));
|
||||
std::ifstream urlFile(g_settings.softupdate_url_file);
|
||||
std::ifstream urlFile(g_settings.softupdate_url_file.c_str());
|
||||
#ifdef DEBUG
|
||||
printf("[update] file %s\n", g_settings.softupdate_url_file);
|
||||
printf("[update] file %s\n", g_settings.softupdate_url_file.c_str());
|
||||
#endif
|
||||
|
||||
unsigned int i = 0;
|
||||
|
@@ -107,7 +107,7 @@ int CUpdateSettings::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
fileFilter.addFilter("urls");
|
||||
fileBrowser.Filter = &fileFilter;
|
||||
if (fileBrowser.exec("/var/etc") == true)
|
||||
strncpy(g_settings.softupdate_url_file, fileBrowser.getSelectedFile()->Name.c_str(), 30);
|
||||
g_settings.softupdate_url_file = fileBrowser.getSelectedFile()->Name;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user