summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-19 17:13:43 (UTC)
committer llornkcor <llornkcor>2002-05-19 17:13:43 (UTC)
commit396ca2a131b398b1562fee1cdc8cbe9bc629b37f (patch) (unidiff)
tree77a2bc6bb9a9887acb37ce887ef7bf9ed739002e
parent61a917bec9006516115d94be8c49acadf4eba222 (diff)
downloadopie-396ca2a131b398b1562fee1cdc8cbe9bc629b37f.zip
opie-396ca2a131b398b1562fee1cdc8cbe9bc629b37f.tar.gz
opie-396ca2a131b398b1562fee1cdc8cbe9bc629b37f.tar.bz2
can hide the icon by adding in VMemo.conf [Defaults] hideIcon = 1
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index 7e91ef0..c27050d 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -207,15 +207,12 @@ VMemo::VMemo( QWidget *parent, const char *_name )
207 QString release=name.release; 207 QString release=name.release;
208 Config vmCfg("VMemo"); 208 Config vmCfg("VMemo");
209 vmCfg.setGroup("Defaults"); 209 vmCfg.setGroup("Defaults");
210 int toggleKey = vmCfg.readNumEntry("toggleKey", -1);
210 211
211 if(release.find("embedix",0,TRUE) !=-1) { 212 if(release.find("embedix",0,TRUE) !=-1)
212 int toggleKey = vmCfg.readNumEntry("toggleKey", -1);
213 systemZaurus=TRUE; 213 systemZaurus=TRUE;
214 } else { 214 else
215 int toggleKey = vmCfg.readNumEntry("toggleKey", 4096);
216//default key for ipaq record button is Key_Escape = 4096
217 systemZaurus=FALSE; 215 systemZaurus=FALSE;
218 }
219 216
220 myChannel = new QCopChannel( "QPE/VMemo", this ); 217 myChannel = new QCopChannel( "QPE/VMemo", this );
221 connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), 218 connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)),
@@ -229,6 +226,8 @@ VMemo::VMemo( QWidget *parent, const char *_name )
229 e << QString("QPE/VMemo"); 226 e << QString("QPE/VMemo");
230 e << QString("toggleRecord()"); 227 e << QString("toggleRecord()");
231 } 228 }
229 if( vmCfg.readNumEntry("hideIcon",0) == 1)
230 hide();
232 } 231 }
233} 232}
234 233
@@ -377,22 +376,18 @@ int VMemo::openDSP()
377 376
378 if(ioctl(dsp, SNDCTL_DSP_SETFMT , &format)==-1) { 377 if(ioctl(dsp, SNDCTL_DSP_SETFMT , &format)==-1) {
379 perror("ioctl(\"SNDCTL_DSP_SETFMT\")"); 378 perror("ioctl(\"SNDCTL_DSP_SETFMT\")");
380 errorMsg="ioctl(\"SNDCTL_DSP_SETFMT\")\n%d\n"+(QString)strerror(errno),format;
381 return -1; 379 return -1;
382 } 380 }
383 if(ioctl(dsp, SNDCTL_DSP_CHANNELS , &channels)==-1) { 381 if(ioctl(dsp, SNDCTL_DSP_CHANNELS , &channels)==-1) {
384 perror("ioctl(\"SNDCTL_DSP_CHANNELS\")"); 382 perror("ioctl(\"SNDCTL_DSP_CHANNELS\")");
385 errorMsg="ioctl(\"SNDCTL_DSP_CHANNELS\")\n%d\n"+(QString)strerror(errno),channels;
386 return -1; 383 return -1;
387 } 384 }
388 if(ioctl(dsp, SNDCTL_DSP_SPEED , &speed)==-1) { 385 if(ioctl(dsp, SNDCTL_DSP_SPEED , &speed)==-1) {
389 perror("ioctl(\"SNDCTL_DSP_SPEED\")"); 386 perror("ioctl(\"SNDCTL_DSP_SPEED\")");
390 errorMsg="ioctl(\"SNDCTL_DSP_SPEED\")\n%d\n"+(QString)strerror(errno),speed;
391 return -1; 387 return -1;
392 } 388 }
393 if(ioctl(dsp, SOUND_PCM_READ_RATE , &rate)==-1) { 389 if(ioctl(dsp, SOUND_PCM_READ_RATE , &rate)==-1) {
394 perror("ioctl(\"SOUND_PCM_READ_RATE\")"); 390 perror("ioctl(\"SOUND_PCM_READ_RATE\")");
395 errorMsg="ioctl(\"SOUND_PCM_READ_RATE\")\n%d\n"+(QString)strerror(errno),rate;
396 return -1; 391 return -1;
397 } 392 }
398 393