[haiku-commits] haiku: hrev51433 - in src: add-ons/decorators/MacDecorator apps/diskusage

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 23 Sep 2017 09:11:06 +0200 (CEST)

hrev51433 adds 2 changesets to branch 'master'
old head: 4bcba8a84f845e7db32ac4487b3147e0a813126d
new head: 6103c9d186cf534bc36e4bffcf402091358759b1
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=6103c9d186cf+%5E4bcba8a84f84

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

af960311c029: DiskUsage: ignore files from other volumes
  
  This allows us to get meaningful result for the system volume, which
  would otherwise scan both hpkg files, and their whole contents as
  mounted in the system/ hierarchy. Now only the packages are seen.
  Directories are not ignored, so system/ (which is a different mount
  point) will still be browsed, and system/packages (which is a
  shine-through) will be found and counted in the used space.

6103c9d186cf: Fix top border for modal windows.
  
  Patch by "Ben" in #9498.

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

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

2 files changed, 54 insertions(+), 10 deletions(-)
.../decorators/MacDecorator/MacDecorator.cpp     | 60 ++++++++++++++++----
src/apps/diskusage/Scanner.cpp                   |  4 ++

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

Commit:      af960311c029f40bf5fbb7ced8db7fbf919d6880
URL:         http://cgit.haiku-os.org/haiku/commit/?id=af960311c029
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sun Sep 17 14:55:17 2017 UTC

DiskUsage: ignore files from other volumes

This allows us to get meaningful result for the system volume, which
would otherwise scan both hpkg files, and their whole contents as
mounted in the system/ hierarchy. Now only the packages are seen.
Directories are not ignored, so system/ (which is a different mount
point) will still be browsed, and system/packages (which is a
shine-through) will be found and counted in the used space.

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

diff --git a/src/apps/diskusage/Scanner.cpp b/src/apps/diskusage/Scanner.cpp
index fadbe7b..8d460c3 100644
--- a/src/apps/diskusage/Scanner.cpp
+++ b/src/apps/diskusage/Scanner.cpp
@@ -246,7 +246,11 @@ Scanner::_GetFileInfo(BDirectory* dir, FileInfo* parent)
                if (entry.IsSymLink())
                        continue;
 
+
                if (entry.IsFile()) {
+                       entry_ref ref;
+                       if ((entry.GetRef(&ref) == B_OK) && (ref.device != 
Device()))
+                               continue;
                        FileInfo *child = new FileInfo;
                        entry.GetRef(&child->ref);
                        entry.GetSize(&child->size);

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

Revision:    hrev51433
Commit:      6103c9d186cf534bc36e4bffcf402091358759b1
URL:         http://cgit.haiku-os.org/haiku/commit/?id=6103c9d186cf
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Sat Sep 23 07:10:28 2017 UTC

Ticket:      https://dev.haiku-os.org/ticket/9498

Fix top border for modal windows.

Patch by "Ben" in #9498.

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

diff --git a/src/add-ons/decorators/MacDecorator/MacDecorator.cpp 
b/src/add-ons/decorators/MacDecorator/MacDecorator.cpp
index 9c2a7f4..3c4d5ae 100644
--- a/src/add-ons/decorators/MacDecorator/MacDecorator.cpp
+++ b/src/add-ons/decorators/MacDecorator/MacDecorator.cpp
@@ -349,20 +349,60 @@ MacDecorator::_DrawFrame(BRect invalid)
                                fDrawingEngine->StrokeLine(offset, pt2, 
fFrameLowerColor);
 
                                // Draw the top side of the frame that is not 
in the tab
-                               offset = r.RightTop();
-                               pt2 = r.RightBottom();
-
-                               fDrawingEngine->StrokeLine(topleftpt, 
toprightpt, fFrameLowerColor);
-                               topleftpt.y--;
-                               toprightpt.x++;
-                               toprightpt.y--;
-
-                               fDrawingEngine->StrokeLine(topleftpt, 
toprightpt, fFrameLowColor);
+                               if (fTopTab->look == B_MODAL_WINDOW_LOOK) {
+                                       offset = r.LeftTop();
+                                       pt2 = r.RightTop();
+                                       
+                                       fDrawingEngine->StrokeLine(offset, pt2, 
fFrameLowerColor);
+                                       offset.x++;
+                                       offset.y++;
+                                       pt2.x--;
+                                       pt2.y++;
+
+                                       fDrawingEngine->StrokeLine(offset, pt2, 
fFrameHighColor);
+                                       offset.x++;
+                                       offset.y++;
+                                       pt2.x--;
+                                       pt2.y++;
+                                       
+                                       fDrawingEngine->StrokeLine(offset, pt2, 
fFrameMidColor);
+                                       offset.x++;
+                                       offset.y++;
+                                       pt2.x--;
+                                       pt2.y++;
+                                       
+                                       fDrawingEngine->StrokeLine(offset, pt2, 
fFrameMidColor);
+                                       offset.x++;
+                                       offset.y++;
+                                       pt2.x--;
+                                       pt2.y++;
+                                       
+                                       fDrawingEngine->StrokeLine(offset, pt2, 
fFrameLowColor);
+                                       offset.x++;
+                                       offset.y++;
+                                       pt2.x--;
+                                       pt2.y++;
+                                       
+                                       fDrawingEngine->StrokeLine(offset, pt2, 
fFrameLowerColor);
+                               } else {
+                                       // Some odd stuff here where the title 
bar is melded into the
+                                       // window border so that the sides are 
drawn into the title
+                                       // so we draw this bottom up 
+                                       offset = topleftpt;
+                                       pt2 = toprightpt;
+                                       
+                                       fDrawingEngine->StrokeLine(offset, pt2, 
fFrameLowerColor);
+                                       offset.y--;
+                                       offset.x++;
+                                       pt2.y--;
+                                       
+                                       fDrawingEngine->StrokeLine(offset, pt2, 
fFrameLowColor);
+                               }
 
+                               // Draw the bottom side of the frame
                                offset = r.LeftBottom();
                                pt2 = r.RightBottom();
 
-                               // Draw the bottom side of the frame
                                fDrawingEngine->StrokeLine(offset, pt2, 
fFrameLowerColor);
                                offset.x++;
                                offset.y--;


Other related posts:

  • » [haiku-commits] haiku: hrev51433 - in src: add-ons/decorators/MacDecorator apps/diskusage - pulkomandy