-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 | |||
@@ -93,7 +93,13 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char | |||
93 | 93 | ||
94 | 94 | ||
95 | WellenreiterConfigWindow::~WellenreiterConfigWindow() | 95 | void WellenreiterConfigWindow::accept() |
96 | { | 96 | { |
97 | save(); | 97 | save(); |
98 | QDialog::accept(); | ||
99 | } | ||
100 | |||
101 | |||
102 | WellenreiterConfigWindow::~WellenreiterConfigWindow() | ||
103 | { | ||
98 | } | 104 | } |
99 | 105 | ||
@@ -309,5 +315,5 @@ void WellenreiterConfigWindow::performAction( const QString& type, | |||
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 ) |
@@ -399,9 +405,9 @@ void WellenreiterConfigWindow::load() | |||
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 |
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 | |||
@@ -69,6 +69,7 @@ class WellenreiterConfigWindow : public WellenreiterConfigBase | |||
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: |
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 | |||
@@ -433,4 +433,7 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const | |||
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 | } |