summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index e327098..7021fae 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -199,65 +199,65 @@ VMemo::VMemo( QWidget *parent, const char *_name )
199{ 199{
200 setFixedHeight( 18 ); 200 setFixedHeight( 18 );
201 setFixedWidth( 14 ); 201 setFixedWidth( 14 );
202 202
203 recording = FALSE; 203 recording = FALSE;
204 204
205 struct utsname name; /* check for embedix kernel running on the zaurus*/ 205 struct utsname name; /* check for embedix kernel running on the zaurus*/
206 if (uname(&name) != -1) { 206 if (uname(&name) != -1) {
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 = setToggleButton(vmCfg.readNumEntry("toggleKey", -1)); 210 int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1));
211 211
212 qDebug("toggleKey %d", toggleKey); 212 qDebug("toggleKey %d", toggleKey);
213 213
214 if(release.find("embedix",0,TRUE) !=-1) 214 if(release.find("embedix",0,TRUE) !=-1)
215 systemZaurus=TRUE; 215 systemZaurus=TRUE;
216 else 216 else
217 systemZaurus=FALSE; 217 systemZaurus=FALSE;
218 218
219 myChannel = new QCopChannel( "QPE/VMemo", this ); 219 myChannel = new QCopChannel( "QPE/VMemo", this );
220 connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), 220 connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)),
221 this, SLOT(receive(const QCString&, const QByteArray&)) ); 221 this, SLOT(receive(const QCString&, const QByteArray&)) );
222 222
223 if( toggleKey != -1 ) { 223 if( toggleKey != -1 ) {
224 QCopEnvelope e("QPE/Desktop", "keyRegister(int key, QString channel, QString message)"); 224 QCopEnvelope e("QPE/Desktop", "keyRegister(int key, QString channel, QString message)");
225// e << 4096; // Key_Escape 225// e << 4096; // Key_Escape
226// e << Key_F5; //4148 226// e << Key_F5; //4148
227 e << toggleKey; 227 e << toggleKey;
228 e << QString("QPE/VMemo"); 228 e << QString("QPE/VMemo");
229 e << QString("toggleRecord()"); 229 e << QString("toggleRecord()");
230 } 230 }
231 if( vmCfg.readNumEntry("hideIcon",0) == 1) 231 if( vmCfg.readNumEntry("hideIcon",0) == 1 || toggleKey > 0)
232 hide(); 232 hide();
233 } 233 }
234} 234}
235 235
236VMemo::~VMemo() 236VMemo::~VMemo()
237{ 237{
238} 238}
239 239
240void VMemo::receive( const QCString &msg, const QByteArray &data ) 240void VMemo::receive( const QCString &msg, const QByteArray &data )
241{ 241{
242 QDataStream stream( data, IO_ReadOnly ); 242 QDataStream stream( data, IO_ReadOnly );
243 if (msg == "toggleRecord()") { 243 if (msg == "toggleRecord()") {
244 if (recording) { 244 if (recording) {
245 fromToggle = TRUE; 245 fromToggle = TRUE;
246 stopRecording(); 246 stopRecording();
247 } else { 247 } else {
248 fromToggle = TRUE; 248 fromToggle = TRUE;
249 startRecording(); 249 startRecording();
250 } 250 }
251 } 251 }
252} 252}
253 253
254void VMemo::paintEvent( QPaintEvent* ) 254void VMemo::paintEvent( QPaintEvent* )
255{ 255{
256 QPainter p(this); 256 QPainter p(this);
257 p.drawPixmap( 0, 1,( const char** ) vmemo_xpm ); 257 p.drawPixmap( 0, 1,( const char** ) vmemo_xpm );
258} 258}
259 259
260void VMemo::mousePressEvent( QMouseEvent * ) 260void VMemo::mousePressEvent( QMouseEvent * )
261{ 261{
262 startRecording(); 262 startRecording();
263} 263}