-rw-r--r-- | core/applets/volumeapplet/volume.cpp | 2 | ||||
-rw-r--r-- | noncore/applets/wirelessapplet/wireless.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp index 11ba2f6..7f0aca5 100644 --- a/core/applets/volumeapplet/volume.cpp +++ b/core/applets/volumeapplet/volume.cpp | |||
@@ -502,33 +502,33 @@ void VolumeControl::rateTimerDone ( ) | |||
502 | else // if ( downButton-> isDown ( )) | 502 | else // if ( downButton-> isDown ( )) |
503 | volSlider-> setValue ( volSlider-> value ( ) + 2 ); | 503 | volSlider-> setValue ( volSlider-> value ( ) + 2 ); |
504 | } | 504 | } |
505 | 505 | ||
506 | void VolumeControl::show ( bool /*showMic*/ ) | 506 | void VolumeControl::show ( bool /*showMic*/ ) |
507 | { | 507 | { |
508 | readConfig ( ); | 508 | readConfig ( ); |
509 | 509 | ||
510 | QPoint curPos = m_icon-> mapToGlobal ( QPoint ( 0, 0 )); | 510 | QPoint curPos = m_icon-> mapToGlobal ( QPoint ( 0, 0 )); |
511 | 511 | ||
512 | int w = sizeHint ( ). width ( ); | 512 | int w = sizeHint ( ). width ( ); |
513 | int x = curPos.x ( ) - ( w / 2 ); | 513 | int x = curPos.x ( ) - ( w / 2 ); |
514 | 514 | ||
515 | if (( x + w ) > QPEApplication::desktop ( )-> width ( )) | 515 | if (( x + w ) > QPEApplication::desktop ( )-> width ( )) |
516 | x = QPEApplication::desktop ( )-> width ( ) - w; | 516 | x = QPEApplication::desktop ( )-> width ( ) - w; |
517 | 517 | ||
518 | move ( x, curPos. y ( ) - sizeHint ( ). height ( )); | 518 | move ( QMAX(x,0), curPos. y ( ) - sizeHint ( ). height ( )); |
519 | QFrame::show ( ); | 519 | QFrame::show ( ); |
520 | 520 | ||
521 | } | 521 | } |
522 | 522 | ||
523 | void VolumeControl::readConfig ( bool force ) | 523 | void VolumeControl::readConfig ( bool force ) |
524 | { | 524 | { |
525 | Config cfg ( "qpe" ); | 525 | Config cfg ( "qpe" ); |
526 | cfg. setGroup ( "Volume" ); | 526 | cfg. setGroup ( "Volume" ); |
527 | 527 | ||
528 | int old_vp = m_vol_percent; | 528 | int old_vp = m_vol_percent; |
529 | int old_mp = m_mic_percent; | 529 | int old_mp = m_mic_percent; |
530 | int old_bass = m_bass_percent; | 530 | int old_bass = m_bass_percent; |
531 | int old_treble = m_treble_percent; | 531 | int old_treble = m_treble_percent; |
532 | bool old_vm = m_vol_muted; | 532 | bool old_vm = m_vol_muted; |
533 | bool old_mm = m_mic_muted; | 533 | bool old_mm = m_mic_muted; |
534 | bool old_sk = m_snd_key; | 534 | bool old_sk = m_snd_key; |
diff --git a/noncore/applets/wirelessapplet/wireless.cpp b/noncore/applets/wirelessapplet/wireless.cpp index 364f3ad..88ab032 100644 --- a/noncore/applets/wirelessapplet/wireless.cpp +++ b/noncore/applets/wirelessapplet/wireless.cpp | |||
@@ -146,33 +146,33 @@ void WirelessControl::updateDelayChange( int delay ) | |||
146 | void WirelessControl::displayStyleChange( int style ) | 146 | void WirelessControl::displayStyleChange( int style ) |
147 | { | 147 | { |
148 | applet->displayStyleChange( style ); | 148 | applet->displayStyleChange( style ); |
149 | writeConfigEntry( "DisplayStyle", style ); | 149 | writeConfigEntry( "DisplayStyle", style ); |
150 | } | 150 | } |
151 | 151 | ||
152 | void WirelessControl::show ( bool ) | 152 | void WirelessControl::show ( bool ) |
153 | { | 153 | { |
154 | QPoint curPos = applet->mapToGlobal( QPoint ( 0, 0 ) ); | 154 | QPoint curPos = applet->mapToGlobal( QPoint ( 0, 0 ) ); |
155 | 155 | ||
156 | int w = sizeHint().width(); | 156 | int w = sizeHint().width(); |
157 | int x = curPos.x() - ( w / 2 ); | 157 | int x = curPos.x() - ( w / 2 ); |
158 | 158 | ||
159 | if ( ( x + w ) > QPEApplication::desktop() ->width() ) | 159 | if ( ( x + w ) > QPEApplication::desktop() ->width() ) |
160 | x = QPEApplication::desktop ( ) -> width ( ) - w; | 160 | x = QPEApplication::desktop ( ) -> width ( ) - w; |
161 | 161 | ||
162 | move( x, curPos.y () - sizeHint().height () ); | 162 | move( QMAX(x,0), curPos.y () - sizeHint().height () ); |
163 | QFrame::show(); | 163 | QFrame::show(); |
164 | } | 164 | } |
165 | 165 | ||
166 | void WirelessControl::readConfig() | 166 | void WirelessControl::readConfig() |
167 | { | 167 | { |
168 | Config cfg( "qpe" ); | 168 | Config cfg( "qpe" ); |
169 | cfg.setGroup( "Wireless" ); | 169 | cfg.setGroup( "Wireless" ); |
170 | 170 | ||
171 | updateFrequency = cfg.readNumEntry( "UpdateFrequency", 2 ); | 171 | updateFrequency = cfg.readNumEntry( "UpdateFrequency", 2 ); |
172 | rocESSID = cfg.readBoolEntry( "renew_dhcp_on_essid_change", false ); | 172 | rocESSID = cfg.readBoolEntry( "renew_dhcp_on_essid_change", false ); |
173 | rocFREQ = cfg.readBoolEntry( "renew_dhcp_on_freq_change", false ); | 173 | rocFREQ = cfg.readBoolEntry( "renew_dhcp_on_freq_change", false ); |
174 | rocAP = cfg.readBoolEntry( "renew_dhcp_on_ap_change", false ); | 174 | rocAP = cfg.readBoolEntry( "renew_dhcp_on_ap_change", false ); |
175 | rocMODE = cfg.readBoolEntry( "renew_dhcp_on_mode_change", false ); | 175 | rocMODE = cfg.readBoolEntry( "renew_dhcp_on_mode_change", false ); |
176 | } | 176 | } |
177 | 177 | ||
178 | void WirelessControl::writeConfigEntry( const char *entry, int val ) | 178 | void WirelessControl::writeConfigEntry( const char *entry, int val ) |