mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
-use chooserDir
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1033 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -102,24 +102,14 @@ int CRecordSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
else if(actionKey == "recordingdir")
|
else if(actionKey == "recordingdir")
|
||||||
{
|
{
|
||||||
//parent->hide();
|
//parent->hide();
|
||||||
CFileBrowser b;
|
const char *action_str = "recordingdir";
|
||||||
b.Dir_Mode=true;
|
if(chooserDir(g_settings.network_nfs_recordingdir, true, action_str, sizeof(g_settings.network_nfs_recordingdir)-1)){
|
||||||
if (b.exec(g_settings.network_nfs_recordingdir))
|
printf("New recordingdir: %s (timeshift %s)\n", g_settings.network_nfs_recordingdir, g_settings.timeshiftdir);
|
||||||
{
|
if(strlen(g_settings.timeshiftdir) == 0)
|
||||||
const char * newdir = b.getSelectedFile()->Name.c_str();
|
|
||||||
printf("New recordingdir: selected %s\n", newdir);
|
|
||||||
if(check_dir(newdir))
|
|
||||||
printf("Wrong/unsupported recording dir %s\n", newdir);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
strncpy(g_settings.network_nfs_recordingdir, b.getSelectedFile()->Name.c_str(), sizeof(g_settings.network_nfs_recordingdir)-1);
|
sprintf(timeshiftDir, "%s/.timeshift", g_settings.network_nfs_recordingdir);
|
||||||
printf("New recordingdir: %s (timeshift %s)\n", g_settings.network_nfs_recordingdir, g_settings.timeshiftdir);
|
safe_mkdir(timeshiftDir);
|
||||||
if(strlen(g_settings.timeshiftdir) == 0)
|
printf("New timeshift dir: %s\n", timeshiftDir);
|
||||||
{
|
|
||||||
sprintf(timeshiftDir, "%s/.timeshift", g_settings.network_nfs_recordingdir);
|
|
||||||
safe_mkdir(timeshiftDir);
|
|
||||||
printf("New timeshift dir: %s\n", timeshiftDir);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@@ -4194,7 +4194,7 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
parent->hide();
|
parent->hide();
|
||||||
|
|
||||||
const char *action_str = "update";
|
const char *action_str = "update";
|
||||||
if(chooserDir(g_settings.update_dir, true, NULL, sizeof(g_settings.update_dir)-1)){
|
if(chooserDir(g_settings.update_dir, true, action_str, sizeof(g_settings.update_dir)-1)){
|
||||||
printf("[neutrino] new %s dir %s\n", action_str, g_settings.update_dir);
|
printf("[neutrino] new %s dir %s\n", action_str, g_settings.update_dir);
|
||||||
}
|
}
|
||||||
return menu_return::RETURN_REPAINT;
|
return menu_return::RETURN_REPAINT;
|
||||||
|
Reference in New Issue
Block a user