summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index f088bef..b80b378 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -266,97 +266,97 @@ void VMemo::receive( const QCString &msg, const QByteArray &data ) {
void VMemo::paintEvent( QPaintEvent* ) {
QPainter p(this);
p.drawPixmap( 0, 1,( const char** ) vmemo_xpm );
}
void VMemo::mousePressEvent( QMouseEvent * /*me*/) {
/* No mousePress/mouseRelease recording on the iPAQ. The REC button on the iPAQ calls these functions
mousePressEvent and mouseReleaseEvent with a NULL parameter. */
// if (!systemZaurus && me != NULL)
// return;
// }
if(!recording)
startRecording();
else
stopRecording();
}
void VMemo::mouseReleaseEvent( QMouseEvent * ) {
}
bool VMemo::startRecording() {
Config config( "Vmemo" );
config.setGroup( "System" );
useAlerts = config.readBoolEntry("Alert",1);
if(useAlerts) {
msgLabel = new QLabel( 0, "alertLabel" );
msgLabel->setText("<B><P><font size=+2>VMemo-Recording</font></B>");
msgLabel->show();
}
odebug << "Start recording engines" << oendl;
recording = TRUE;
if (openDSP() == -1) {
recording = FALSE;
return FALSE;
}
config.setGroup("Defaults");
date = TimeString::dateString( QDateTime::currentDateTime(),false,true);
date.replace(QRegExp("'"),"");
date.replace(QRegExp(" "),"_");
- date.replace(QRegExp(":"),".");
+ date.replace(QRegExp(":"),"-");
date.replace(QRegExp(","),"");
QString fName;
config.setGroup( "System" );
fName = QPEApplication::documentDir() ;
fileName = config.readEntry("RecLocation", fName);
int s;
s=fileName.find(':');
if(s)
fileName=fileName.right(fileName.length()-s-2);
odebug << "pathname will be "+fileName << oendl;
if( fileName.left(1).find('/') == -1)
fileName="/"+fileName;
if( fileName.right(1).find('/') == -1)
fileName+="/";
fName = "vm_"+ date + ".wav";
fileName+=fName;
odebug << "filename is " + fileName << oendl;
// open tmp file here
char *pointer;
pointer=tmpnam(NULL);
odebug << "Opening tmp file " << pointer << "" << oendl;
if(openWAV(pointer ) == -1) {
QString err("Could not open the temp file\n");
err += fileName;
QMessageBox::critical(0, "vmemo", err, "Abort");
::close(dsp);
return FALSE;
}
if( record() ) {
QString cmd;
if( fileName.find(".wav",0,TRUE) == -1)
fileName += ".wav";
cmd.sprintf("mv %s "+fileName, pointer);
// move tmp file to regular file here
system(cmd.latin1());
QArray<int> cats(1);
cats[0] = config.readNumEntry("Category", 0);