[haiku-commits] Re: r40311 - in haiku/trunk/src/tests/kits/net/preflet: . InterfacesAddOn

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 28 Jan 2011 22:11:25 +0100

Hi and welcome on bord! :-)

Am 28.01.2011 21:21, schrieb kallisti5@xxxxxxxxxxx:
Author: kallisti5
Date: 2011-01-28 21:21:06 +0100 (Fri, 28 Jan 2011)
New Revision: 40311
Changeset: http://dev.haiku-os.org/changeset/40311

Modified:
    
haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesListView.cpp
    haiku/trunk/src/tests/kits/net/preflet/InterfacesAddOn/InterfacesListView.h
    haiku/trunk/src/tests/kits/net/preflet/Jamfile
    haiku/trunk/src/tests/kits/net/preflet/NetworkSetup.cpp
    haiku/trunk/src/tests/kits/net/preflet/NetworkSetupWindow.cpp
Log:
clean up calculations of ListViewItem positions in Interfaces add-on; remove 
delete profile option which doesn't make sense

[...]
@@ -116,9 +119,9 @@
        owner->SetHighColor( oldcolor );

        BPoint iconPt = bounds.LeftTop() + BPoint(4,4);
-       BPoint namePt = iconPt + BPoint(32+8, fntheight);
-       BPoint driverPt = iconPt + BPoint(32+8, fntheight*2);
-       BPoint commentPt = iconPt + BPoint(32+8, fntheight*3);
+       BPoint namePt = BPoint(32+12, fFirstlineOffset);
+       BPoint driverPt = BPoint(32+12, fSecondlineOffset);
+       BPoint commentPt = BPoint(32+12, fThirdlineOffset);

It's OK to fix coding style violations in lines you change anyway. The rule about not mixing code cleanup and functional changes is more about avoiding to burry a functional change in a great pile of code style cleanups.


@@ -119,10 +114,6 @@
        case NEW_PROFILE_MSG:
                break;

-       case DELETE_PROFILE_MSG: {
-               break;
-       }
-
        case SELECT_PROFILE_MSG: {
                BPath name;
                const char *path;
@@ -206,8 +197,6 @@
        menu->AddSeparatorItem();
        menu->AddItem(new BMenuItem(B_TRANSLATE("New" B_UTF8_ELLIPSIS),
                new BMessage(NEW_PROFILE_MSG)));
-       menu->AddItem(new BMenuItem(B_TRANSLATE("Delete"),
-               new BMessage(DELETE_PROFILE_MSG)));

I am guessing this option should eventually allow to delete the currently selected/active profile. At least it makes sense to me. :-)

Best regards,
-Stephan

Other related posts: