summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 4258d60..013f804 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -360,46 +360,24 @@ struct s_button {
360 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Lower+Upper"), 360 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Lower+Upper"),
361 "devicebuttons/simpad_lower_upper", 361 "devicebuttons/simpad_lower_upper",
362 "QPE/Launcher", "home()", 362 "QPE/Launcher", "home()",
363 "buttonsettings", "raise()" }, 363 "buttonsettings", "raise()" },
364 { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, 364 { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus,
365 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Lower+Upper"), 365 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Lower+Upper"),
366 "devicebuttons/simpad_upper_lower", 366 "devicebuttons/simpad_upper_lower",
367 "QPE/Launcher", "home()", 367 "QPE/Launcher", "home()",
368 "buttonsettings", "raise()" }, 368 "buttonsettings", "raise()" },
369 */ 369 */
370}; 370};
371 371
372struct r_button {
373 uint model;
374 Qt::Key code;
375 char *utext;
376 char *pix;
377 char *fpressedservice;
378 char *fpressedaction;
379 char *fheldservice;
380 char *fheldaction;
381} ramses_buttons [] = {
382 { Model_Ramses_MNCI,
383 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"),
384 "devicebuttons/z_menu",
385 "QPE/TaskBar", "toggleMenu()",
386 "QPE/TaskBar", "toggleStartMenu()" },
387 { Model_Ramses_MNCI,
388 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"),
389 "devicebuttons/ipaq_home",
390 "QPE/Launcher", "home()",
391 "buttonsettings", "raise()" },
392};
393
394class Yopy : public ODevice { 372class Yopy : public ODevice {
395protected: 373protected:
396 virtual void init ( ); 374 virtual void init ( );
397 virtual void initButtons ( ); 375 virtual void initButtons ( );
398 376
399public: 377public:
400 virtual bool suspend ( ); 378 virtual bool suspend ( );
401 379
402 virtual bool setDisplayBrightness ( int b ); 380 virtual bool setDisplayBrightness ( int b );
403 virtual int displayBrightnessResolution ( ) const; 381 virtual int displayBrightnessResolution ( ) const;
404 382
405 static bool isYopy ( ); 383 static bool isYopy ( );
@@ -443,30 +421,30 @@ static inline bool isQWS()
443 421
444ODevice *ODevice::inst ( ) 422ODevice *ODevice::inst ( )
445{ 423{
446 static ODevice *dev = 0; 424 static ODevice *dev = 0;
447 425
448 if ( !dev ) { 426 if ( !dev ) {
449 if ( QFile::exists ( "/proc/hal/model" )) 427 if ( QFile::exists ( "/proc/hal/model" ))
450 dev = new iPAQ ( ); 428 dev = new iPAQ ( );
451 else if ( Zaurus::isZaurus() ) 429 else if ( Zaurus::isZaurus() )
452 dev = new Zaurus ( ); 430 dev = new Zaurus ( );
453 else if ( QFile::exists ( "/proc/ucb1x00" ) && QFile::exists ( "/proc/cs3" )) 431 else if ( QFile::exists ( "/proc/ucb1x00" ) && QFile::exists ( "/proc/cs3" ))
454 dev = new SIMpad ( ); 432 dev = new SIMpad ( );
455 else if ( QFile::exists ( "/proc/sys/board/name" ))
456 dev = new Ramses ( );
457 else if ( Yopy::isYopy() ) 433 else if ( Yopy::isYopy() )
458 dev = new Yopy ( ); 434 dev = new Yopy ( );
459 else if ( Jornada::isJornada() ) 435 else if ( Jornada::isJornada() )
460 dev = new Jornada ( ); 436 dev = new Jornada ( );
437 else if ( QFile::exists ( "/proc/sys/board/sys_name" ))
438 dev = new Ramses ( );
461 else 439 else
462 dev = new ODevice ( ); 440 dev = new ODevice ( );
463 dev-> init ( ); 441 dev-> init ( );
464 } 442 }
465 return dev; 443 return dev;
466} 444}
467 445
468 446
469/************************************************** 447/**************************************************
470 * 448 *
471 * common 449 * common
472 * 450 *
@@ -2519,25 +2497,25 @@ int SIMpad::displayBrightnessResolution ( ) const
2519 **************************************************/ 2497 **************************************************/
2520 2498
2521void Ramses::init() 2499void Ramses::init()
2522{ 2500{
2523 d->m_vendorstr = "M und N"; 2501 d->m_vendorstr = "M und N";
2524 d->m_vendor = Vendor_MundN; 2502 d->m_vendor = Vendor_MundN;
2525 2503
2526 QFile f("/proc/sys/board/ramses"); 2504 QFile f("/proc/sys/board/ramses");
2527 2505
2528 d->m_modelstr = "Ramses"; 2506 d->m_modelstr = "Ramses";
2529 d->m_model = Model_Ramses_MNCI; 2507 d->m_model = Model_Ramses_MNCI;
2530 2508
2531 d->m_rotation = Rot0; 2509 d->m_rotation = Rot90;
2532 d->m_holdtime = 1000; 2510 d->m_holdtime = 1000;
2533 2511
2534 f.setName("/etc/oz_version"); 2512 f.setName("/etc/oz_version");
2535 2513
2536 if (f.open(IO_ReadOnly)) { 2514 if (f.open(IO_ReadOnly)) {
2537 d->m_systemstr = "OpenEmbedded/Ramses"; 2515 d->m_systemstr = "OpenEmbedded/Ramses";
2538 d->m_system = System_OpenZaurus; 2516 d->m_system = System_OpenZaurus;
2539 2517
2540 QTextStream ts(&f); 2518 QTextStream ts(&f);
2541 ts.setDevice(&f); 2519 ts.setDevice(&f);
2542 d->m_sysverstr = ts.readLine(); 2520 d->m_sysverstr = ts.readLine();
2543 f.close(); 2521 f.close();