-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 6 | ||||
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 0ec6fad..d4396d2 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -272,68 +272,68 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
272 | onScreenDisplayVolume = v; | 272 | onScreenDisplayVolume = v; |
273 | QPainter p( videoUI() ); | 273 | QPainter p( videoUI() ); |
274 | p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); | 274 | p.setPen( QColor( 0x10, 0xD0, 0x10 ) ); |
275 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); | 275 | p.setBrush( QColor( 0x10, 0xD0, 0x10 ) ); |
276 | 276 | ||
277 | QFont f; | 277 | QFont f; |
278 | f.setPixelSize( 20 ); | 278 | f.setPixelSize( 20 ); |
279 | f.setBold( TRUE ); | 279 | f.setBold( TRUE ); |
280 | p.setFont( f ); | 280 | p.setFont( f ); |
281 | p.drawText( (w - 200) / 2, h - yoff + 20, tr( "Volume" ) ); | 281 | p.drawText( (w - 200) / 2, h - yoff + 20, tr( "Volume" ) ); |
282 | 282 | ||
283 | for ( unsigned int i = 0; i < 10; i++ ) { | 283 | for ( unsigned int i = 0; i < 10; i++ ) { |
284 | if ( v > i ) { | 284 | if ( v > i ) { |
285 | p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); | 285 | p.drawRect( (w - 200) / 2 + i * 20 + 0, h - yoff + 40, 9, 30 ); |
286 | } else { | 286 | } else { |
287 | p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); | 287 | p.drawRect( (w - 200) / 2 + i * 20 + 3, h - yoff + 50, 3, 10 ); |
288 | } | 288 | } |
289 | } | 289 | } |
290 | } | 290 | } |
291 | } | 291 | } |
292 | 292 | ||
293 | 293 | ||
294 | void MediaPlayer::blank( bool b ) { | 294 | void MediaPlayer::blank( bool b ) { |
295 | fd=open("/dev/fb0",O_RDWR); | 295 | fd=open("/dev/fb0",O_RDWR); |
296 | #ifdef QT_QWS_EBX | 296 | #ifdef QT_QWS_SL5XXX |
297 | fl= open( "/dev/fl", O_RDWR ); | 297 | fl= open( "/dev/fl", O_RDWR ); |
298 | #endif | 298 | #endif |
299 | if (fd != -1) { | 299 | if (fd != -1) { |
300 | if ( b ) { | 300 | if ( b ) { |
301 | qDebug("do blanking"); | 301 | qDebug("do blanking"); |
302 | #ifdef QT_QWS_EBX | 302 | #ifdef QT_QWS_SL5XXX |
303 | ioctl( fd, FBIOBLANK, 1 ); | 303 | ioctl( fd, FBIOBLANK, 1 ); |
304 | if(fl !=-1) { | 304 | if(fl !=-1) { |
305 | ioctl( fl, 2 ); | 305 | ioctl( fl, 2 ); |
306 | ::close(fl); | 306 | ::close(fl); |
307 | } | 307 | } |
308 | #else | 308 | #else |
309 | ioctl( fd, FBIOBLANK, 3 ); | 309 | ioctl( fd, FBIOBLANK, 3 ); |
310 | #endif | 310 | #endif |
311 | isBlanked = TRUE; | 311 | isBlanked = TRUE; |
312 | } else { | 312 | } else { |
313 | qDebug("do unblanking"); | 313 | qDebug("do unblanking"); |
314 | ioctl( fd, FBIOBLANK, 0); | 314 | ioctl( fd, FBIOBLANK, 0); |
315 | #ifdef QT_QWS_EBX | 315 | #ifdef QT_QWS_SL5XXX |
316 | if(fl != -1) { | 316 | if(fl != -1) { |
317 | ioctl( fl, 1); | 317 | ioctl( fl, 1); |
318 | ::close(fl); | 318 | ::close(fl); |
319 | } | 319 | } |
320 | #endif | 320 | #endif |
321 | isBlanked = FALSE; | 321 | isBlanked = FALSE; |
322 | } | 322 | } |
323 | close( fd ); | 323 | close( fd ); |
324 | } else { | 324 | } else { |
325 | qDebug("<< /dev/fb0 could not be opened >>"); | 325 | qDebug("<< /dev/fb0 could not be opened >>"); |
326 | } | 326 | } |
327 | } | 327 | } |
328 | 328 | ||
329 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { | 329 | void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { |
330 | switch ( e->key() ) { | 330 | switch ( e->key() ) { |
331 | ////////////////////////////// Zaurus keys | 331 | ////////////////////////////// Zaurus keys |
332 | case Key_Home: | 332 | case Key_Home: |
333 | break; | 333 | break; |
334 | case Key_F9: //activity | 334 | case Key_F9: //activity |
335 | break; | 335 | break; |
336 | case Key_F10: //contacts | 336 | case Key_F10: //contacts |
337 | break; | 337 | break; |
338 | case Key_F11: //menu | 338 | case Key_F11: //menu |
339 | break; | 339 | break; |
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index dd341c0..afcdd49 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -48,49 +48,49 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | |||
48 | keyReset=FALSE; | 48 | keyReset=FALSE; |
49 | noWarning=false; | 49 | noWarning=false; |
50 | Config config( "qpe"); | 50 | Config config( "qpe"); |
51 | config.setGroup( "Volume" ); | 51 | config.setGroup( "Volume" ); |
52 | Config cfg("Vmemo"); | 52 | Config cfg("Vmemo"); |
53 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 53 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
54 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); | 54 | AlertCheckBox->setChecked(cfg.readBoolEntry("Alert")); |
55 | 55 | ||
56 | cfg.setGroup("Record"); | 56 | cfg.setGroup("Record"); |
57 | int rate=config.readNumEntry("SampleRate", 22050); | 57 | int rate=config.readNumEntry("SampleRate", 22050); |
58 | if(rate == 8000) | 58 | if(rate == 8000) |
59 | sampleRate->setCurrentItem(0); | 59 | sampleRate->setCurrentItem(0); |
60 | else if(rate == 11025) | 60 | else if(rate == 11025) |
61 | sampleRate->setCurrentItem(1); | 61 | sampleRate->setCurrentItem(1); |
62 | else if(rate == 22050) | 62 | else if(rate == 22050) |
63 | sampleRate->setCurrentItem(2); | 63 | sampleRate->setCurrentItem(2); |
64 | else if(rate == 33075) | 64 | else if(rate == 33075) |
65 | sampleRate->setCurrentItem(3); | 65 | sampleRate->setCurrentItem(3); |
66 | else if(rate==44100) | 66 | else if(rate==44100) |
67 | sampleRate->setCurrentItem(4); | 67 | sampleRate->setCurrentItem(4); |
68 | 68 | ||
69 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); | 69 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); |
70 | //TODO hide if zaurus- mono only | 70 | //TODO hide if zaurus- mono only |
71 | 71 | ||
72 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) | 72 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) |
73 | //since ipaq and zaurus have particular | 73 | //since ipaq and zaurus have particular |
74 | //devices | 74 | //devices |
75 | bool systemZaurus=FALSE; | 75 | bool systemZaurus=FALSE; |
76 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 76 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
77 | if (uname(&name) != -1) {// TODO change this here,... | 77 | if (uname(&name) != -1) {// TODO change this here,... |
78 | QString release=name.release; | 78 | QString release=name.release; |
79 | if( release.find("embedix",0,TRUE) != -1) { | 79 | if( release.find("embedix",0,TRUE) != -1) { |
80 | qDebug("IS System Zaurus"); | 80 | qDebug("IS System Zaurus"); |
81 | systemZaurus=TRUE; | 81 | systemZaurus=TRUE; |
82 | } | 82 | } |
83 | } | 83 | } |
84 | if(!systemZaurus) { | 84 | if(!systemZaurus) { |
85 | stereoCheckBox->setChecked(TRUE); | 85 | stereoCheckBox->setChecked(TRUE); |
86 | } | 86 | } |
87 | stereoCheckBox->setEnabled(FALSE); | 87 | stereoCheckBox->setEnabled(FALSE); |
88 | sixteenBitCheckBox->setEnabled(FALSE); | 88 | sixteenBitCheckBox->setEnabled(FALSE); |
89 | #else | 89 | #else |
90 | #endif | 90 | #endif |
91 | int sRate=cfg.readNumEntry("SizeLimit", 30); | 91 | int sRate=cfg.readNumEntry("SizeLimit", 30); |
92 | qDebug("%d",sRate); | 92 | qDebug("%d",sRate); |
93 | 93 | ||
94 | if(sRate ==30) | 94 | if(sRate ==30) |
95 | timeLimitComboBox->setCurrentItem(0); | 95 | timeLimitComboBox->setCurrentItem(0); |
96 | else if(sRate==20) | 96 | else if(sRate==20) |
diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp index f275fbe..79a7f9e 100644 --- a/noncore/tools/formatter/formatter.cpp +++ b/noncore/tools/formatter/formatter.cpp | |||
@@ -162,49 +162,49 @@ FormatterApp::FormatterApp( QWidget* parent, const char* name, bool modal, WFla | |||
162 | 162 | ||
163 | connect( fileSystemsCombo,SIGNAL(activated(int)),this,SLOT( fsComboSelected(int ) )); | 163 | connect( fileSystemsCombo,SIGNAL(activated(int)),this,SLOT( fsComboSelected(int ) )); |
164 | connect( storageComboBox,SIGNAL(activated(int)),this,SLOT( storageComboSelected(int ) )); | 164 | connect( storageComboBox,SIGNAL(activated(int)),this,SLOT( storageComboSelected(int ) )); |
165 | connect( deviceComboBox,SIGNAL(activated(int)),this,SLOT( deviceComboSelected(int ) )); | 165 | connect( deviceComboBox,SIGNAL(activated(int)),this,SLOT( deviceComboSelected(int ) )); |
166 | 166 | ||
167 | 167 | ||
168 | fillCombos(); | 168 | fillCombos(); |
169 | } | 169 | } |
170 | 170 | ||
171 | FormatterApp::~FormatterApp() { | 171 | FormatterApp::~FormatterApp() { |
172 | 172 | ||
173 | } | 173 | } |
174 | 174 | ||
175 | void FormatterApp::doFormat() { | 175 | void FormatterApp::doFormat() { |
176 | int err=0; | 176 | int err=0; |
177 | Output *outDlg; | 177 | Output *outDlg; |
178 | QString umountS, remountS; | 178 | QString umountS, remountS; |
179 | QString text = storageComboBox->currentText(); | 179 | QString text = storageComboBox->currentText(); |
180 | QString currentText = storageComboBox->currentText(); | 180 | QString currentText = storageComboBox->currentText(); |
181 | QString cmd; | 181 | QString cmd; |
182 | QString diskDevice = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4); | 182 | QString diskDevice = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4); |
183 | QString diskName = currentText.left(currentText.find(" -> ",0,TRUE)); | 183 | QString diskName = currentText.left(currentText.find(" -> ",0,TRUE)); |
184 | QString fs = fileSystemsCombo->currentText(); | 184 | QString fs = fileSystemsCombo->currentText(); |
185 | 185 | ||
186 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) // lets test on something cheap | 186 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // lets test on something cheap |
187 | #else | 187 | #else |
188 | currentText = diskDevice = "/dev/fd0"; | 188 | currentText = diskDevice = "/dev/fd0"; |
189 | umountS = "umount -v /floppy 2>&1"; | 189 | umountS = "umount -v /floppy 2>&1"; |
190 | remountS = "mount -v /floppy 2>&1"; | 190 | remountS = "mount -v /floppy 2>&1"; |
191 | #endif | 191 | #endif |
192 | 192 | ||
193 | if( currentText.find("CF",0,TRUE) != -1) { | 193 | if( currentText.find("CF",0,TRUE) != -1) { |
194 | umountS = "umount "; | 194 | umountS = "umount "; |
195 | remountS = "mount "; | 195 | remountS = "mount "; |
196 | 196 | ||
197 | // umountS = "/sbin/cardctl eject"; | 197 | // umountS = "/sbin/cardctl eject"; |
198 | // remountS = "/sbin/cardctl insert"; | 198 | // remountS = "/sbin/cardctl insert"; |
199 | } | 199 | } |
200 | if( currentText.find("SD",0,TRUE) != -1) { | 200 | if( currentText.find("SD",0,TRUE) != -1) { |
201 | umountS = "umount "; | 201 | umountS = "umount "; |
202 | remountS = "mount "; | 202 | remountS = "mount "; |
203 | // umountS = "/etc/sdcontrol compeject"; | 203 | // umountS = "/etc/sdcontrol compeject"; |
204 | // remountS = "/etc/sdcontrol insert"; | 204 | // remountS = "/etc/sdcontrol insert"; |
205 | } | 205 | } |
206 | 206 | ||
207 | switch ( QMessageBox::warning(this,tr("Format?!?"),tr("Really format\n") +diskName+" "+ currentText + | 207 | switch ( QMessageBox::warning(this,tr("Format?!?"),tr("Really format\n") +diskName+" "+ currentText + |
208 | tr("\nwith ") + fs + tr(" filesystem?!?\nYou will loose all data!!"),tr("Yes"),tr("No"),0,1,1) ) { | 208 | tr("\nwith ") + fs + tr(" filesystem?!?\nYou will loose all data!!"),tr("Yes"),tr("No"),0,1,1) ) { |
209 | case 0: { | 209 | case 0: { |
210 | if(fs == "vfat") | 210 | if(fs == "vfat") |
@@ -452,49 +452,49 @@ void FormatterApp::parsetab(const QString &fileName) { | |||
452 | // } | 452 | // } |
453 | // } | 453 | // } |
454 | // f.close(); | 454 | // f.close(); |
455 | // } | 455 | // } |
456 | } | 456 | } |
457 | 457 | ||
458 | QString FormatterApp::getFileSystemType(const QString ¤tText) { | 458 | QString FormatterApp::getFileSystemType(const QString ¤tText) { |
459 | 459 | ||
460 | parsetab("/etc/mtab"); //why did TT forget filesystem type? | 460 | parsetab("/etc/mtab"); //why did TT forget filesystem type? |
461 | 461 | ||
462 | for ( QStringList::Iterator it = fileSystemTypeList.begin(); it != fileSystemTypeList.end(); ++it ) { | 462 | for ( QStringList::Iterator it = fileSystemTypeList.begin(); it != fileSystemTypeList.end(); ++it ) { |
463 | QString temp = (*it); | 463 | QString temp = (*it); |
464 | if( temp.find( currentText,0,TRUE) != -1) { | 464 | if( temp.find( currentText,0,TRUE) != -1) { |
465 | return temp.right( temp.length() - temp.find("::",0,TRUE) - 2); | 465 | return temp.right( temp.length() - temp.find("::",0,TRUE) - 2); |
466 | // qDebug(fsType); | 466 | // qDebug(fsType); |
467 | } | 467 | } |
468 | } | 468 | } |
469 | return ""; | 469 | return ""; |
470 | } | 470 | } |
471 | 471 | ||
472 | bool FormatterApp::doFsck() { | 472 | bool FormatterApp::doFsck() { |
473 | 473 | ||
474 | Output *outDlg; | 474 | Output *outDlg; |
475 | QString selectedDevice; | 475 | QString selectedDevice; |
476 | // #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) | 476 | // #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) |
477 | selectedDevice = deviceComboBox->currentText(); | 477 | selectedDevice = deviceComboBox->currentText(); |
478 | QString mountPoint = mountPointLineEdit->text(); | 478 | QString mountPoint = mountPointLineEdit->text(); |
479 | QString umountS = "umount -v "+mountPoint+" 2>&1"; | 479 | QString umountS = "umount -v "+mountPoint+" 2>&1"; |
480 | QString remountS = "mount -v "+mountPoint+" 2>&1"; | 480 | QString remountS = "mount -v "+mountPoint+" 2>&1"; |
481 | // #else | 481 | // #else |
482 | // // for testing | 482 | // // for testing |
483 | // // currentText = diskDevice = "/dev/fd0"; | 483 | // // currentText = diskDevice = "/dev/fd0"; |
484 | // QString umountS = "umount -v /floppy 2>&1"; | 484 | // QString umountS = "umount -v /floppy 2>&1"; |
485 | // QString remountS = "mount -v /floppy 2>&1"; | 485 | // QString remountS = "mount -v /floppy 2>&1"; |
486 | // selectedDevice ="/dev/fd0"; | 486 | // selectedDevice ="/dev/fd0"; |
487 | 487 | ||
488 | // #endif | 488 | // #endif |
489 | 489 | ||
490 | QString fsType = getFileSystemType((const QString &)selectedDevice); | 490 | QString fsType = getFileSystemType((const QString &)selectedDevice); |
491 | QString cmd; | 491 | QString cmd; |
492 | qDebug( selectedDevice +" "+ fsType); | 492 | qDebug( selectedDevice +" "+ fsType); |
493 | if(fsType == "vfat") cmd = "dosfsck -vy "; | 493 | if(fsType == "vfat") cmd = "dosfsck -vy "; |
494 | if(fsType == "ext2") cmd = "e2fsck -cpvy "; | 494 | if(fsType == "ext2") cmd = "e2fsck -cpvy "; |
495 | cmd += selectedDevice + " 2>&1"; | 495 | cmd += selectedDevice + " 2>&1"; |
496 | 496 | ||
497 | outDlg = new Output(this, tr("Formatter Output"),FALSE); | 497 | outDlg = new Output(this, tr("Formatter Output"),FALSE); |
498 | outDlg->showMaximized(); | 498 | outDlg->showMaximized(); |
499 | outDlg->show(); | 499 | outDlg->show(); |
500 | qApp->processEvents(); | 500 | qApp->processEvents(); |