[haiku-commits] r40314 - in haiku/trunk/src/tests/kits/net/preflet: . DummyAddOn InterfacesAddOn ServicesAddOn

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 29 Jan 2011 16:42:21 +0100 (CET)

Author: kallisti5
Date: 2011-01-29 16:42:20 +0100 (Sat, 29 Jan 2011)
New Revision: 40314
Changeset: http://dev.haiku-os.org/changeset/40314

Modified:
   haiku/trunk/src/tests/kits/net/preflet/DummyAddOn/DummyAddOn.cpp
   haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesAddOn.cpp
   haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesListView.cpp
   haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/StatusAddOn.cpp
   haiku/trunk/src/tests/kits/net/preflet/NetworkSetup.cpp
   haiku/trunk/src/tests/kits/net/preflet/NetworkSetupAddOn.cpp
   haiku/trunk/src/tests/kits/net/preflet/NetworkSetupAddOn.h
   haiku/trunk/src/tests/kits/net/preflet/NetworkSetupProfile.cpp
   haiku/trunk/src/tests/kits/net/preflet/NetworkSetupProfile.h
   haiku/trunk/src/tests/kits/net/preflet/NetworkSetupWindow.cpp
   haiku/trunk/src/tests/kits/net/preflet/NetworkSetupWindow.h
   haiku/trunk/src/tests/kits/net/preflet/ServicesAddOn/ServicesAddOn.cpp
Log:
style cleanup; added missing public source headers

Modified: haiku/trunk/src/tests/kits/net/preflet/DummyAddOn/DummyAddOn.cpp
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/DummyAddOn/DummyAddOn.cpp    
2011-01-28 23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/DummyAddOn/DummyAddOn.cpp    
2011-01-29 15:42:20 UTC (rev 40314)
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2004-2011 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
+
 #include <stdlib.h>
 
 #include "NetworkSetupAddOn.h"

Modified: 
haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesAddOn.cpp
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesAddOn.cpp  
2011-01-28 23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesAddOn.cpp  
2011-01-29 15:42:20 UTC (rev 40314)
@@ -92,8 +92,9 @@
 
        r.left += w + SMALL_MARGIN;
 
-       fOnOff = new BButton(r, "onoff", "Disable", new 
BMessage(ONOFF_INTERFACE_MSG),
-                                       B_FOLLOW_BOTTOM | B_FOLLOW_LEFT);
+       fOnOff = new BButton(r, "onoff", "Disable",
+                               new BMessage(ONOFF_INTERFACE_MSG),
+                               B_FOLLOW_BOTTOM | B_FOLLOW_LEFT);
        fOnOff->GetPreferredSize(&w, &h);
        fOnOff->ResizeToPreferred();
        fOnOff->Hide();
