summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.h3
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp3
3 files changed, 16 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 7f39230..9358866 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -92,9 +92,15 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char
92}; 92};
93 93
94 94
95WellenreiterConfigWindow::~WellenreiterConfigWindow() 95void WellenreiterConfigWindow::accept()
96{ 96{
97 save(); 97 save();
98 QDialog::accept();
99}
100
101
102WellenreiterConfigWindow::~WellenreiterConfigWindow()
103{
98} 104}
99 105
100 106
@@ -308,7 +314,7 @@ void WellenreiterConfigWindow::performAction( const QString& type,
308 return; 314 return;
309 } 315 }
310 316
311 qDebug( "going to perform action %d (script='%s')", action, (const char*) script ); 317 qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script );
312 318
313 switch( action ) 319 switch( action )
314 { 320 {
@@ -398,11 +404,11 @@ void WellenreiterConfigWindow::load()
398 lookupVendor->setChecked( c->readBoolEntry( "lookupVendor", true ) ); 404 lookupVendor->setChecked( c->readBoolEntry( "lookupVendor", true ) );
399 openTree->setChecked( c->readBoolEntry( "openTree", true ) ); 405 openTree->setChecked( c->readBoolEntry( "openTree", true ) );
400 disablePM->setChecked( c->readBoolEntry( "disablePM", true ) ); 406 disablePM->setChecked( c->readBoolEntry( "disablePM", true ) );
401 newNetworkAction->setCurrentItem( c->readNumEntry( "newNetworkAction", 0 ) ); 407 newNetworkAction->setCurrentItem( c->readNumEntry( "newNetworkAction", 1 ) ); // Default: Play Alarm
402 newNetworkScript->setText( c->readEntry( "newNetworkScript", "" ) ); 408 newNetworkScript->setText( c->readEntry( "newNetworkScript", "" ) );
403 newClientAction->setCurrentItem( c->readNumEntry( "newClientAction", 0 ) ); 409 newClientAction->setCurrentItem( c->readNumEntry( "newClientAction", 2 ) ); // Default: Play Click
404 newClientScript->setText( c->readEntry( "newClientScript", "" ) ); 410 newClientScript->setText( c->readEntry( "newClientScript", "" ) );
405 newStationAction->setCurrentItem( c->readNumEntry( "newStationAction", 0 ) ); 411 newStationAction->setCurrentItem( c->readNumEntry( "newStationAction", 2 ) ); // Default: Play Click
406 newStationScript->setText( c->readEntry( "newStationScript", "" ) ); 412 newStationScript->setText( c->readEntry( "newStationScript", "" ) );
407 synchronizeActionsAndScripts(); // needed for showing/hiding the script QLineEdit on demand 413 synchronizeActionsAndScripts(); // needed for showing/hiding the script QLineEdit on demand
408 414
diff --git a/noncore/net/wellenreiter/gui/configwindow.h b/noncore/net/wellenreiter/gui/configwindow.h
index 5c998cb..d31d1e8 100644
--- a/noncore/net/wellenreiter/gui/configwindow.h
+++ b/noncore/net/wellenreiter/gui/configwindow.h
@@ -68,8 +68,9 @@ class WellenreiterConfigWindow : public WellenreiterConfigBase
68 void channelAllClicked(int); 68 void channelAllClicked(int);
69 void performAction( const QString&, const QString&, const QString&, bool, int, int /* , const GpsLocation& */ ); 69 void performAction( const QString&, const QString&, const QString&, bool, int, int /* , const GpsLocation& */ );
70 70
71 protected: 71 protected slots:
72 void synchronizeActionsAndScripts(); 72 void synchronizeActionsAndScripts();
73 virtual void accept();
73 74
74 protected: 75 protected:
75 QMap<QString, int> _devicetype; 76 QMap<QString, int> _devicetype;
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index fd88b63..10ead53 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -432,6 +432,9 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const
432 #ifdef DEBUG 432 #ifdef DEBUG
433 qDebug( "creating scanlist item" ); 433 qDebug( "creating scanlist item" );
434 #endif 434 #endif
435 if ( WellenreiterConfigWindow::instance() )
436 WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here
437
435 decorateItem( type, essid, macaddr, wep, channel, signal, false ); 438 decorateItem( type, essid, macaddr, wep, channel, signal, false );
436} 439}
437 440