use chooserDir

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1033 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 47752165ea
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2011-01-18 (Tue, 18 Jan 2011)

Origin message was:
------------------
-use chooserDir

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1033 e54a6e83-5905-42d5-8d5c-058d10e6a962


------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2011-01-18 07:33:11 +00:00
parent db98963f8b
commit de14475bf8
2 changed files with 8 additions and 18 deletions

View File

@@ -102,24 +102,14 @@ int CRecordSetup::exec(CMenuTarget* parent, const std::string &actionKey)
else if(actionKey == "recordingdir")
{
//parent->hide();
CFileBrowser b;
b.Dir_Mode=true;
if (b.exec(g_settings.network_nfs_recordingdir))
{
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
const char *action_str = "recordingdir";
if(chooserDir(g_settings.network_nfs_recordingdir, true, action_str, sizeof(g_settings.network_nfs_recordingdir)-1)){
printf("New recordingdir: %s (timeshift %s)\n", g_settings.network_nfs_recordingdir, g_settings.timeshiftdir);
if(strlen(g_settings.timeshiftdir) == 0)
{
strncpy(g_settings.network_nfs_recordingdir, b.getSelectedFile()->Name.c_str(), sizeof(g_settings.network_nfs_recordingdir)-1);
printf("New recordingdir: %s (timeshift %s)\n", g_settings.network_nfs_recordingdir, g_settings.timeshiftdir);
if(strlen(g_settings.timeshiftdir) == 0)
{
sprintf(timeshiftDir, "%s/.timeshift", g_settings.network_nfs_recordingdir);
safe_mkdir(timeshiftDir);
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;