add settings menu screenshot

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


Origin commit data
------------------
Branch: ni/coolstream
Commit: 382ec004ab
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-02-18 (Sat, 18 Feb 2012)

Origin message was:
------------------
-add settings menu screenshot

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


------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-02-18 17:16:30 +00:00
parent eadb8b51dd
commit a01b97d194
13 changed files with 122 additions and 22 deletions

View File

@@ -586,18 +586,33 @@ void CMoviePlayerGui::PlayFile(void)
if(restore)
FileTime.show(position);
} else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
char ending[(sizeof(int)*2) + 6] = ".jpg";
if(!g_settings.screenshot_cover)
snprintf(ending, sizeof(ending) - 1, "_%x.jpg", position);
std::string fname = full_name;
std::string::size_type pos = fname.find_last_of('.');
if(pos != std::string::npos) {
fname.replace(pos, fname.length(), ".jpg");
fname.replace(pos, fname.length(), ending);
} else
fname += ".jpg";
fname += ending;
if(!g_settings.screenshot_cover){
pos = fname.find_last_of('/');
if(pos != std::string::npos) {
std::string fname_scr=fname;
fname.replace(0, pos, g_settings.screenshot_dir);
}
}
#if 0 // TODO disable overwrite ?
if(!access(fname.c_str(), F_OK)) {
}
#endif
CScreenShot * sc = new CScreenShot(fname);
if(g_settings.screenshot_cover && !g_settings.screenshot_video)
sc->EnableVideo(true);
sc->Start();
} else if ( msg == NeutrinoMessages::ANNOUNCE_RECORD ||