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)
|
130 | 130 | kVerticalSpacing = kRowLabelVerticalSpacing, |
131 | 131 | kCheckBoxWidth = 18, kCheckBoxHeight = 18; |
132 | 132 | |
133 | | FocusCheckBox** checkBoxArray[3][3] = { |
| 133 | BCheckBox** checkBoxArray[3][3] = { |
134 | 134 | { |
135 | 135 | &fReadUserCheckBox, |
136 | 136 | &fReadGroupCheckBox, |
… |
… |
FilePermissionsView::FilePermissionsView(BRect rect, Model* model)
|
151 | 151 | for (int32 x = 0; x < 3; x++) { |
152 | 152 | for (int32 y = 0; y < 3; y++) { |
153 | 153 | *checkBoxArray[y][x] = |
154 | | new FocusCheckBox(BRect(kLeftMargin + kHorizontalSpacing * x, |
| 154 | new BCheckBox(BRect(kLeftMargin + kHorizontalSpacing * x, |
155 | 155 | kTopMargin + kVerticalSpacing * y, |
156 | 156 | kLeftMargin + kHorizontalSpacing * x + kCheckBoxWidth, |
157 | 157 | kTopMargin + kVerticalSpacing * y + kCheckBoxHeight), |
diff --git a/src/kits/tracker/FilePermissionsView.h b/src/kits/tracker/FilePermissionsView.h
index 06ce354..0b7a854 100644
a
|
b
|
All rights reserved.
|
43 | 43 | |
44 | 44 | namespace BPrivate { |
45 | 45 | |
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 | | |
65 | 46 | |
66 | 47 | class FilePermissionsView : public BView { |
67 | 48 | public: |
… |
… |
class FilePermissionsView : public BView {
|
76 | 57 | private: |
77 | 58 | Model* fModel; |
78 | 59 | |
79 | | FocusCheckBox* fReadUserCheckBox; |
80 | | FocusCheckBox* fReadGroupCheckBox; |
81 | | FocusCheckBox* fReadOtherCheckBox; |
| 60 | BCheckBox* fReadUserCheckBox; |
| 61 | BCheckBox* fReadGroupCheckBox; |
| 62 | BCheckBox* fReadOtherCheckBox; |
82 | 63 | |
83 | | FocusCheckBox* fWriteUserCheckBox; |
84 | | FocusCheckBox* fWriteGroupCheckBox; |
85 | | FocusCheckBox* fWriteOtherCheckBox; |
| 64 | BCheckBox* fWriteUserCheckBox; |
| 65 | BCheckBox* fWriteGroupCheckBox; |
| 66 | BCheckBox* fWriteOtherCheckBox; |
86 | 67 | |
87 | | FocusCheckBox* fExecuteUserCheckBox; |
88 | | FocusCheckBox* fExecuteGroupCheckBox; |
89 | | FocusCheckBox* fExecuteOtherCheckBox; |
| 68 | BCheckBox* fExecuteUserCheckBox; |
| 69 | BCheckBox* fExecuteGroupCheckBox; |
| 70 | BCheckBox* fExecuteOtherCheckBox; |
90 | 71 | |
91 | 72 | BTextControl* fOwnerTextControl; |
92 | 73 | BTextControl* fGroupTextControl; |