author | llornkcor <llornkcor> | 2002-07-12 04:53:07 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-12 04:53:07 (UTC) |
commit | 7c12000481b535ce54951ef8a53b439814f8fcd6 (patch) (side-by-side diff) | |
tree | eed9230c9d4defd43b0735710fec49788ca17fd5 | |
parent | 5f010888acabe5d00504b05d159b2837ff115f05 (diff) | |
download | opie-7c12000481b535ce54951ef8a53b439814f8fcd6.zip opie-7c12000481b535ce54951ef8a53b439814f8fcd6.tar.gz opie-7c12000481b535ce54951ef8a53b439814f8fcd6.tar.bz2 |
try to fix taskbar icon foofaa
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 2c3edf1..b77e3b8 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -256,5 +256,7 @@ void VMemo::receive( const QCString &msg, const QByteArray &data ) fromToggle = TRUE; - stopRecording(); + mouseReleaseEvent(NULL); +// stopRecording(); } else { fromToggle = TRUE; + // mousePressEvent(NULL); startRecording(); @@ -270,5 +272,17 @@ void VMemo::paintEvent( QPaintEvent* ) -void VMemo::mousePressEvent( QMouseEvent * ) +void VMemo::mousePressEvent( QMouseEvent * me) { - if(!recording) + // just to be safe + if (recording) { + recording = FALSE; + return; + } + /* No mousePress/mouseRelease recording on the iPAQ. The REC button on the iPAQ calls these functions + mousePressEvent and mouseReleaseEvent with a NULL parameter. */ + if ( me->button() != LeftButton) + + // if (!systemZaurus && me != NULL) + return; + + if(!recording) startRecording(); @@ -349,10 +363,22 @@ bool VMemo::startRecording() { - if(openWAV(fileName.latin1()) == -1) { - // QString err("Could not open the output file\n"); - // err += fileName; - // QMessageBox::critical(0, "vmemo", err, "Abort"); - close(dsp); +// open tmp file here + char *pointer; + pointer=tmpnam(NULL); + qDebug("Opening tmp file %s",pointer); + + if(openWAV(pointer ) == -1) { + +// if(openWAV(fileName.latin1()) == -1) { + QString err("Could not open the temp file\n"); + err += fileName; + QMessageBox::critical(0, "vmemo", err, "Abort"); + ::close(dsp); return FALSE; } - + QString cmd; + cmd.sprintf("mv %s "+fileName,pointer); + +// move tmp file to regular file here + system(cmd.latin1()); + QArray<int> cats(1); @@ -649,3 +675,3 @@ void VMemo::timerBreak() { stopRecording(); - QMessageBox::message("Vmemo","Vmemo recording has \ntimed out"); + QMessageBox::message("Vmemo","Vmemo recording has ended"); } |