diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-11-19 20:55:13 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-11-19 20:55:13 -0600 |
commit | f73ccdb6618c4d9f7b1bf5cbdfe61641ed30ce38 (patch) | |
tree | 9162131172d795cb57e014e4975d38f79aec09ab /src | |
parent | 11835f424e0943faa55426e027cd81f38c4a8dd0 (diff) | |
download | knemo-f73ccdb6618c4d9f7b1bf5cbdfe61641ed30ce38.tar.gz knemo-f73ccdb6618c4d9f7b1bf5cbdfe61641ed30ce38.zip |
Fix multiple event notifications
Diffstat (limited to 'src')
-rw-r--r-- | src/knemod/interfaceicon.cpp | 10 | ||||
-rw-r--r-- | src/knemod/interfaceicon.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/knemod/interfaceicon.cpp b/src/knemod/interfaceicon.cpp index 091782b..518eaa3 100644 --- a/src/knemod/interfaceicon.cpp +++ b/src/knemod/interfaceicon.cpp @@ -152,10 +152,10 @@ void InterfaceIcon::updateMenu() void InterfaceIcon::resizeIcon() { - updateTrayStatus(0); + updateTrayStatus(0, false); } -void InterfaceIcon::updateTrayStatus( int previousState ) +void InterfaceIcon::updateTrayStatus( int previousState, bool notify ) { bool interfaceExists = mInterface->getData().existing; bool interfaceAvailable = mInterface->getData().available; @@ -164,7 +164,7 @@ void InterfaceIcon::updateTrayStatus( int previousState ) // notification 'interface not available' if ( !interfaceAvailable && mTray != 0L && - previousState == Interface::AVAILABLE ) + previousState == Interface::AVAILABLE && notify ) { /* When KNemo is starting we don't show the change in connection * status as this would be annoying when KDE starts. @@ -186,7 +186,7 @@ void InterfaceIcon::updateTrayStatus( int previousState ) // notification 'interface not existing' if ( !interfaceExists && mTray != 0L && - previousState != Interface::UNKNOWN_STATE ) + previousState != Interface::UNKNOWN_STATE && notify ) { /* When KNemo is starting we don't show the change in connection * status as this would be annoying when KDE starts. @@ -252,7 +252,7 @@ void InterfaceIcon::updateTrayStatus( int previousState ) // notification 'interface available' if ( interfaceAvailable && mTray != 0L && - previousState != Interface::UNKNOWN_STATE ) + previousState != Interface::UNKNOWN_STATE && notify ) { /* When KNemo is starting we don't show the change in connection * status as this would be annoying when KDE starts. diff --git a/src/knemod/interfaceicon.h b/src/knemod/interfaceicon.h index f279d6a..673436b 100644 --- a/src/knemod/interfaceicon.h +++ b/src/knemod/interfaceicon.h @@ -73,7 +73,7 @@ public slots: /* * Creates or deletes the tray icon */ - void updateTrayStatus( int previousState ); + void updateTrayStatus( int previousState, bool notify=true ); /* * Resizes the tray icon |