author | chicken <chicken> | 2003-10-24 14:01:23 (UTC) |
---|---|---|
committer | chicken <chicken> | 2003-10-24 14:01:23 (UTC) |
commit | 96a577bb03db6ccbf1a10b03116d3b868233df0e (patch) (unidiff) | |
tree | da9ed9231f12c2538a4e8e24bd5e325bc22b90fe | |
parent | a9eddd4cd428dd844d8693e98e4df8e365e75da8 (diff) | |
download | opie-96a577bb03db6ccbf1a10b03116d3b868233df0e.zip opie-96a577bb03db6ccbf1a10b03116d3b868233df0e.tar.gz opie-96a577bb03db6ccbf1a10b03116d3b868233df0e.tar.bz2 |
even more Jornada 56X updates
-rw-r--r-- | libopie/odevice.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 8624016..13b4330 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -2483,50 +2483,61 @@ bool Jornada::isJornada ( ) | |||
2483 | QString line; | 2483 | QString line; |
2484 | while( line = ts. readLine ( ) ) { | 2484 | while( line = ts. readLine ( ) ) { |
2485 | if ( line. left ( 8 ) == "Hardware" ) { | 2485 | if ( line. left ( 8 ) == "Hardware" ) { |
2486 | int loc = line. find ( ":" ); | 2486 | int loc = line. find ( ":" ); |
2487 | if ( loc != -1 ) { | 2487 | if ( loc != -1 ) { |
2488 | QString model = | 2488 | QString model = |
2489 | line. mid ( loc + 2 ). simplifyWhiteSpace( ); | 2489 | line. mid ( loc + 2 ). simplifyWhiteSpace( ); |
2490 | return ( model == "HP Jornada 56x" ); | 2490 | return ( model == "HP Jornada 56x" ); |
2491 | } | 2491 | } |
2492 | } | 2492 | } |
2493 | } | 2493 | } |
2494 | } | 2494 | } |
2495 | return false; | 2495 | return false; |
2496 | } | 2496 | } |
2497 | 2497 | ||
2498 | void Jornada::init ( ) | 2498 | void Jornada::init ( ) |
2499 | { | 2499 | { |
2500 | d-> m_vendorstr = "HP"; | 2500 | d-> m_vendorstr = "HP"; |
2501 | d-> m_vendor = Vendor_HP; | 2501 | d-> m_vendor = Vendor_HP; |
2502 | d-> m_modelstr = "Jornada 56x"; | 2502 | d-> m_modelstr = "Jornada 56x"; |
2503 | d-> m_model = Model_Jornada_56x; | 2503 | d-> m_model = Model_Jornada_56x; |
2504 | d-> m_systemstr = "Familiar"; | 2504 | d-> m_systemstr = "Familiar"; |
2505 | d-> m_system = System_Familiar; | 2505 | d-> m_system = System_Familiar; |
2506 | d-> m_rotation = Rot0; | 2506 | d-> m_rotation = Rot0; |
2507 | |||
2508 | QFile f ( "/etc/familiar-version" ); | ||
2509 | f. setName ( "/etc/familiar-version" ); | ||
2510 | if ( f. open ( IO_ReadOnly )) { | ||
2511 | |||
2512 | QTextStream ts ( &f ); | ||
2513 | d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); | ||
2514 | |||
2515 | f. close ( ); | ||
2516 | } | ||
2507 | } | 2517 | } |
2508 | 2518 | ||
2519 | |||
2509 | void Jornada::initButtons ( ) | 2520 | void Jornada::initButtons ( ) |
2510 | { | 2521 | { |
2511 | if ( d-> m_buttons ) | 2522 | if ( d-> m_buttons ) |
2512 | return; | 2523 | return; |
2513 | 2524 | ||
2514 | // Simulation uses iPAQ 3660 device buttons | 2525 | // Simulation uses iPAQ 3660 device buttons |
2515 | 2526 | ||
2516 | qDebug ( "init Buttons" ); | 2527 | qDebug ( "init Buttons" ); |
2517 | d-> m_buttons = new QValueList <ODeviceButton>; | 2528 | d-> m_buttons = new QValueList <ODeviceButton>; |
2518 | 2529 | ||
2519 | for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { | 2530 | for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { |
2520 | i_button *ib = ipaq_buttons + i; | 2531 | i_button *ib = ipaq_buttons + i; |
2521 | ODeviceButton b; | 2532 | ODeviceButton b; |
2522 | 2533 | ||
2523 | if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { | 2534 | if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { |
2524 | b. setKeycode ( ib-> code ); | 2535 | b. setKeycode ( ib-> code ); |
2525 | b. setUserText ( QObject::tr ( "Button", ib-> utext )); | 2536 | b. setUserText ( QObject::tr ( "Button", ib-> utext )); |
2526 | b. setPixmap ( Resource::loadPixmap ( ib-> pix )); | 2537 | b. setPixmap ( Resource::loadPixmap ( ib-> pix )); |
2527 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); | 2538 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); |
2528 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); | 2539 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); |
2529 | d-> m_buttons-> append ( b ); | 2540 | d-> m_buttons-> append ( b ); |
2530 | } | 2541 | } |
2531 | } | 2542 | } |
2532 | reloadButtonMapping ( ); | 2543 | reloadButtonMapping ( ); |