author | llornkcor <llornkcor> | 2004-09-28 05:54:30 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-09-28 05:54:30 (UTC) |
commit | c6daaf1849427191cb449e742681629bdaee4570 (patch) (side-by-side diff) | |
tree | 4864b281a4de726de8eeaff9d13c84b1426fb5ba | |
parent | 9c8f2e26e05be9230ed960d4b4ed21dc658df33e (diff) | |
download | opie-c6daaf1849427191cb449e742681629bdaee4570.zip opie-c6daaf1849427191cb449e742681629bdaee4570.tar.gz opie-c6daaf1849427191cb449e742681629bdaee4570.tar.bz2 |
treble and bass sliders not being hidden on system that dont have those devices
-rw-r--r-- | core/applets/volumeapplet/volume.cpp | 3 |
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 @@ -220,70 +220,69 @@ static const char * alarm_xpm[] = { " +2&3+$1*44 ", " (%_}_+/$:>/4 ", " 4%_}3+#;>:*4 ", " 4%_}&+#[1$/4 ", " 4%_,2')[~~>4 ", " 4%33'4#@~1>4 ", " 4%3344#[:>/4 ", " 42&_3'4#@>:*44 ", " 42|}}3'4#[;$)$44 ", "444{]]2^~~:!!#.@##/ ", "4444-%*:==!!=...../ ", " /:[.. ", " /@. ", " "}; VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *parent, const char *name ) : QFrame ( parent, name, WStyle_StaysOnTop | WType_Popup ) { m_icon = icon; bool has_wav_alarm = true; bool has_bass = true; bool has_treble = true; switch ( ODevice::inst ( )-> model ( )) { // we need to add other devices eventually case Model_Zaurus_SL5000: has_wav_alarm = false; //poor guys probably feeling left out... break; default: break; } - if ( !ODevice::inst ( )-> series ( ) == Model_iPAQ ) { + if ( !ODevice::inst()->modelString().contains( "Model_iPAQ" )) { has_bass = false; has_treble = false; } - setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); QGridLayout *grid = new QGridLayout ( this, 1, 1, 6, 4 ); grid-> setSpacing ( 4 ); grid-> setMargin ( 6 ); QVBoxLayout *vbox; QLabel *l; vbox = new QVBoxLayout ( ); vbox-> setSpacing ( 4 ); grid-> addLayout ( vbox, 1, 0 ); upButton = new QPushButton ( this ); upButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); upButton-> setPixmap ( Resource::loadPixmap ( "up" )); upButton-> setFocusPolicy ( QWidget::NoFocus ); vbox-> addWidget ( upButton ); downButton = new QPushButton ( this ); downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); downButton-> setPixmap ( Resource::loadPixmap ( "down" )); downButton-> setFocusPolicy ( QWidget::NoFocus ); vbox-> addWidget ( downButton ); volSlider = new QSlider ( this ); volSlider-> setRange ( 0, 100 ); volSlider-> setTickmarks ( QSlider::Both ); volSlider-> setTickInterval ( 20 ); volSlider-> setFocusPolicy ( QWidget::NoFocus ); |