Index: xpdf-3.00/xpdf/XPDFCore.cc =================================================================== --- xpdf-3.00.orig/xpdf/XPDFCore.cc 2005-07-17 22:11:10.000000000 +0200 +++ xpdf-3.00/xpdf/XPDFCore.cc 2005-07-17 22:22:42.000000000 +0200 @@ -1109,8 +1109,7 @@ case actionLaunch: fileName = ((LinkLaunch *)action)->getFileName(); s = fileName->getCString(); - if (!strcmp(s + fileName->getLength() - 4, ".pdf") || - !strcmp(s + fileName->getLength() - 4, ".PDF")) { + if ((fileName->getLength() > 4) && !strncasecmp(s + fileName->getLength() - 4, ".pdf", 4)) { //~ translate path name for VMS (deal with '/') if (isAbsolutePath(s)) { fileName = fileName->copy(); @@ -1124,7 +1123,21 @@ delete fileName; displayPage(1, zoom, rotate, gFalse, gTrue); } else { + int dontshowmsg=0, slen=fileName->getLength()-4; + fileName = fileName->copy(); + + // check for audio types + if((slen > 0) && ( + !strncasecmp(s+slen, ".mp3", 4) + || !strncasecmp(s+slen, ".ogg", 4) + || !strncasecmp(s+slen, ".wav", 4) + ) ) + { + fileName->insert(0, "showaudio "); + dontshowmsg=1; + } + if (((LinkLaunch *)action)->getParams()) { fileName->append(' '); fileName->append(((LinkLaunch *)action)->getParams()); @@ -1136,9 +1149,9 @@ #else fileName->append(" &"); #endif - msg = new GString("About to execute the command:\n"); + msg = new GString("About to execute the command: "); msg->append(fileName); - if (doQuestionDialog("Launching external application", msg)) { + if (dontshowmsg || doQuestionDialog("Launching external application", msg)) { system(fileName->getCString()); } delete fileName;