-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 24 | ||||
-rw-r--r-- | core/applets/vmemo/vmemo.h | 2 |
2 files changed, 17 insertions, 9 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index b5239eb..035965e 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -262,3 +262,5 @@ void VMemo::receive( const QCString &msg, const QByteArray &data ) { QDataStream stream( data, IO_ReadOnly ); + if (msg == "toggleRecord()") { + if (recording) { @@ -266,3 +268,3 @@ void VMemo::receive( const QCString &msg, const QByteArray &data ) { mouseReleaseEvent(NULL); -// stopRecording(); + stopRecording(); } else { @@ -361,3 +363,2 @@ bool VMemo::startRecording() { fileName+=fName; - qDebug("filename is "+fileName); // No spaces in the filename @@ -368,2 +369,3 @@ bool VMemo::startRecording() { + qDebug("filename is "+fileName); // open tmp file here @@ -382,3 +384,3 @@ bool VMemo::startRecording() { } - record(); + if( record() ) { @@ -400,4 +402,6 @@ bool VMemo::startRecording() { l.writeLink(); - return TRUE; + } else + return FALSE; + } @@ -506,3 +510,4 @@ int VMemo::openWAV(const char *filename) { -void VMemo::record(void) { +bool VMemo::record() { + int length=0, result, value; @@ -514,3 +519,3 @@ void VMemo::record(void) { int sRate=config.readNumEntry("SizeLimit", 30); - + if(sRate > 0) t_timer->start( sRate * 1000+1000, TRUE); @@ -539,4 +544,5 @@ void VMemo::record(void) { QMessageBox::message(tr("Note"),tr("error recording")); - recording=FALSE;; + recording=FALSE; break; + return FALSE; } @@ -560,2 +566,4 @@ void VMemo::record(void) { QMessageBox::message("Vmemo"," Done1 recording\n"+ fileName); + break; + return FALSE; } @@ -599,3 +607,3 @@ void VMemo::record(void) { QCopEnvelope( "QPE/System", "volumeChange(bool)" ) << TRUE; //mute - +return TRUE; } diff --git a/core/applets/vmemo/vmemo.h b/core/applets/vmemo/vmemo.h index 167af2a..9ee08ff 100644 --- a/core/applets/vmemo/vmemo.h +++ b/core/applets/vmemo/vmemo.h @@ -40,3 +40,3 @@ bool usingIcon, useADPCM; public slots: - void record(); + bool record(); void mousePressEvent( QMouseEvent * ); |