@@ -119,7 +120,7 @@
 {
        int nr = fListview->CurrentSelection();
        InterfaceListItem *item = NULL;
-       if(nr != -1) {
+       if (nr != -1) {
                item = dynamic_cast<InterfaceListItem*>(fListview->ItemAt(nr));
        }
 

Modified: 
haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesListView.cpp
===================================================================
--- 
haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesListView.cpp   
    2011-01-28 23:36:08 UTC (rev 40313)
+++ 
haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesListView.cpp   
    2011-01-29 15:42:20 UTC (rev 40314)
@@ -5,7 +5,7 @@
  * Authors:
  *             Philippe Houdoin
  *             Fredrik Modéen
- *             Alexander von Gluck IV, <kallisti5@xxxxxxxxxxx>
+ *             Alexander von Gluck IV, kallisti5@xxxxxxxxxxx
  */
 
 
@@ -75,7 +75,7 @@
 void
 InterfaceListItem::Update(BView* owner, const BFont* font)
 {
-       BListItem::Update(owner,font);
+       BListItem::Update(owner, font);
        font_height height;
        font->GetHeight(&height);
 
@@ -101,24 +101,25 @@
 
        BRect bounds = list->ItemFrame(list->IndexOf(this));
 
-       rgb_color black= { 0,0,0,255 };
+       rgb_color black = {0, 0, 0, 255};
 
-       if ( IsSelected() || complete ) {
-        if (IsSelected()) {
-            owner->SetHighColor(tint_color(owner->ViewColor() , 
B_HIGHLIGHT_BACKGROUND_TINT));
-        } else {
-            owner->SetHighColor(owner->LowColor());
-               }
+       if (IsSelected() || complete) {
+               if (IsSelected()) {
+                       owner->SetHighColor(tint_color(owner->ViewColor(),
+                               B_HIGHLIGHT_BACKGROUND_TINT));
+       } else {
+               owner->SetHighColor(owner->LowColor());
+       }
 
                owner->FillRect(bounds);
        }
 
-       BPoint iconPt = bounds.LeftTop() + BPoint(4,4);
-       BPoint namePt = BPoint(32+12, fFirstlineOffset);
-       BPoint v4addrPt = BPoint(32+12, fSecondlineOffset);
-       BPoint v6addrPt = BPoint(32+12, fThirdlineOffset);
+       BPoint iconPt = bounds.LeftTop() + BPoint(4, 4);
+       BPoint namePt(32 + 12, fFirstlineOffset);
+       BPoint v4addrPt(32 + 12, fSecondlineOffset);
+       BPoint v6addrPt(32 + 12, fThirdlineOffset);
 
-       if ( fSettings->IsDisabled() ) {
+       if (fSettings->IsDisabled()) {
                owner->SetDrawingMode(B_OP_ALPHA);
                owner->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_OVERLAY);
                owner->SetHighColor(0, 0, 0, 32);
@@ -127,11 +128,11 @@
 
        owner->DrawBitmapAsync(fIcon, iconPt);
 
-       if ( fSettings->IsDisabled() )
-        owner->SetHighColor(tint_color(black, B_LIGHTEN_1_TINT));
+       if (fSettings->IsDisabled())
+               owner->SetHighColor(tint_color(black, B_LIGHTEN_1_TINT));
        else
-        owner->SetHighColor(black);
-               
+               owner->SetHighColor(black);
+
        owner->SetFont(be_bold_font);
        owner->DrawString(Name(), namePt);
        owner->SetFont(be_plain_font);
@@ -142,7 +143,7 @@
                BString v4str("IPv4: ");
                v4str << fSettings->IP();
                v4str << " (";
-               if ( fSettings->AutoConfigure() )
+               if (fSettings->AutoConfigure())
                        v4str << "DHCP";
                else
                        v4str << "manual";
@@ -200,13 +201,17 @@
 
        size_t size;
        // Try specific interface icon?
-       const uint8* rawIcon = (const 
uint8*)resources.LoadResource(B_VECTOR_ICON_TYPE, Name(), &size);
+       const uint8* rawIcon = (const uint8*)resources.LoadResource(
+               B_VECTOR_ICON_TYPE, Name(), &size);
+
        if (rawIcon == NULL && mediaTypeName != NULL)
                // Not found, try interface media type?
-               rawIcon = (const 
uint8*)resources.LoadResource(B_VECTOR_ICON_TYPE, mediaTypeName, &size);
+               rawIcon = (const uint8*)resources.LoadResource(
+                       B_VECTOR_ICON_TYPE, mediaTypeName, &size);
        if (rawIcon == NULL)
                // Not found, try default interface icon?
-               rawIcon = (const 
uint8*)resources.LoadResource(B_VECTOR_ICON_TYPE, "ether", &size);
+               rawIcon = (const uint8*)resources.LoadResource(
+                       B_VECTOR_ICON_TYPE, "ether", &size);
 
        if (rawIcon) {
                // Now build the bitmap
@@ -218,6 +223,7 @@
        }
 }
 
+
 // #pragma mark -
 
 
@@ -313,6 +319,7 @@
        return B_OK;
 }
 
+
 void
 InterfacesListView::_HandleNetworkMessage(BMessage* message)
 {
@@ -354,3 +361,4 @@
                        break;
        }
 }
+

Modified: haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/StatusAddOn.cpp
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/StatusAddOn.cpp      
2011-01-28 23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/StatusAddOn.cpp      
2011-01-29 15:42:20 UTC (rev 40314)
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2004-2011 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
+
 #include <stdlib.h>
 
 #include "NetworkSetupAddOn.h"

Modified: haiku/trunk/src/tests/kits/net/preflet/NetworkSetup.cpp
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/NetworkSetup.cpp     2011-01-28 
23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/NetworkSetup.cpp     2011-01-29 
15:42:20 UTC (rev 40314)
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2004-2007 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
+
 #include <Alert.h>
 #include <Application.h>
 #include <Catalog.h>

Modified: haiku/trunk/src/tests/kits/net/preflet/NetworkSetupAddOn.cpp
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/NetworkSetupAddOn.cpp        
2011-01-28 23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/NetworkSetupAddOn.cpp        
2011-01-29 15:42:20 UTC (rev 40314)
@@ -1,3 +1,8 @@
+/*
+ * Copyright 2004-2011 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
 
 #include "NetworkSetupAddOn.h"
 

Modified: haiku/trunk/src/tests/kits/net/preflet/NetworkSetupAddOn.h
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/NetworkSetupAddOn.h  2011-01-28 
23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/NetworkSetupAddOn.h  2011-01-29 
15:42:20 UTC (rev 40314)
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2004-2011 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
+
 #ifndef NETWORKSETUPADDON_H
 #define NETWORKSETUPADDON_H
 

Modified: haiku/trunk/src/tests/kits/net/preflet/NetworkSetupProfile.cpp
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/NetworkSetupProfile.cpp      
2011-01-28 23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/NetworkSetupProfile.cpp      
2011-01-29 15:42:20 UTC (rev 40314)
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2004-2011 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
+
 #include <stdlib.h>
 
 #include "NetworkSetupProfile.h"

Modified: haiku/trunk/src/tests/kits/net/preflet/NetworkSetupProfile.h
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/NetworkSetupProfile.h        
2011-01-28 23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/NetworkSetupProfile.h        
2011-01-29 15:42:20 UTC (rev 40314)
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2004-2011 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
+
 #ifndef NETWORKSETUPPROFILE_H
 #define NETWORKSETUPPROFILE_H
 

Modified: haiku/trunk/src/tests/kits/net/preflet/NetworkSetupWindow.cpp
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/NetworkSetupWindow.cpp       
2011-01-28 23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/NetworkSetupWindow.cpp       
2011-01-29 15:42:20 UTC (rev 40314)
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2004-2011 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
+
 #include "NetworkSetupAddOn.h"
 #include "NetworkSetupWindow.h"
 

Modified: haiku/trunk/src/tests/kits/net/preflet/NetworkSetupWindow.h
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/NetworkSetupWindow.h 2011-01-28 
23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/NetworkSetupWindow.h 2011-01-29 
15:42:20 UTC (rev 40314)
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2004-2011 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
+
 #ifndef NETWORKSETUPWINDOW_H
 #define NETWORKSETUPWINDOW_H
 

Modified: haiku/trunk/src/tests/kits/net/preflet/ServicesAddOn/ServicesAddOn.cpp
===================================================================
--- haiku/trunk/src/tests/kits/net/preflet/ServicesAddOn/ServicesAddOn.cpp      
2011-01-28 23:36:08 UTC (rev 40313)
+++ haiku/trunk/src/tests/kits/net/preflet/ServicesAddOn/ServicesAddOn.cpp      
2011-01-29 15:42:20 UTC (rev 40314)
@@ -1,3 +1,9 @@
+/*
+ * Copyright 2004-2011 Haiku Inc. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ *
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>


Other related posts: