1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 18:53:09 +02:00

The log.txt file will now be saved on the user-specific directory.

This commit is contained in:
Ayla 2011-05-09 19:21:14 +02:00
parent 6cb7ce1c0b
commit 3998e19e49
2 changed files with 3 additions and 3 deletions

View File

@ -466,7 +466,7 @@ void GMenu2X::initMenu() {
menu->addActionLink(i,"USB Nand",MakeDelegate(this,&GMenu2X::activateNandUsb),tr["Activate Usb on Nand"],"skin:icons/usb.png"); menu->addActionLink(i,"USB Nand",MakeDelegate(this,&GMenu2X::activateNandUsb),tr["Activate Usb on Nand"],"skin:icons/usb.png");
//menu->addActionLink(i,"USB Root",MakeDelegate(this,&GMenu2X::activateRootUsb),tr["Activate Usb on the root of the Gp2x Filesystem"],"skin:icons/usb.png");*/ //menu->addActionLink(i,"USB Root",MakeDelegate(this,&GMenu2X::activateRootUsb),tr["Activate Usb on the root of the Gp2x Filesystem"],"skin:icons/usb.png");*/
#endif #endif
if (fileExists(path+"log.txt")) if (fileExists(getHome()+"/log.txt"))
menu->addActionLink(i,tr["Log Viewer"],MakeDelegate(this,&GMenu2X::viewLog),tr["Displays last launched program's output"],"skin:icons/ebook.png"); menu->addActionLink(i,tr["Log Viewer"],MakeDelegate(this,&GMenu2X::viewLog),tr["Displays last launched program's output"],"skin:icons/ebook.png");
menu->addActionLink(i,tr["About"],MakeDelegate(this,&GMenu2X::about),tr["Info about GMenu2X"],"skin:icons/about.png"); menu->addActionLink(i,tr["About"],MakeDelegate(this,&GMenu2X::about),tr["Info about GMenu2X"],"skin:icons/about.png");
} }
@ -532,7 +532,7 @@ and all the anonymous donors...\n\
} }
void GMenu2X::viewLog() { void GMenu2X::viewLog() {
string logfile = path+"log.txt"; string logfile = getHome()+"/log.txt";
if (fileExists(logfile)) { if (fileExists(logfile)) {
ifstream inf(logfile.c_str(), ios_base::in); ifstream inf(logfile.c_str(), ios_base::in);
if (inf.is_open()) { if (inf.is_open()) {

View File

@ -475,7 +475,7 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
} // else, well.. we are no worse off :) } // else, well.. we are no worse off :)
if (params!="") command += " " + params; if (params!="") command += " " + params;
if (gmenu2x->confInt["outputLogs"]) command += " &> " + cmdclean(gmenu2x->getExePath()) + "/log.txt"; if (gmenu2x->confInt["outputLogs"]) command += " &> " + cmdclean(gmenu2x->getHome()) + "/log.txt";
if (wrapper) command += "; sync & cd "+cmdclean(gmenu2x->getExePath())+"; exec ./gmenu2x"; if (wrapper) command += "; sync & cd "+cmdclean(gmenu2x->getExePath())+"; exec ./gmenu2x";
if (dontleave) { if (dontleave) {
system(command.c_str()); system(command.c_str());