summaryrefslogtreecommitdiff
authorsandman <sandman>2002-12-26 00:57:15 (UTC)
committer sandman <sandman>2002-12-26 00:57:15 (UTC)
commit918e4d4dffddc6d1a31b9b92535cd81a4f3d52e2 (patch) (unidiff)
tree80988c5dd55074af1d397e6b9d9b235d56e4e293
parent0d54f8140e8c39bde48bc09e34e76dcc5c47fa92 (diff)
downloadopie-918e4d4dffddc6d1a31b9b92535cd81a4f3d52e2.zip
opie-918e4d4dffddc6d1a31b9b92535cd81a4f3d52e2.tar.gz
opie-918e4d4dffddc6d1a31b9b92535cd81a4f3d52e2.tar.bz2
signature of keyRegister() QCop call changed because of the device button
rewrite
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index d6128a6..6867e82 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -206,65 +206,66 @@ static char * vmemo_xpm[] = {
206 " n n n n n n n n n "}; 206 " n n n n n n n n n "};
207 207
208 208
209VMemo::VMemo( QWidget *parent, const char *_name ) 209VMemo::VMemo( QWidget *parent, const char *_name )
210 : QWidget( parent, _name ) { 210 : QWidget( parent, _name ) {
211 setFixedHeight( 18 ); 211 setFixedHeight( 18 );
212 setFixedWidth( 14 ); 212 setFixedWidth( 14 );
213 213
214 t_timer = new QTimer( this ); 214 t_timer = new QTimer( this );
215 connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) ); 215 connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) );
216 216
217 struct utsname name; /* check for embedix kernel running on the zaurus*/ 217 struct utsname name; /* check for embedix kernel running on the zaurus*/
218 if (uname(&name) != -1) { 218 if (uname(&name) != -1) {
219 QString release=name.release; 219 QString release=name.release;
220 220
221 Config vmCfg("Vmemo"); 221 Config vmCfg("Vmemo");
222 vmCfg.setGroup("Defaults"); 222 vmCfg.setGroup("Defaults");
223 int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1)); 223 int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1));
224 useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0); 224 useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0);
225 225
226 qDebug("toggleKey %d", toggleKey); 226 qDebug("toggleKey %d", toggleKey);
227 227
228 if(release.find("embedix",0,TRUE) !=-1) 228 if(release.find("embedix",0,TRUE) !=-1)
229 systemZaurus=TRUE; 229 systemZaurus=TRUE;
230 else 230 else
231 systemZaurus=FALSE; 231 systemZaurus=FALSE;
232 232
233 myChannel = new QCopChannel( "QPE/VMemo", this ); 233 myChannel = new QCopChannel( "QPE/VMemo", this );
234 connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), 234 connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)),
235 this, SLOT(receive(const QCString&, const QByteArray&)) ); 235 this, SLOT(receive(const QCString&, const QByteArray&)) );
236 236
237 if( toggleKey != -1 ) { 237 if( toggleKey != -1 ) {
238 QCopEnvelope e("QPE/Desktop", "keyRegister(int key, QString channel, QString message)"); 238 // keyRegister(key, channel, message)
239 QCopEnvelope e("QPE/Launcher", "keyRegister(int,QCString,QCString)");
239 // e << 4096; // Key_Escape 240 // e << 4096; // Key_Escape
240 // e << Key_F5; //4148 241 // e << Key_F5; //4148
241 e << toggleKey; 242 e << toggleKey;
242 e << QString("QPE/VMemo"); 243 e << QString("QPE/VMemo");
243 e << QString("toggleRecord()"); 244 e << QString("toggleRecord()");
244 } 245 }
245 if(toggleKey == 1) 246 if(toggleKey == 1)
246 usingIcon=TRUE; 247 usingIcon=TRUE;
247 else 248 else
248 usingIcon=FALSE; 249 usingIcon=FALSE;
249 if( vmCfg.readNumEntry("hideIcon",0) == 1) 250 if( vmCfg.readNumEntry("hideIcon",0) == 1)
250 hide(); 251 hide();
251 recording = FALSE; 252 recording = FALSE;
252 } 253 }
253} 254}
254 255
255VMemo::~VMemo() { 256VMemo::~VMemo() {
256} 257}
257 258
258void VMemo::receive( const QCString &msg, const QByteArray &data ) { 259void VMemo::receive( const QCString &msg, const QByteArray &data ) {
259 qDebug("receive"); 260 qDebug("receive");
260 QDataStream stream( data, IO_ReadOnly ); 261 QDataStream stream( data, IO_ReadOnly );
261 262
262 if (msg == "toggleRecord()") { 263 if (msg == "toggleRecord()") {
263 if (recording) { 264 if (recording) {
264 fromToggle = TRUE; 265 fromToggle = TRUE;
265 stopRecording(); 266 stopRecording();
266 } else { 267 } else {
267 fromToggle = TRUE; 268 fromToggle = TRUE;
268 startRecording(); 269 startRecording();
269 } 270 }
270 } 271 }