From 7424792a9fc4b3d25e06e9283049520aef2d262d Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 7 Aug 2019 08:13:59 -0500 Subject: [PATCH] preferences/network: Fix status labels for stateful connections --- src/preferences/network/InterfaceListItem.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/preferences/network/InterfaceListItem.cpp b/src/preferences/network/InterfaceListItem.cpp index 20c8593456..47dc28437c 100644 --- a/src/preferences/network/InterfaceListItem.cpp +++ b/src/preferences/network/InterfaceListItem.cpp @@ -304,8 +304,16 @@ InterfaceListItem::_StateText() const { if (fDisabled) return B_TRANSLATE("disabled"); - if (!fInterface.HasLink()) - return B_TRANSLATE("no link"); + + if (!fInterface.HasLink()) { + switch (fType) { + case B_NETWORK_INTERFACE_TYPE_VPN: + case B_NETWORK_INTERFACE_TYPE_DIAL_UP: + return B_TRANSLATE("disconnected"); + default: + return B_TRANSLATE("no link"); + } + } // TODO! // } else if ((fSettings->IPAddr(AF_INET).IsEmpty()