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) (show whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp23
1 files changed, 17 insertions, 6 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
@@ -210,4 +210,5 @@ VMemo::VMemo( QWidget *parent, const char *_name )
if (uname(&name) != -1) {
QString release=name.release;
+
Config vmCfg("Vmemo");
vmCfg.setGroup("Defaults");
@@ -234,5 +235,6 @@ VMemo::VMemo( QWidget *parent, const char *_name )
e << QString("toggleRecord()");
}
- if( vmCfg.readNumEntry("hideIcon",0) == 1 || toggleKey > 0)
+
+ if( vmCfg.readNumEntry("hideIcon",0) == 1)
hide();
}
@@ -245,4 +247,5 @@ VMemo::~VMemo()
void VMemo::receive( const QCString &msg, const QByteArray &data )
{
+ qDebug("receive");
QDataStream stream( data, IO_ReadOnly );
if (msg == "toggleRecord()") {
@@ -276,5 +279,5 @@ bool VMemo::startRecording() {
if ( recording)
- return FALSE;;
+ return FALSE;
Config config( "Vmemo" );
@@ -319,5 +322,6 @@ bool VMemo::startRecording() {
if(s)
fileName=fileName.right(fileName.length()-s-2);
- qDebug("filename will be "+fileName);
+ qDebug("pathname will be "+fileName);
+
if( fileName.left(1).find('/') == -1)
fileName="/"+fileName;
@@ -361,8 +365,14 @@ bool VMemo::startRecording() {
void VMemo::stopRecording() {
+show();
+ qDebug("Stopped recording");
recording = FALSE;
if(useAlerts)
if( msgLabel) delete msgLabel;
t_timer->stop();
+ Config cfg("Vmemo");
+ cfg.setGroup("Defaults");
+ if( cfg.readNumEntry("hideIcon",0) == 1 )
+ hide();
}
@@ -385,8 +395,8 @@ 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);
}
@@ -566,5 +576,5 @@ void VMemo::record(void)
track.close();
- qDebug("Tracvk closed");
+ qDebug("Track closed");
if( ioctl( dsp, SNDCTL_DSP_RESET,0) == -1)
@@ -576,4 +586,5 @@ void VMemo::record(void)
// QMessageBox::message("Vmemo"," Done1 recording\n"+ fileName);
qDebug("done recording "+fileName);
+
QSound::play(Resource::findSound("vmemoe"));