mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
Menus shadow; 0 calls timer-list in event-list; Fix exit from sleeptimer set; Testing backup/restore settings
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@647 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -4722,6 +4722,41 @@ printf("New timeshift dir: %s\n", timeshiftDir);
|
||||
{
|
||||
g_Sectionsd->freeMemory();
|
||||
}
|
||||
else if(actionKey == "backup") {
|
||||
if(parent)
|
||||
parent->hide();
|
||||
CFileBrowser fileBrowser;
|
||||
fileBrowser.Dir_Mode = true;
|
||||
if (fileBrowser.exec("/media") == true) {
|
||||
char fname[256];
|
||||
struct statfs s;
|
||||
int ret = ::statfs(fileBrowser.getSelectedFile()->Name.c_str(), &s);
|
||||
if(ret == 0 && s.f_type != 0x72b6L) { /*jffs2*/
|
||||
sprintf(fname, "/bin/backup.sh %s", fileBrowser.getSelectedFile()->Name.c_str());
|
||||
printf("backup: executing [%s]\n", fname);
|
||||
system(fname);
|
||||
} else
|
||||
ShowMsgUTF(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_SETTINGS_BACKUP_FAILED),
|
||||
CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_ERROR);
|
||||
}
|
||||
}
|
||||
else if(actionKey == "restore") {
|
||||
if(parent)
|
||||
parent->hide();
|
||||
CFileBrowser fileBrowser;
|
||||
CFileFilter fileFilter;
|
||||
fileFilter.addFilter("tar");
|
||||
fileBrowser.Filter = &fileFilter;
|
||||
if (fileBrowser.exec("/media") == true) {
|
||||
int result = ShowMsgUTF(LOCALE_SETTINGS_RESTORE, g_Locale->getText(LOCALE_SETTINGS_RESTORE_WARN), CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo);
|
||||
if(result == CMessageBox::mbrYes) {
|
||||
char fname[256];
|
||||
sprintf(fname, "/bin/restore.sh %s", fileBrowser.getSelectedFile()->Name.c_str());
|
||||
printf("restore: executing [%s]\n", fname);
|
||||
system(fname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return returnval;
|
||||
}
|
||||
|
Reference in New Issue
Block a user