-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 16 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.h | 3 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 3 |
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 @@ -94,5 +94,11 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char -WellenreiterConfigWindow::~WellenreiterConfigWindow() +void WellenreiterConfigWindow::accept() { save(); + QDialog::accept(); +} + + +WellenreiterConfigWindow::~WellenreiterConfigWindow() +{ } @@ -310,3 +316,3 @@ void WellenreiterConfigWindow::performAction( const QString& type, - qDebug( "going to perform action %d (script='%s')", action, (const char*) script ); + qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script ); @@ -400,7 +406,7 @@ void WellenreiterConfigWindow::load() disablePM->setChecked( c->readBoolEntry( "disablePM", true ) ); - newNetworkAction->setCurrentItem( c->readNumEntry( "newNetworkAction", 0 ) ); + newNetworkAction->setCurrentItem( c->readNumEntry( "newNetworkAction", 1 ) ); // Default: Play Alarm newNetworkScript->setText( c->readEntry( "newNetworkScript", "" ) ); - newClientAction->setCurrentItem( c->readNumEntry( "newClientAction", 0 ) ); + newClientAction->setCurrentItem( c->readNumEntry( "newClientAction", 2 ) ); // Default: Play Click newClientScript->setText( c->readEntry( "newClientScript", "" ) ); - newStationAction->setCurrentItem( c->readNumEntry( "newStationAction", 0 ) ); + newStationAction->setCurrentItem( c->readNumEntry( "newStationAction", 2 ) ); // Default: Play Click newStationScript->setText( c->readEntry( "newStationScript", "" ) ); 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 @@ -70,4 +70,5 @@ class WellenreiterConfigWindow : public WellenreiterConfigBase - protected: + protected slots: void synchronizeActionsAndScripts(); + virtual void accept(); 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 @@ -434,2 +434,5 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const #endif + if ( WellenreiterConfigWindow::instance() ) + WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here + decorateItem( type, essid, macaddr, wep, channel, signal, false ); |