mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- webtv-setup: add possibility to edit webtv-file manually
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -98,12 +98,30 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey)
|
|||||||
CMenuItem *item = m->getItem(selected);
|
CMenuItem *item = m->getItem(selected);
|
||||||
CMenuForwarder *f = static_cast<CMenuForwarder *>(item);
|
CMenuForwarder *f = static_cast<CMenuForwarder *>(item);
|
||||||
std::string dirname(f->getName());
|
std::string dirname(f->getName());
|
||||||
dirname = dirname.substr(0, dirname.rfind('/'));
|
if (strstr(dirname.c_str(), "://"))
|
||||||
if (fileBrowser.exec(dirname.c_str()))
|
|
||||||
{
|
{
|
||||||
f->setName(fileBrowser.getSelectedFile()->Name);
|
std::string entry = dirname;
|
||||||
g_settings.last_webtv_dir = dirname;
|
|
||||||
changed = true;
|
CKeyboardInput *e = new CKeyboardInput(LOCALE_WEBTV_XML_ENTER, &entry, 50);
|
||||||
|
e->exec(this, "");
|
||||||
|
delete e;
|
||||||
|
|
||||||
|
if (entry.compare(dirname) != 0)
|
||||||
|
{
|
||||||
|
f->setName(entry);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
dirname = dirname.substr(0, dirname.rfind('/'));
|
||||||
|
if (fileBrowser.exec(dirname.c_str()))
|
||||||
|
{
|
||||||
|
f->setName(fileBrowser.getSelectedFile()->Name);
|
||||||
|
g_settings.last_webtv_dir = dirname;
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user