summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2004-09-28 05:54:30 (UTC)
committer llornkcor <llornkcor>2004-09-28 05:54:30 (UTC)
commitc6daaf1849427191cb449e742681629bdaee4570 (patch) (unidiff)
tree4864b281a4de726de8eeaff9d13c84b1426fb5ba
parent9c8f2e26e05be9230ed960d4b4ed21dc658df33e (diff)
downloadopie-c6daaf1849427191cb449e742681629bdaee4570.zip
opie-c6daaf1849427191cb449e742681629bdaee4570.tar.gz
opie-c6daaf1849427191cb449e742681629bdaee4570.tar.bz2
treble and bass sliders not being hidden on system that dont have those devices
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 276f47f..6a14d07 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -228,54 +228,53 @@ static const char * alarm_xpm[] = {
228" 42|}}3'4#[;$)$44 ", 228" 42|}}3'4#[;$)$44 ",
229"444{]]2^~~:!!#.@##/ ", 229"444{]]2^~~:!!#.@##/ ",
230"4444-%*:==!!=...../ ", 230"4444-%*:==!!=...../ ",
231" /:[.. ", 231" /:[.. ",
232" /@. ", 232" /@. ",
233" "}; 233" "};
234 234
235VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *parent, const char *name ) 235VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *parent, const char *name )
236 : QFrame ( parent, name, WStyle_StaysOnTop | WType_Popup ) 236 : QFrame ( parent, name, WStyle_StaysOnTop | WType_Popup )
237{ 237{
238 m_icon = icon; 238 m_icon = icon;
239 239
240 bool has_wav_alarm = true; 240 bool has_wav_alarm = true;
241 bool has_bass = true; 241 bool has_bass = true;
242 bool has_treble = true; 242 bool has_treble = true;
243 243
244 switch ( ODevice::inst ( )-> model ( )) { // we need to add other devices eventually 244 switch ( ODevice::inst ( )-> model ( )) { // we need to add other devices eventually
245 case Model_Zaurus_SL5000: 245 case Model_Zaurus_SL5000:
246 has_wav_alarm = false; //poor guys probably feeling left out... 246 has_wav_alarm = false; //poor guys probably feeling left out...
247 break; 247 break;
248 default: 248 default:
249 break; 249 break;
250 } 250 }
251 251
252 if ( !ODevice::inst ( )-> series ( ) == Model_iPAQ ) { 252 if ( !ODevice::inst()->modelString().contains( "Model_iPAQ" )) {
253 has_bass = false; 253 has_bass = false;
254 has_treble = false; 254 has_treble = false;
255 } 255 }
256 256
257
258 setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); 257 setFrameStyle ( QFrame::PopupPanel | QFrame::Raised );
259 258
260 QGridLayout *grid = new QGridLayout ( this, 1, 1, 6, 4 ); 259 QGridLayout *grid = new QGridLayout ( this, 1, 1, 6, 4 );
261 grid-> setSpacing ( 4 ); 260 grid-> setSpacing ( 4 );
262 grid-> setMargin ( 6 ); 261 grid-> setMargin ( 6 );
263 262
264 QVBoxLayout *vbox; 263 QVBoxLayout *vbox;
265 QLabel *l; 264 QLabel *l;
266 265
267 vbox = new QVBoxLayout ( ); 266 vbox = new QVBoxLayout ( );
268 vbox-> setSpacing ( 4 ); 267 vbox-> setSpacing ( 4 );
269 grid-> addLayout ( vbox, 1, 0 ); 268 grid-> addLayout ( vbox, 1, 0 );
270 269
271 upButton = new QPushButton ( this ); 270 upButton = new QPushButton ( this );
272 upButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); 271 upButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding ));
273 upButton-> setPixmap ( Resource::loadPixmap ( "up" )); 272 upButton-> setPixmap ( Resource::loadPixmap ( "up" ));
274 upButton-> setFocusPolicy ( QWidget::NoFocus ); 273 upButton-> setFocusPolicy ( QWidget::NoFocus );
275 274
276 vbox-> addWidget ( upButton ); 275 vbox-> addWidget ( upButton );
277 276
278 downButton = new QPushButton ( this ); 277 downButton = new QPushButton ( this );
279 downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); 278 downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding ));
280 downButton-> setPixmap ( Resource::loadPixmap ( "down" )); 279 downButton-> setPixmap ( Resource::loadPixmap ( "down" ));
281 downButton-> setFocusPolicy ( QWidget::NoFocus ); 280 downButton-> setFocusPolicy ( QWidget::NoFocus );