author | chicken <chicken> | 2003-10-24 14:01:23 (UTC) |
---|---|---|
committer | chicken <chicken> | 2003-10-24 14:01:23 (UTC) |
commit | 96a577bb03db6ccbf1a10b03116d3b868233df0e (patch) (side-by-side diff) | |
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 ( ) QString line; while( line = ts. readLine ( ) ) { if ( line. left ( 8 ) == "Hardware" ) { int loc = line. find ( ":" ); if ( loc != -1 ) { QString model = line. mid ( loc + 2 ). simplifyWhiteSpace( ); return ( model == "HP Jornada 56x" ); } } } } return false; } void Jornada::init ( ) { d-> m_vendorstr = "HP"; d-> m_vendor = Vendor_HP; d-> m_modelstr = "Jornada 56x"; d-> m_model = Model_Jornada_56x; d-> m_systemstr = "Familiar"; d-> m_system = System_Familiar; d-> m_rotation = Rot0; + + QFile f ( "/etc/familiar-version" ); + f. setName ( "/etc/familiar-version" ); + if ( f. open ( IO_ReadOnly )) { + + QTextStream ts ( &f ); + d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); + + f. close ( ); + } } + void Jornada::initButtons ( ) { if ( d-> m_buttons ) return; // Simulation uses iPAQ 3660 device buttons qDebug ( "init Buttons" ); d-> m_buttons = new QValueList <ODeviceButton>; for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { i_button *ib = ipaq_buttons + i; ODeviceButton b; if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { b. setKeycode ( ib-> code ); b. setUserText ( QObject::tr ( "Button", ib-> utext )); b. setPixmap ( Resource::loadPixmap ( ib-> pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); d-> m_buttons-> append ( b ); } } reloadButtonMapping ( ); |