Ticket #6865: 0001-Fix-6865-Tracker-Use-default-checkboxes-for-permissi.patch

File 0001-Fix-6865-Tracker-Use-default-checkboxes-for-permissi.patch, 2.9 KB (added by Janus, 10 years ago)
  • src/kits/tracker/FilePermissionsView.cpp

    From 4af19e4dedcc36b1d1c496e939ed7b30098edbe9 Mon Sep 17 00:00:00 2001
    From: Janus <janus2@ymail.com>
    Date: Sat, 4 Jan 2014 13:32:55 +0000
    Subject: [PATCH] Fix #6865: [Tracker] Use default checkboxes for permissions
    
    ---
     src/kits/tracker/FilePermissionsView.cpp |  4 ++--
     src/kits/tracker/FilePermissionsView.h   | 37 ++++++++------------------------
     2 files changed, 11 insertions(+), 30 deletions(-)
    
    diff --git a/src/kits/tracker/FilePermissionsView.cpp b/src/kits/tracker/FilePermissionsView.cpp
    index f5b7bbf..21f0f13 100644
    a b FilePermissionsView::FilePermissionsView(BRect rect, Model* model)  
    130130        kVerticalSpacing = kRowLabelVerticalSpacing,
    131131        kCheckBoxWidth = 18, kCheckBoxHeight = 18;
    132132
    133     FocusCheckBox** checkBoxArray[3][3] = {
     133    BCheckBox** checkBoxArray[3][3] = {
    134134        {
    135135            &fReadUserCheckBox,
    136136            &fReadGroupCheckBox,
    FilePermissionsView::FilePermissionsView(BRect rect, Model* model)  
    151151    for (int32 x = 0; x < 3; x++) {
    152152        for (int32 y = 0; y < 3; y++) {
    153153            *checkBoxArray[y][x] =
    154                 new FocusCheckBox(BRect(kLeftMargin + kHorizontalSpacing * x,
     154                new BCheckBox(BRect(kLeftMargin + kHorizontalSpacing * x,
    155155                        kTopMargin + kVerticalSpacing * y,
    156156                        kLeftMargin + kHorizontalSpacing * x + kCheckBoxWidth,
    157157                        kTopMargin + kVerticalSpacing * y + kCheckBoxHeight),
  • src/kits/tracker/FilePermissionsView.h

    diff --git a/src/kits/tracker/FilePermissionsView.h b/src/kits/tracker/FilePermissionsView.h
    index 06ce354..0b7a854 100644
    a b All rights reserved.  
    4343
    4444namespace BPrivate {
    4545
    46 class FocusCheckBox : public BCheckBox {
    47     public:
    48         FocusCheckBox(BRect rect, const char* name, const char* label,
    49             BMessage* message)
    50             :   BCheckBox(rect, name, label, message)
    51             {
    52             }
    53 
    54         virtual void Draw(BRect rect)
    55         {
    56             BCheckBox::Draw(rect);
    57 
    58             if (IsFocus()) {
    59                 SetHighColor(0, 0, 255);
    60                 StrokeRect(BRect(2 , 4, 12, 14));
    61             }
    62         }
    63 };
    64 
    6546
    6647class FilePermissionsView : public BView {
    6748    public:
    class FilePermissionsView : public BView {  
    7657    private:
    7758        Model* fModel;
    7859
    79         FocusCheckBox* fReadUserCheckBox;
    80         FocusCheckBox* fReadGroupCheckBox;
    81         FocusCheckBox* fReadOtherCheckBox;
     60        BCheckBox* fReadUserCheckBox;
     61        BCheckBox* fReadGroupCheckBox;
     62        BCheckBox* fReadOtherCheckBox;
    8263
    83         FocusCheckBox* fWriteUserCheckBox;
    84         FocusCheckBox* fWriteGroupCheckBox;
    85         FocusCheckBox* fWriteOtherCheckBox;
     64        BCheckBox* fWriteUserCheckBox;
     65        BCheckBox* fWriteGroupCheckBox;
     66        BCheckBox* fWriteOtherCheckBox;
    8667
    87         FocusCheckBox* fExecuteUserCheckBox;
    88         FocusCheckBox* fExecuteGroupCheckBox;
    89         FocusCheckBox* fExecuteOtherCheckBox;
     68        BCheckBox* fExecuteUserCheckBox;
     69        BCheckBox* fExecuteGroupCheckBox;
     70        BCheckBox* fExecuteOtherCheckBox;
    9071
    9172        BTextControl* fOwnerTextControl;
    9273        BTextControl* fGroupTextControl;