summaryrefslogtreecommitdiff
path: root/noncore/applets/wirelessapplet/wireless.cpp
Side-by-side diff
Diffstat (limited to 'noncore/applets/wirelessapplet/wireless.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/wirelessapplet/wireless.cpp2
1 files changed, 1 insertions, 1 deletions
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
@@ -138,49 +138,49 @@ void WirelessControl::updateDelayChange( int delay )
{
QString text;
text.sprintf( "Update every %d s", delay );
updateLabel->setText( text );
applet->updateDelayChange( delay );
writeConfigEntry( "UpdateFrequency", delay );
}
void WirelessControl::displayStyleChange( int style )
{
applet->displayStyleChange( style );
writeConfigEntry( "DisplayStyle", style );
}
void WirelessControl::show ( bool )
{
QPoint curPos = applet->mapToGlobal( QPoint ( 0, 0 ) );
int w = sizeHint().width();
int x = curPos.x() - ( w / 2 );
if ( ( x + w ) > QPEApplication::desktop() ->width() )
x = QPEApplication::desktop ( ) -> width ( ) - w;
- move( x, curPos.y () - sizeHint().height () );
+ move( QMAX(x,0), curPos.y () - sizeHint().height () );
QFrame::show();
}
void WirelessControl::readConfig()
{
Config cfg( "qpe" );
cfg.setGroup( "Wireless" );
updateFrequency = cfg.readNumEntry( "UpdateFrequency", 2 );
rocESSID = cfg.readBoolEntry( "renew_dhcp_on_essid_change", false );
rocFREQ = cfg.readBoolEntry( "renew_dhcp_on_freq_change", false );
rocAP = cfg.readBoolEntry( "renew_dhcp_on_ap_change", false );
rocMODE = cfg.readBoolEntry( "renew_dhcp_on_mode_change", false );
}
void WirelessControl::writeConfigEntry( const char *entry, int val )
{
Config cfg( "qpe" );
cfg.setGroup( "Wireless" );
cfg.writeEntry( entry, val );
}
//===========================================================================