summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index eedc749..aec346b 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -40,16 +40,18 @@
40#include <qtoolbutton.h> 40#include <qtoolbutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qtimer.h> 42#include <qtimer.h>
43 43
44#include <opie/odevice.h> 44#include <opie/odevice.h>
45 45
46#include "oledbox.h" 46#include "oledbox.h"
47 47
48using namespace Opie;
49
48#define RATE_TIMER_INTERVAL 100 50#define RATE_TIMER_INTERVAL 100
49// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time 51// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time
50// results in "hanging" buttons on the iPAQ due to quite high CPU consumption. 52// results in "hanging" buttons on the iPAQ due to quite high CPU consumption.
51 53
52 54
53/* XPM */ 55/* XPM */
54static const char * vol_xpm[] = { 56static const char * vol_xpm[] = {
55"20 20 3 1", 57"20 20 3 1",
@@ -181,19 +183,21 @@ static const char * alarm_xpm[] = {
181VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *parent, const char *name ) 183VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *parent, const char *name )
182 : QFrame ( parent, name, WStyle_StaysOnTop | WType_Popup ) 184 : QFrame ( parent, name, WStyle_StaysOnTop | WType_Popup )
183{ 185{
184 m_icon = icon; 186 m_icon = icon;
185 187
186 bool has_wav_alarm = true; 188 bool has_wav_alarm = true;
187 189
188 switch ( ODevice::inst ( )-> model ( )) { // we need to add other devices eventually 190 switch ( ODevice::inst ( )-> model ( )) { // we need to add other devices eventually
189 case OMODEL_Zaurus_SL5000: 191 case Model_Zaurus_SL5000:
190 has_wav_alarm = false; //poor guys probably feeling left out... 192 has_wav_alarm = false; //poor guys probably feeling left out...
191 break; 193 break;
194 default:
195 break;
192 } 196 }
193 197
194 198
195 setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); 199 setFrameStyle ( QFrame::PopupPanel | QFrame::Raised );
196 200
197 QGridLayout *grid = new QGridLayout ( this, 1, 1, 6, 4 ); 201 QGridLayout *grid = new QGridLayout ( this, 1, 1, 6, 4 );
198 grid-> setSpacing ( 4 ); 202 grid-> setSpacing ( 4 );
199 grid-> setMargin ( 6 ); 203 grid-> setMargin ( 6 );
@@ -452,17 +456,17 @@ void VolumeControl::readConfig ( bool force )
452 keyBox-> setChecked ( m_snd_key ); 456 keyBox-> setChecked ( m_snd_key );
453 if ( force || ( m_snd_touch != old_st )) 457 if ( force || ( m_snd_touch != old_st ))
454 tapBox-> setChecked ( m_snd_touch ); 458 tapBox-> setChecked ( m_snd_touch );
455 if ( force || ( m_snd_alarm != old_sa )) 459 if ( force || ( m_snd_alarm != old_sa ))
456 alarmBox-> setChecked ( m_snd_alarm ); 460 alarmBox-> setChecked ( m_snd_alarm );
457} 461}
458 462
459 463
460void VolumeControl::volumeChanged ( bool nowMuted ) 464void VolumeControl::volumeChanged ( bool /*nowMuted*/ )
461{ 465{
462 int prevVol = m_vol_percent; 466 int prevVol = m_vol_percent;
463 bool prevMute = m_vol_muted; 467 bool prevMute = m_vol_muted;
464 468
465 readConfig ( ); 469 readConfig ( );
466 470
467 // Handle case where muting it toggled 471 // Handle case where muting it toggled
468 if ( m_vol_muted != prevMute ) 472 if ( m_vol_muted != prevMute )