[haiku-commits] haiku: hrev53351 - src/preferences/network

  • From: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 7 Aug 2019 09:21:27 -0400 (EDT)

hrev53351 adds 2 changesets to branch 'master'
old head: f932d9902fc93599c1c28db6b5a2e64b60b64684
new head: e27cfa1b9ff07d1ff77d8ec5934de948067a948e
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=e27cfa1b9ff0+%5Ef932d9902fc9

----------------------------------------------------------------------------

7424792a9fc4: preferences/network: Fix status labels for stateful connections

e27cfa1b9ff0: preferences/network: Ungroup VPN and Dialup
  
  * After a bunch of trials, the groupings for VPN and Dial-up
    connections look too busy.  By putting the "connections"
    at the same level as the interfaces things get a bit clearer
    and a little more modern.
  * Lots of work to do still for "adding / removing" connections.

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 11 insertions(+), 15 deletions(-)
src/preferences/network/InterfaceListItem.cpp | 12 ++++++++++--
src/preferences/network/NetworkWindow.cpp     | 14 +-------------

############################################################################

Commit:      7424792a9fc4b3d25e06e9283049520aef2d262d
URL:         https://git.haiku-os.org/haiku/commit/?id=7424792a9fc4
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Wed Aug  7 13:13:59 2019 UTC

preferences/network: Fix status labels for stateful connections

----------------------------------------------------------------------------

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()

############################################################################

Revision:    hrev53351
Commit:      e27cfa1b9ff07d1ff77d8ec5934de948067a948e
URL:         https://git.haiku-os.org/haiku/commit/?id=e27cfa1b9ff0
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Wed Aug  7 13:18:14 2019 UTC

preferences/network: Ungroup VPN and Dialup

* After a bunch of trials, the groupings for VPN and Dial-up
  connections look too busy.  By putting the "connections"
  at the same level as the interfaces things get a bit clearer
  and a little more modern.
* Lots of work to do still for "adding / removing" connections.

----------------------------------------------------------------------------

diff --git a/src/preferences/network/NetworkWindow.cpp 
b/src/preferences/network/NetworkWindow.cpp
index b6d3566826..59ec9aeaf6 100644
--- a/src/preferences/network/NetworkWindow.cpp
+++ b/src/preferences/network/NetworkWindow.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2015 Haiku Inc. All rights reserved.
+ * Copyright 2004-2019 Haiku Inc., All rights reserved.
  * Distributed under the terms of the MIT License.
  *
  *     Authors:
@@ -449,8 +449,6 @@ NetworkWindow::_ScanAddOns()
                }
 
                _SortItemsUnder(fServicesItem);
-               _SortItemsUnder(fDialUpItem);
-               _SortItemsUnder(fVPNItem);
                _SortItemsUnder(fOtherItem);
        }
 
@@ -487,16 +485,6 @@ NetworkWindow::_ListItemFor(BNetworkSettingsType type)
                                fServicesItem = 
_CreateItem(B_TRANSLATE("Services"));
                        return fServicesItem;
 
-               case B_NETWORK_SETTINGS_TYPE_DIAL_UP:
-                       if (fDialUpItem == NULL)
-                               fDialUpItem = _CreateItem(B_TRANSLATE("Dial 
Up"));
-                       return fDialUpItem;
-
-               case B_NETWORK_SETTINGS_TYPE_VPN:
-                       if (fVPNItem == NULL)
-                               fVPNItem = _CreateItem(B_TRANSLATE("VPN"));
-                       return fVPNItem;
-
                case B_NETWORK_SETTINGS_TYPE_OTHER:
                        if (fOtherItem == NULL)
                                fOtherItem = _CreateItem(B_TRANSLATE("Other"));


Other related posts:

  • » [haiku-commits] haiku: hrev53351 - src/preferences/network - Alex von Gluck IV