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

List:       kde-commits
Subject:    kdebase/kcontrol/nics
From:       Helge Deller <deller () kde ! org>
Date:       2004-01-23 23:01:54
Message-ID: 20040123230154.BC0461E31 () office ! kde ! org
[Download RAW message or body]

CVS commit by deller: 

change "up" and "down" network card states to "enabled"/"disabled".
CCMAIL: 73324-done@bugs.kde.org


  M +6 -10     nic.cpp   1.25


--- kdebase/kcontrol/nics/nic.cpp  #1.24:1.25
@@ -134,4 +134,7 @@ void KCMNic::update()
 NICList* findNICs()
 {
+   QString upMessage(   i18n("State of network card is connected",    "Enabled") );
+   QString downMessage( i18n("State of network card is disconnected", "Disabled") );
+
    NICList* nl=new NICList;
    nl->setAutoDelete(true);
@@ -173,8 +176,5 @@ NICList* findNICs()
          tmp=new MyNIC;
          tmp->name=ifr->ifr_name;
-         if ((flags & IFF_UP) == IFF_UP)
-            tmp->state=i18n("Up");
-         else
-            tmp->state=i18n("Down");
+         tmp->state= ((flags & IFF_UP) == IFF_UP) ? upMessage : downMessage;
 
          if ((flags & IFF_BROADCAST) == IFF_BROADCAST)
@@ -235,9 +235,5 @@ NICList* findNICs()
       }
 
-      if (ifa->ifa_flags & IFF_UP)
-        tmp->state=i18n("Up");
-      else
-        tmp->state=i18n("Down");
-
+      tmp->state= (ifa->ifa_flags & IFF_UP) ? upMessage : downMessage;
       tmp->type = flags_tos(ifa->ifa_flags);
 


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

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