[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    [Network Management] [PATCH 2/2] Don't display connections for unmanaged interfaces.
From:       Sebastian Krzyszkowiak <dos () dosowisko ! net>
Date:       2012-08-13 0:24:26
Message-ID: 1344817466-15244-2-git-send-email-dos () dosowisko ! net
[Download RAW message or body]

Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net>
---
 libs/service/networkinterfaceactivatableprovider.cpp |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libs/service/networkinterfaceactivatableprovider.cpp \
b/libs/service/networkinterfaceactivatableprovider.cpp index 6fe60d2..f04f726 100644
--- a/libs/service/networkinterfaceactivatableprovider.cpp
+++ b/libs/service/networkinterfaceactivatableprovider.cpp
@@ -159,7 +159,7 @@ bool \
NetworkInterfaceActivatableProvider::hardwareAddressMatches(Knm::Connection  #if 0
     if (connection->type() == Knm::Connection::Wired) {
         Knm::WiredSetting * wiredSetting = dynamic_cast<Knm::WiredSetting \
                *>(connection->setting(Knm::Setting::Wired));
-        Solid::Control::WiredNetworkInterface * wiredIface = \
dynamic_cast<Solid::Control::WiredNetworkInterface *>(iface); +        \
Solid::Control::WiredNetworkInterfaceNm09 * wiredIface = \
dynamic_cast<Solid::Control::WiredNetworkInterfaceNm09 *>(iface);  
         if (wiredSetting && wiredIface) {
 
@@ -170,7 +170,7 @@ bool \
NetworkInterfaceActivatableProvider::hardwareAddressMatches(Knm::Connection  }
     } else if (connection->type() == Knm::Connection::Wireless) {
         Knm::WirelessSetting * wirelessSetting = dynamic_cast<Knm::WirelessSetting \
                *>(connection->setting(Knm::Setting::Wireless));
-        Solid::Control::WirelessNetworkInterface * wirelessIface = \
dynamic_cast<Solid::Control::WirelessNetworkInterface *>(iface); +        \
Solid::Control::WirelessNetworkInterfaceNm09 * wirelessIface = \
dynamic_cast<Solid::Control::WirelessNetworkInterfaceNm09 *>(iface);  
         if (wirelessSetting && wirelessIface) {
 
@@ -189,7 +189,7 @@ void \
NetworkInterfaceActivatableProvider::handleAdd(Knm::Connection * addedConne  \
Q_D(NetworkInterfaceActivatableProvider);  // check type
     kDebug() << addedConnection->uuid();
-    if (!d->activatables.contains(addedConnection->uuid())) {
+    if ((d->interface->connectionState() != \
Solid::Control::NetworkInterfaceNm09::Unmanaged) && \
(!d->activatables.contains(addedConnection->uuid()))) {  if \
(hardwareAddressMatches(addedConnection, d->interface)) {  if \
                (matches(addedConnection->type(), d->interface->type())) {
                 Knm::InterfaceConnection * ifaceConnection = \
Knm::InterfaceConnectionHelpers::buildInterfaceConnection(addedConnection, \
                d->interface->uni(), this);;
-- 
1.7.10.4


> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic