updated BasemenuItem

This commit is contained in:
fluxgen 2002-04-08 22:24:50 +00:00
parent 0e60ec478f
commit c3fef77fa4

View file

@ -66,7 +66,7 @@ void Rootmenu::itemSelected(int button, unsigned int index) {
if (item->function()) { if (item->function()) {
switch (item->function()) { switch (item->function()) {
case BScreen::EXECUTE: case BScreen::EXECUTE:
if (item->exec()) { if (item->exec().size()) {
#ifndef __EMX__ #ifndef __EMX__
char displaystring[MAXPATHLEN]; char displaystring[MAXPATHLEN];
sprintf(displaystring, "DISPLAY=%s", sprintf(displaystring, "DISPLAY=%s",
@ -74,9 +74,9 @@ void Rootmenu::itemSelected(int button, unsigned int index) {
sprintf(displaystring + strlen(displaystring) - 1, "%d", sprintf(displaystring + strlen(displaystring) - 1, "%d",
screen->getScreenNumber()); screen->getScreenNumber());
bexec(item->exec(), displaystring); bexec(item->exec().c_str(), displaystring);
#else // __EMX__ #else // __EMX__
spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", item->exec(), NULL); spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", item->exec().c_str(), NULL);
#endif // !__EMX__ #endif // !__EMX__
} }
break; break;
@ -86,8 +86,8 @@ void Rootmenu::itemSelected(int button, unsigned int index) {
break; break;
case BScreen::RESTARTOTHER: case BScreen::RESTARTOTHER:
if (item->exec()) if (item->exec().size())
fluxbox->restart(item->exec()); fluxbox->restart(item->exec().c_str());
break; break;
case BScreen::EXIT: case BScreen::EXIT:
@ -95,8 +95,8 @@ void Rootmenu::itemSelected(int button, unsigned int index) {
break; break;
case BScreen::SETSTYLE: case BScreen::SETSTYLE:
if (item->exec()) { if (item->exec().size()) {
fluxbox->saveStyleFilename(item->exec()); fluxbox->saveStyleFilename(item->exec().c_str());
fluxbox->reconfigureTabs(); //TODO fluxbox->reconfigureTabs(); //TODO
} }