-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 84d53e0..2d694d2 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp | |||
@@ -211,2 +211,3 @@ VMemo::VMemo( QWidget *parent, const char *_name ) | |||
211 | QString release=name.release; | 211 | QString release=name.release; |
212 | |||
212 | Config vmCfg("Vmemo"); | 213 | Config vmCfg("Vmemo"); |
@@ -235,3 +236,4 @@ VMemo::VMemo( QWidget *parent, const char *_name ) | |||
235 | } | 236 | } |
236 | if( vmCfg.readNumEntry("hideIcon",0) == 1 || toggleKey > 0) | 237 | |
238 | if( vmCfg.readNumEntry("hideIcon",0) == 1) | ||
237 | hide(); | 239 | hide(); |
@@ -246,2 +248,3 @@ void VMemo::receive( const QCString &msg, const QByteArray &data ) | |||
246 | { | 248 | { |
249 | qDebug("receive"); | ||
247 | QDataStream stream( data, IO_ReadOnly ); | 250 | QDataStream stream( data, IO_ReadOnly ); |
@@ -277,3 +280,3 @@ bool VMemo::startRecording() { | |||
277 | if ( recording) | 280 | if ( recording) |
278 | return FALSE;; | 281 | return FALSE; |
279 | 282 | ||
@@ -320,3 +323,4 @@ bool VMemo::startRecording() { | |||
320 | fileName=fileName.right(fileName.length()-s-2); | 323 | fileName=fileName.right(fileName.length()-s-2); |
321 | qDebug("filename will be "+fileName); | 324 | qDebug("pathname will be "+fileName); |
325 | |||
322 | if( fileName.left(1).find('/') == -1) | 326 | if( fileName.left(1).find('/') == -1) |
@@ -336,3 +340,3 @@ bool VMemo::startRecording() { | |||
336 | if(openWAV(fileName.latin1()) == -1) { | 340 | if(openWAV(fileName.latin1()) == -1) { |
337 | // QString err("Could not open the output file\n"); | 341 | // QString err("Could not open the output file\n"); |
338 | // err += fileName; | 342 | // err += fileName; |
@@ -362,2 +366,4 @@ bool VMemo::startRecording() { | |||
362 | void VMemo::stopRecording() { | 366 | void VMemo::stopRecording() { |
367 | show(); | ||
368 | qDebug("Stopped recording"); | ||
363 | recording = FALSE; | 369 | recording = FALSE; |
@@ -366,2 +372,6 @@ void VMemo::stopRecording() { | |||
366 | t_timer->stop(); | 372 | t_timer->stop(); |
373 | Config cfg("Vmemo"); | ||
374 | cfg.setGroup("Defaults"); | ||
375 | if( cfg.readNumEntry("hideIcon",0) == 1 ) | ||
376 | hide(); | ||
367 | } | 377 | } |
@@ -386,6 +396,6 @@ int VMemo::openDSP() | |||
386 | if(systemZaurus) { | 396 | if(systemZaurus) { |
387 | dsp = open("/dev/dsp1", O_RDWR); //Zaurus needs /dev/dsp1 | 397 | dsp = open("/dev/dsp1", O_RDONLY); //Zaurus needs /dev/dsp1 |
388 | channels=1; //zaurus has one input channel | 398 | channels=1; //zaurus has one input channel |
389 | } else { | 399 | } else { |
390 | dsp = open("/dev/dsp", O_RDWR); | 400 | dsp = open("/dev/dsp", O_RDONLY); |
391 | } | 401 | } |
@@ -567,3 +577,3 @@ void VMemo::record(void) | |||
567 | track.close(); | 577 | track.close(); |
568 | qDebug("Tracvk closed"); | 578 | qDebug("Track closed"); |
569 | 579 | ||
@@ -577,2 +587,3 @@ void VMemo::record(void) | |||
577 | qDebug("done recording "+fileName); | 587 | qDebug("done recording "+fileName); |
588 | |||
578 | QSound::play(Resource::findSound("vmemoe")); | 589 | QSound::play(Resource::findSound("vmemoe")); |