summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-06-28 23:37:17 (UTC)
committer llornkcor <llornkcor>2002-06-28 23:37:17 (UTC)
commit0552cd7f5762939ccdf05b9bf4fdae9b3e79b0a5 (patch) (side-by-side diff)
treef1414fe0a921700e616b52c01ff84ea250e168b4
parent05a76394214a0066325c71f91eb44ed7412df67c (diff)
downloadopie-0552cd7f5762939ccdf05b9bf4fdae9b3e79b0a5.zip
opie-0552cd7f5762939ccdf05b9bf4fdae9b3e79b0a5.tar.gz
opie-0552cd7f5762939ccdf05b9bf4fdae9b3e79b0a5.tar.bz2
changed O_RDWR to O_RDONLY
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp25
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 )
QString release=name.release;
+
Config vmCfg("Vmemo");
@@ -235,3 +236,4 @@ VMemo::VMemo( QWidget *parent, const char *_name )
}
- if( vmCfg.readNumEntry("hideIcon",0) == 1 || toggleKey > 0)
+
+ if( vmCfg.readNumEntry("hideIcon",0) == 1)
hide();
@@ -246,2 +248,3 @@ void VMemo::receive( const QCString &msg, const QByteArray &data )
{
+ qDebug("receive");
QDataStream stream( data, IO_ReadOnly );
@@ -277,3 +280,3 @@ bool VMemo::startRecording() {
if ( recording)
- return FALSE;;
+ return FALSE;
@@ -320,3 +323,4 @@ bool VMemo::startRecording() {
fileName=fileName.right(fileName.length()-s-2);
- qDebug("filename will be "+fileName);
+ qDebug("pathname will be "+fileName);
+
if( fileName.left(1).find('/') == -1)
@@ -336,3 +340,3 @@ bool VMemo::startRecording() {
if(openWAV(fileName.latin1()) == -1) {
- // QString err("Could not open the output file\n");
+ // QString err("Could not open the output file\n");
// err += fileName;
@@ -362,2 +366,4 @@ bool VMemo::startRecording() {
void VMemo::stopRecording() {
+show();
+ qDebug("Stopped recording");
recording = FALSE;
@@ -366,2 +372,6 @@ void VMemo::stopRecording() {
t_timer->stop();
+ Config cfg("Vmemo");
+ cfg.setGroup("Defaults");
+ if( cfg.readNumEntry("hideIcon",0) == 1 )
+ hide();
}
@@ -386,6 +396,6 @@ int VMemo::openDSP()
if(systemZaurus) {
- dsp = open("/dev/dsp1", O_RDWR); //Zaurus needs /dev/dsp1
+ dsp = open("/dev/dsp1", O_RDONLY); //Zaurus needs /dev/dsp1
channels=1; //zaurus has one input channel
} else {
- dsp = open("/dev/dsp", O_RDWR);
+ dsp = open("/dev/dsp", O_RDONLY);
}
@@ -567,3 +577,3 @@ void VMemo::record(void)
track.close();
- qDebug("Tracvk closed");
+ qDebug("Track closed");
@@ -577,2 +587,3 @@ void VMemo::record(void)
qDebug("done recording "+fileName);
+
QSound::play(Resource::findSound("vmemoe"));