summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 29c8ad2..713cc90 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1125,51 +1125,63 @@ void Zaurus::init ( )
1125 f. close ( ); 1125 f. close ( );
1126 1126
1127 d-> m_modelstr = QString("Zaurus ") + model; 1127 d-> m_modelstr = QString("Zaurus ") + model;
1128 if ( model == "SL-5500" ) 1128 if ( model == "SL-5500" )
1129 d-> m_model = Model_Zaurus_SL5500; 1129 d-> m_model = Model_Zaurus_SL5500;
1130 else if ( model == "SL-C700" ) 1130 else if ( model == "SL-C700" )
1131 d-> m_model = Model_Zaurus_SLC700; 1131 d-> m_model = Model_Zaurus_SLC700;
1132 else if ( model == "SL-A300" ) 1132 else if ( model == "SL-A300" )
1133 d-> m_model = Model_Zaurus_SLA300; 1133 d-> m_model = Model_Zaurus_SLA300;
1134 else if ( model == "SL-B600" || model == "SL-5600" ) 1134 else if ( model == "SL-B600" || model == "SL-5600" )
1135 d-> m_model = Model_Zaurus_SLB600; 1135 d-> m_model = Model_Zaurus_SLB600;
1136 else 1136 else
1137 d-> m_model = Model_Zaurus_SL5000; 1137 d-> m_model = Model_Zaurus_SL5000;
1138 } 1138 }
1139 else { 1139 else {
1140 d-> m_model = Model_Zaurus_SL5000; 1140 d-> m_model = Model_Zaurus_SL5000;
1141 d-> m_modelstr = "Zaurus (model unknown)"; 1141 d-> m_modelstr = "Zaurus (model unknown)";
1142 } 1142 }
1143 1143
1144 switch ( d-> m_model ) { 1144 switch ( d-> m_model ) {
1145 case Model_Zaurus_SLA300: 1145 case Model_Zaurus_SLA300:
1146 d-> m_rotation = Rot0; 1146 d-> m_rotation = Rot0;
1147 break; 1147 break;
1148 case Model_Zaurus_SLC700: 1148 case Model_Zaurus_SLC700:
1149 /* note for C700, we must check the display rotation 1149 bool flipstate = false;
1150 * sensor to set an appropriate value 1150 // Note: need to 1) set flipstate based on physical screen orientation
1151 */ 1151 // and 2) check to see if the user overrode the rotation direction
1152 // using appearance, and if so, remove that item from the Config to
1153 // ensure the rotate applet flips us back to the previous state.
1154 if ( flipstate ) {
1155 // 480x640
1156 d-> m_rotation = Rot0;
1157 d-> m_direction = CW;
1158 } else {
1159 // 640x480
1160 d-> m_rotation = Rot270;
1161 d-> m_direction = CCW;
1162 }
1163 break;
1152 case Model_Zaurus_SLB600: 1164 case Model_Zaurus_SLB600:
1153 case Model_Zaurus_SL5500: 1165 case Model_Zaurus_SL5500:
1154 case Model_Zaurus_SL5000: 1166 case Model_Zaurus_SL5000:
1155 default: 1167 default:
1156 d-> m_rotation = Rot270; 1168 d-> m_rotation = Rot270;
1157 break; 1169 break;
1158 } 1170 }
1159 m_leds [0] = Led_Off; 1171 m_leds [0] = Led_Off;
1160} 1172}
1161 1173
1162void Zaurus::initButtons ( ) 1174void Zaurus::initButtons ( )
1163{ 1175{
1164 if ( d-> m_buttons ) 1176 if ( d-> m_buttons )
1165 return; 1177 return;
1166 1178
1167 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; 1179 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false;
1168 1180
1169 d-> m_buttons = new QValueList <ODeviceButton>; 1181 d-> m_buttons = new QValueList <ODeviceButton>;
1170 1182
1171 for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) { 1183 for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) {
1172 z_button *zb = z_buttons + i; 1184 z_button *zb = z_buttons + i;
1173 ODeviceButton b; 1185 ODeviceButton b;
1174 1186
1175 b. setKeycode ( zb-> code ); 1187 b. setKeycode ( zb-> code );