summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 377945d..55ba7bd 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -986,69 +986,71 @@ void Zaurus::init ( )
986 f. close ( ); 986 f. close ( );
987 } 987 }
988 } 988 }
989 else { 989 else {
990 d-> m_systemstr = "Zaurus"; 990 d-> m_systemstr = "Zaurus";
991 d-> m_system = System_Zaurus; 991 d-> m_system = System_Zaurus;
992 } 992 }
993 993
994 f. setName ( "/proc/deviceinfo/product" ); 994 f. setName ( "/proc/deviceinfo/product" );
995 if ( f. open ( IO_ReadOnly ) ) { 995 if ( f. open ( IO_ReadOnly ) ) {
996 QTextStream ts ( &f ); 996 QTextStream ts ( &f );
997 QString model = ts. readLine ( ); 997 QString model = ts. readLine ( );
998 f. close ( ); 998 f. close ( );
999 999
1000 d-> m_modelstr = QString("Zaurus ") + model; 1000 d-> m_modelstr = QString("Zaurus ") + model;
1001 if ( model == "SL-5500" ) 1001 if ( model == "SL-5500" )
1002 d-> m_model = Model_Zaurus_SL5500; 1002 d-> m_model = Model_Zaurus_SL5500;
1003 else if ( model == "SL-C700" ) 1003 else if ( model == "SL-C700" )
1004 d-> m_model = Model_Zaurus_SLC700; 1004 d-> m_model = Model_Zaurus_SLC700;
1005 else if ( model == "SL-A300" ) 1005 else if ( model == "SL-A300" )
1006 d-> m_model = Model_Zaurus_SLA300; 1006 d-> m_model = Model_Zaurus_SLA300;
1007 else if ( model == "SL-B600" || model == "SL-5600" ) 1007 else if ( model == "SL-B600" || model == "SL-5600" )
1008 d-> m_model = Model_Zaurus_SLB600; 1008 d-> m_model = Model_Zaurus_SLB600;
1009 else 1009 else
1010 d-> m_model = Model_Zaurus_SL5000; 1010 d-> m_model = Model_Zaurus_SL5000;
1011 } 1011 }
1012 else { 1012 else {
1013 d-> m_model = Model_Zaurus_SL5000; 1013 d-> m_model = Model_Zaurus_SL5000;
1014 d-> m_modelstr = "Zaurus (model unknown)"; 1014 d-> m_modelstr = "Zaurus (model unknown)";
1015 } 1015 }
1016 1016
1017 switch ( d-> m_model ) { 1017 switch ( d-> m_model ) {
1018 case Model_Zaurus_SLA300:
1019 d-> m_rotation = Rot0;
1020 break;
1018 case Model_Zaurus_SLC700: 1021 case Model_Zaurus_SLC700:
1019 /* note for C700, we must check the display rotation 1022 /* note for C700, we must check the display rotation
1020 * sensor to set an appropriate value 1023 * sensor to set an appropriate value
1021 */ 1024 */
1022 case Model_Zaurus_SLA300:
1023 case Model_Zaurus_SLB600: 1025 case Model_Zaurus_SLB600:
1024 case Model_Zaurus_SL5500: 1026 case Model_Zaurus_SL5500:
1025 case Model_Zaurus_SL5000: 1027 case Model_Zaurus_SL5000:
1026 default: 1028 default:
1027 d-> m_rotation = Rot270; 1029 d-> m_rotation = Rot270;
1028 break; 1030 break;
1029 } 1031 }
1030 m_leds [0] = Led_Off; 1032 m_leds [0] = Led_Off;
1031} 1033}
1032 1034
1033void Zaurus::initButtons ( ) 1035void Zaurus::initButtons ( )
1034{ 1036{
1035 if ( d-> m_buttons ) 1037 if ( d-> m_buttons )
1036 return; 1038 return;
1037 1039
1038 d-> m_buttons = new QValueList <ODeviceButton>; 1040 d-> m_buttons = new QValueList <ODeviceButton>;
1039 1041
1040 for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) { 1042 for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) {
1041 z_button *zb = z_buttons + i; 1043 z_button *zb = z_buttons + i;
1042 ODeviceButton b; 1044 ODeviceButton b;
1043 1045
1044 b. setKeycode ( zb-> code ); 1046 b. setKeycode ( zb-> code );
1045 b. setUserText ( QObject::tr ( "Button", zb-> utext )); 1047 b. setUserText ( QObject::tr ( "Button", zb-> utext ));
1046 b. setPixmap ( Resource::loadPixmap ( zb-> pix )); 1048 b. setPixmap ( Resource::loadPixmap ( zb-> pix ));
1047 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction )); 1049 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction ));
1048 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction )); 1050 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction ));
1049 1051
1050 d-> m_buttons-> append ( b ); 1052 d-> m_buttons-> append ( b );
1051 } 1053 }
1052 1054
1053 reloadButtonMapping ( ); 1055 reloadButtonMapping ( );
1054 1056