[haiku-commits] haiku: hrev48764 - src/preferences/network/InterfacesAddOn

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 2 Feb 2015 18:17:03 +0100 (CET)

hrev48764 adds 1 changeset to branch 'master'
old head: 048ffc1b1e2acf7b3b45392bfe5808a10379ff52
new head: a6c2b2fa63b0d0172b2408ae7dc9384f680242aa
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=a6c2b2fa63b0+%5E048ffc1b1e2a

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

a6c2b2fa63b0: network preflet: On IPv6, show "Automatic" for address mode
  
  * IPv6 is "DHCPv6" or "Router Advertisement". Lets just say
    automatic to not confuse techie people.

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

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

Revision:    hrev48764
Commit:      a6c2b2fa63b0d0172b2408ae7dc9384f680242aa
URL:         http://cgit.haiku-os.org/haiku/commit/?id=a6c2b2fa63b0
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Mon Feb  2 17:17:29 2015 UTC

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

1 file changed, 11 insertions(+), 2 deletions(-)
.../network/InterfacesAddOn/InterfaceAddressView.cpp    | 13 +++++++++++--

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

diff --git a/src/preferences/network/InterfacesAddOn/InterfaceAddressView.cpp 
b/src/preferences/network/InterfacesAddOn/InterfaceAddressView.cpp
index 95faf36..a2636fd 100644
--- a/src/preferences/network/InterfacesAddOn/InterfaceAddressView.cpp
+++ b/src/preferences/network/InterfacesAddOn/InterfaceAddressView.cpp
@@ -42,8 +42,17 @@ InterfaceAddressView::InterfaceAddressView(int family,
        // Create our controls
        fModePopUpMenu = new BPopUpMenu("modes");
 
-       fModePopUpMenu->AddItem(new BMenuItem(B_TRANSLATE("DHCP"),
-               new BMessage(M_MODE_AUTO)));
+       if (fFamily == AF_INET) {
+               fModePopUpMenu->AddItem(new BMenuItem(B_TRANSLATE("DHCP"),
+                       new BMessage(M_MODE_AUTO)));
+       }
+
+       if (fFamily == AF_INET6) {
+               // Automatic can be DHCPv6 or Router Advertisements
+               fModePopUpMenu->AddItem(new BMenuItem(B_TRANSLATE("Automatic"),
+                       new BMessage(M_MODE_AUTO)));
+       }
+       
        fModePopUpMenu->AddItem(new BMenuItem(B_TRANSLATE("Static"),
                new BMessage(M_MODE_STATIC)));
        fModePopUpMenu->AddSeparatorItem();


Other related posts: