-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 2 |
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 | |||
@@ -282,65 +282,65 @@ void VMemo::mousePressEvent( QMouseEvent * /*me*/) { | |||
282 | else | 282 | else |
283 | stopRecording(); | 283 | stopRecording(); |
284 | } | 284 | } |
285 | 285 | ||
286 | void VMemo::mouseReleaseEvent( QMouseEvent * ) { | 286 | void VMemo::mouseReleaseEvent( QMouseEvent * ) { |
287 | } | 287 | } |
288 | 288 | ||
289 | bool VMemo::startRecording() { | 289 | bool VMemo::startRecording() { |
290 | Config config( "Vmemo" ); | 290 | Config config( "Vmemo" ); |
291 | config.setGroup( "System" ); | 291 | config.setGroup( "System" ); |
292 | 292 | ||
293 | useAlerts = config.readBoolEntry("Alert",1); | 293 | useAlerts = config.readBoolEntry("Alert",1); |
294 | if(useAlerts) { | 294 | if(useAlerts) { |
295 | 295 | ||
296 | msgLabel = new QLabel( 0, "alertLabel" ); | 296 | msgLabel = new QLabel( 0, "alertLabel" ); |
297 | msgLabel->setText("<B><P><font size=+2>VMemo-Recording</font></B>"); | 297 | msgLabel->setText("<B><P><font size=+2>VMemo-Recording</font></B>"); |
298 | msgLabel->show(); | 298 | msgLabel->show(); |
299 | } | 299 | } |
300 | 300 | ||
301 | odebug << "Start recording engines" << oendl; | 301 | odebug << "Start recording engines" << oendl; |
302 | recording = TRUE; | 302 | recording = TRUE; |
303 | 303 | ||
304 | if (openDSP() == -1) { | 304 | if (openDSP() == -1) { |
305 | recording = FALSE; | 305 | recording = FALSE; |
306 | return FALSE; | 306 | return FALSE; |
307 | } | 307 | } |
308 | 308 | ||
309 | config.setGroup("Defaults"); | 309 | config.setGroup("Defaults"); |
310 | 310 | ||
311 | date = TimeString::dateString( QDateTime::currentDateTime(),false,true); | 311 | date = TimeString::dateString( QDateTime::currentDateTime(),false,true); |
312 | date.replace(QRegExp("'"),""); | 312 | date.replace(QRegExp("'"),""); |
313 | date.replace(QRegExp(" "),"_"); | 313 | date.replace(QRegExp(" "),"_"); |
314 | date.replace(QRegExp(":"),"."); | 314 | date.replace(QRegExp(":"),"-"); |
315 | date.replace(QRegExp(","),""); | 315 | date.replace(QRegExp(","),""); |
316 | 316 | ||
317 | QString fName; | 317 | QString fName; |
318 | config.setGroup( "System" ); | 318 | config.setGroup( "System" ); |
319 | fName = QPEApplication::documentDir() ; | 319 | fName = QPEApplication::documentDir() ; |
320 | fileName = config.readEntry("RecLocation", fName); | 320 | fileName = config.readEntry("RecLocation", fName); |
321 | 321 | ||
322 | int s; | 322 | int s; |
323 | s=fileName.find(':'); | 323 | s=fileName.find(':'); |
324 | if(s) | 324 | if(s) |
325 | fileName=fileName.right(fileName.length()-s-2); | 325 | fileName=fileName.right(fileName.length()-s-2); |
326 | odebug << "pathname will be "+fileName << oendl; | 326 | odebug << "pathname will be "+fileName << oendl; |
327 | 327 | ||
328 | if( fileName.left(1).find('/') == -1) | 328 | if( fileName.left(1).find('/') == -1) |
329 | fileName="/"+fileName; | 329 | fileName="/"+fileName; |
330 | if( fileName.right(1).find('/') == -1) | 330 | if( fileName.right(1).find('/') == -1) |
331 | fileName+="/"; | 331 | fileName+="/"; |
332 | fName = "vm_"+ date + ".wav"; | 332 | fName = "vm_"+ date + ".wav"; |
333 | 333 | ||
334 | fileName+=fName; | 334 | fileName+=fName; |
335 | odebug << "filename is " + fileName << oendl; | 335 | odebug << "filename is " + fileName << oendl; |
336 | // open tmp file here | 336 | // open tmp file here |
337 | char *pointer; | 337 | char *pointer; |
338 | pointer=tmpnam(NULL); | 338 | pointer=tmpnam(NULL); |
339 | odebug << "Opening tmp file " << pointer << "" << oendl; | 339 | odebug << "Opening tmp file " << pointer << "" << oendl; |
340 | 340 | ||
341 | if(openWAV(pointer ) == -1) { | 341 | if(openWAV(pointer ) == -1) { |
342 | 342 | ||
343 | QString err("Could not open the temp file\n"); | 343 | QString err("Could not open the temp file\n"); |
344 | err += fileName; | 344 | err += fileName; |
345 | QMessageBox::critical(0, "vmemo", err, "Abort"); | 345 | QMessageBox::critical(0, "vmemo", err, "Abort"); |
346 | ::close(dsp); | 346 | ::close(dsp); |