Ticket #5889: tracker.3.patch

File tracker.3.patch, 18.2 KB (added by mt, 14 years ago)

TrackerSettingsWindow patch updated to hrev37977

  • SettingsViews.cpp

     
    4444#include <Box.h>
    4545#include <Button.h>
    4646#include <Catalog.h>
     47#include <ControlLook.h>
     48#include <GroupLayoutBuilder.h>
    4749#include <Locale.h>
    4850#include <MenuField.h>
    4951#include <ColorControl.h>
     
    8385#undef B_TRANSLATE_CONTEXT
    8486#define B_TRANSLATE_CONTEXT "libtracker"
    8587
    86 SettingsView::SettingsView(BRect rect, const char *name)
    87     : BView(rect, name, B_FOLLOW_ALL, 0)
     88SettingsView::SettingsView()
     89    : BGroupView()
    8890{
    8991}
    9092
     
    165167// #pragma mark -
    166168
    167169
    168 DesktopSettingsView::DesktopSettingsView(BRect rect)
    169     : SettingsView(rect, "DesktopSettingsView")
     170DesktopSettingsView::DesktopSettingsView()
     171    : SettingsView()
    170172{
    171     rect.OffsetTo(B_ORIGIN);
    172     fShowDisksIconRadioButton = new BRadioButton(rect, "",
     173    fShowDisksIconRadioButton = new BRadioButton("",
    173174        B_TRANSLATE("Show Disks icon"),
    174175        new BMessage(kShowDisksIconChanged));
    175     fShowDisksIconRadioButton->ResizeToPreferred();
    176     AddChild(fShowDisksIconRadioButton);
    177176
    178     const float itemSpacing = fShowDisksIconRadioButton->Bounds().Height() + kItemExtraSpacing;
    179     rect.OffsetBy(0, itemSpacing);
    180 
    181     fMountVolumesOntoDesktopRadioButton = new BRadioButton(rect, "",
     177    fMountVolumesOntoDesktopRadioButton = new BRadioButton("",
    182178        B_TRANSLATE("Show volumes on Desktop"),
    183179        new BMessage(kVolumesOnDesktopChanged));
    184     AddChild(fMountVolumesOntoDesktopRadioButton);
    185     fMountVolumesOntoDesktopRadioButton->ResizeToPreferred();
    186180
    187     rect.OffsetBy(20, itemSpacing);
    188 
    189     fMountSharedVolumesOntoDesktopCheckBox = new BCheckBox(rect, "",
     181    fMountSharedVolumesOntoDesktopCheckBox = new BCheckBox("",
    190182        B_TRANSLATE("Show shared volumes on Desktop"),
    191183        new BMessage(kVolumesOnDesktopChanged));
    192     AddChild(fMountSharedVolumesOntoDesktopCheckBox);
    193     fMountSharedVolumesOntoDesktopCheckBox->ResizeToPreferred();
    194184
    195     rect.OffsetBy(-20, itemSpacing);
    196 
    197     rect = Bounds();
    198     rect.top = rect.bottom;
    199     fMountButton = new BButton(rect, "",
     185    fMountButton = new BButton("",
    200186        B_TRANSLATE("Mount settings" B_UTF8_ELLIPSIS),
    201         new BMessage(kRunAutomounterSettings), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
    202     fMountButton->ResizeToPreferred();
    203     fMountButton->MoveBy(0, -fMountButton->Bounds().Height());
    204     AddChild(fMountButton);
     187        new BMessage(kRunAutomounterSettings));
    205188
    206     fMountButton->SetTarget(be_app);
    207 }
     189    const float spacing = be_control_look->DefaultItemSpacing();
    208190
     191    BGroupLayoutBuilder(this)
     192        .AddGroup(B_VERTICAL)
     193            .Add(fShowDisksIconRadioButton)
     194            .Add(fMountVolumesOntoDesktopRadioButton)
     195            .AddGroup(B_VERTICAL)
     196                .Add(fMountSharedVolumesOntoDesktopCheckBox)
     197                .SetInsets(20, 0, 0, 0)
     198            .End()
     199            .AddGlue()
     200            .AddGroup(B_HORIZONTAL)
     201                .Add(fMountButton)
     202                .AddGlue()
     203            .End()
     204        .End()
     205        .SetInsets(spacing, spacing, spacing, spacing);
    209206
    210 void
    211 DesktopSettingsView::GetPreferredSize(float *_width, float *_height)
    212 {
    213     if (_width != NULL) {
    214         *_width = fMountSharedVolumesOntoDesktopCheckBox->Frame().right;
    215     }
    216 
    217     if (_height != NULL) {
    218         *_height = fMountSharedVolumesOntoDesktopCheckBox->Frame().bottom + 8
    219             + fMountButton->Bounds().Height();
    220     }
     207    fMountButton->SetTarget(be_app);
    221208}
    222209
    223210
     
    414401// #pragma mark -
    415402
    416403
    417 WindowsSettingsView::WindowsSettingsView(BRect rect)
    418     : SettingsView(rect, "WindowsSettingsView")
     404WindowsSettingsView::WindowsSettingsView()
     405    : SettingsView()
    419406{
    420     rect.OffsetTo(B_ORIGIN);
    421     fShowFullPathInTitleBarCheckBox = new BCheckBox(rect, "",
     407    fShowFullPathInTitleBarCheckBox = new BCheckBox("",
    422408        B_TRANSLATE("Show folder location in title tab"),
    423409        new BMessage(kWindowsShowFullPathChanged));
    424     fShowFullPathInTitleBarCheckBox->ResizeToPreferred();
    425     AddChild(fShowFullPathInTitleBarCheckBox);
    426410
    427     const float itemSpacing = fShowFullPathInTitleBarCheckBox->Bounds().Height() + kItemExtraSpacing;
    428     rect.OffsetBy(0, itemSpacing);
    429 
    430     fSingleWindowBrowseCheckBox = new BCheckBox(rect, "",
     411    fSingleWindowBrowseCheckBox = new BCheckBox("",
    431412        B_TRANSLATE("Single window navigation"),
    432413        new BMessage(kSingleWindowBrowseChanged));
    433     fSingleWindowBrowseCheckBox->ResizeToPreferred();
    434     AddChild(fSingleWindowBrowseCheckBox);
    435414
    436     rect.OffsetBy(20, itemSpacing);
    437 
    438     fShowNavigatorCheckBox = new BCheckBox(rect, "",
     415    fShowNavigatorCheckBox = new BCheckBox("",
    439416        B_TRANSLATE("Show navigator"),
    440417        new BMessage(kShowNavigatorChanged));
    441     fShowNavigatorCheckBox->ResizeToPreferred();
    442     AddChild(fShowNavigatorCheckBox);
    443418
    444     rect.OffsetBy(-20, itemSpacing);
    445 
    446     fOutlineSelectionCheckBox = new BCheckBox(rect, "",
     419    fOutlineSelectionCheckBox = new BCheckBox("",
    447420        B_TRANSLATE("Outline selection rectangle only"),
    448421        new BMessage(kTransparentSelectionChanged));
    449     fOutlineSelectionCheckBox->ResizeToPreferred();
    450     AddChild(fOutlineSelectionCheckBox);
    451422
    452     rect.OffsetBy(0, itemSpacing);
    453 
    454     fSortFolderNamesFirstCheckBox = new BCheckBox(rect, "",
     423    fSortFolderNamesFirstCheckBox = new BCheckBox("",
    455424        B_TRANSLATE("List folders first"),
    456425        new BMessage(kSortFolderNamesFirstChanged));
    457     fSortFolderNamesFirstCheckBox->ResizeToPreferred();
    458     AddChild(fSortFolderNamesFirstCheckBox);
    459426
    460     rect.OffsetBy(0, itemSpacing);
    461 
    462     fTypeAheadFilteringCheckBox = new BCheckBox(rect, "",
     427    fTypeAheadFilteringCheckBox = new BCheckBox("",
    463428        B_TRANSLATE("Enable type-ahead filtering"),
    464429        new BMessage(kTypeAheadFilteringChanged));
    465     fTypeAheadFilteringCheckBox->ResizeToPreferred();
    466     AddChild(fTypeAheadFilteringCheckBox);
    467 }
    468430
     431    const float spacing = be_control_look->DefaultItemSpacing();
    469432
    470 void
    471 WindowsSettingsView::GetPreferredSize(float *_width, float *_height)
    472 {
    473     if (_width != NULL)
    474         *_width = fOutlineSelectionCheckBox->Frame().right;
    475 
    476     if (_height != NULL)
    477         *_height = fSortFolderNamesFirstCheckBox->Frame().bottom;
     433    BGroupLayoutBuilder(this)
     434        .AddGroup(B_VERTICAL)
     435            .AddGroup(B_VERTICAL)
     436                .Add(fShowFullPathInTitleBarCheckBox)
     437                .Add(fSingleWindowBrowseCheckBox)
     438            .End()
     439            .AddGroup(B_VERTICAL)
     440                .Add(fShowNavigatorCheckBox)
     441                .SetInsets(20, 0, 0, 0)
     442            .End()
     443            .AddGroup(B_VERTICAL)
     444                .Add(fOutlineSelectionCheckBox)
     445                .Add(fSortFolderNamesFirstCheckBox)
     446                .Add(fTypeAheadFilteringCheckBox)
     447            .End()
     448        .AddGlue()
     449        .End()
     450        .SetInsets(spacing, spacing, spacing, spacing);
    478451}
    479452
    480453
     
    719692// #pragma mark -
    720693
    721694
    722 SpaceBarSettingsView::SpaceBarSettingsView(BRect rect)
    723     : SettingsView(rect, "SpaceBarSettingsView")
     695SpaceBarSettingsView::SpaceBarSettingsView()
     696    : SettingsView()
    724697{
    725     rect.OffsetTo(B_ORIGIN);
    726     fSpaceBarShowCheckBox = new BCheckBox(rect, "",
     698    fSpaceBarShowCheckBox = new BCheckBox("",
    727699        B_TRANSLATE("Show space bars on volumes"),
    728700        new BMessage(kUpdateVolumeSpaceBar));
    729     fSpaceBarShowCheckBox->ResizeToPreferred();
    730     AddChild(fSpaceBarShowCheckBox);
    731701
    732     rect = fSpaceBarShowCheckBox->Frame();
    733     rect.OffsetBy(0, fSpaceBarShowCheckBox->Bounds().Height() + kItemExtraSpacing);
    734 
    735     BPopUpMenu *menu = new BPopUpMenu(B_EMPTY_STRING);
     702    BPopUpMenu* menu = new BPopUpMenu(B_EMPTY_STRING);
    736703    menu->SetFont(be_plain_font);
    737704
    738     BMenuItem *item;
     705    BMenuItem* item;
    739706    menu->AddItem(item = new BMenuItem(
    740707        B_TRANSLATE("Used space color"),
    741708        new BMessage(kSpaceBarSwitchColor)));
     
    748715        B_TRANSLATE("Warning space color"),
    749716        new BMessage(kSpaceBarSwitchColor)));
    750717
    751     BBox *box = new BBox(rect);
    752     box->SetLabel(fColorPicker = new BMenuField(rect, NULL, NULL, menu));
    753     AddChild(box);
     718    BBox* box = new BBox("box");
     719    box->SetLabel(fColorPicker = new BMenuField("menu", NULL, menu));
    754720
    755721    fColorControl = new BColorControl(BPoint(8, fColorPicker->Bounds().Height()
    756722            + 8 + kItemExtraSpacing),
    757723        B_CELLS_16x16, 1, "SpaceColorControl", new BMessage(kSpaceBarColorChanged));
    758724    fColorControl->SetValue(TrackerSettings().UsedSpaceColor());
    759     fColorControl->ResizeToPreferred();
    760725    box->AddChild(fColorControl);
    761726
    762     box->ResizeTo(fColorControl->Bounds().Width() + 16,
    763         fColorControl->Frame().bottom + 8);
    764 }
     727    const float spacing = be_control_look->DefaultItemSpacing();
    765728
     729    BGroupLayoutBuilder(this)
     730        .AddGroup(B_VERTICAL)
     731            .Add(fSpaceBarShowCheckBox)
     732            .Add(box)
     733        .AddGlue()
     734        .End()
     735        .SetInsets(spacing, spacing, spacing, spacing);
    766736
    767 SpaceBarSettingsView::~SpaceBarSettingsView()
    768 {
    769737}
    770738
    771739
    772 void
    773 SpaceBarSettingsView::GetPreferredSize(float *_width, float *_height)
     740SpaceBarSettingsView::~SpaceBarSettingsView()
    774741{
    775     BView* view = fColorControl->Parent();
    776     if (view == NULL)
    777         BView::GetPreferredSize(_width, _height);
    778 
    779     if (_width != NULL) {
    780         float width = fSpaceBarShowCheckBox->Bounds().Width();
    781         if (view->Bounds().Width() > width)
    782             width = view->Bounds().Width();
    783 
    784         *_width = width;
    785     }
    786 
    787     if (_height != NULL)
    788         *_height = view->Frame().bottom;
    789742}
    790743
    791744
     
    976929// #pragma mark -
    977930
    978931
    979 TrashSettingsView::TrashSettingsView(BRect rect)
    980     : SettingsView(rect, "TrashSettingsView")
     932TrashSettingsView::TrashSettingsView()
     933    : SettingsView()
    981934{
    982     rect.OffsetTo(B_ORIGIN);
    983     fDontMoveFilesToTrashCheckBox = new BCheckBox(rect, "",
     935    fDontMoveFilesToTrashCheckBox = new BCheckBox("",
    984936        B_TRANSLATE("Don't move files to Trash"),
    985937            new BMessage(kDontMoveFilesToTrashChanged));
    986     fDontMoveFilesToTrashCheckBox->ResizeToPreferred();
    987     AddChild(fDontMoveFilesToTrashCheckBox);
    988938
    989     rect = fDontMoveFilesToTrashCheckBox->Frame();
    990     rect.OffsetBy(0, fDontMoveFilesToTrashCheckBox->Bounds().Height() + kItemExtraSpacing);
    991 
    992     fAskBeforeDeleteFileCheckBox = new BCheckBox(rect, "",
     939    fAskBeforeDeleteFileCheckBox = new BCheckBox("",
    993940        B_TRANSLATE("Ask before delete"),
    994941            new BMessage(kAskBeforeDeleteFileChanged));
    995     fAskBeforeDeleteFileCheckBox->ResizeToPreferred();
    996     AddChild(fAskBeforeDeleteFileCheckBox);
    997 }
    998942
     943    const float spacing = be_control_look->DefaultItemSpacing();
    999944
    1000 void
    1001 TrashSettingsView::GetPreferredSize(float *_width, float *_height)
    1002 {
    1003     if (_width != NULL) {
    1004         float width = fDontMoveFilesToTrashCheckBox->Bounds().Width();
    1005         if (width < fAskBeforeDeleteFileCheckBox->Bounds().Width())
    1006             width = fAskBeforeDeleteFileCheckBox->Bounds().Width();
     945    BGroupLayoutBuilder(this)
     946        .AddGroup(B_VERTICAL)
     947            .Add(fDontMoveFilesToTrashCheckBox)
     948            .Add(fAskBeforeDeleteFileCheckBox)
     949            .AddGlue()
     950        .End()
     951        .SetInsets(spacing, spacing, spacing, spacing);
    1007952
    1008         *_width = width;
    1009     }
    1010 
    1011     if (_height != NULL)
    1012         *_height = fAskBeforeDeleteFileCheckBox->Frame().bottom;
    1013953}
    1014954
    1015955
  • TrackerSettingsWindow.cpp

     
    3333*/
    3434
    3535#include <Catalog.h>
     36#include <ControlLook.h>
     37#include <LayoutBuilder.h>
    3638#include <Locale.h>
    3739
    3840#include "SettingsViews.h"
    3941#include "TrackerSettings.h"
    4042#include "TrackerSettingsWindow.h"
    4143
    42 //#include <CheckBox.h>
    4344#include <ScrollView.h>
    4445
    4546
     
    7374    BWindow(BRect(80, 80, 450, 350), B_TRANSLATE("Tracker preferences"),
    7475        B_TITLED_WINDOW, B_NOT_MINIMIZABLE | B_NOT_RESIZABLE
    7576        | B_NO_WORKSPACE_ACTIVATION | B_NOT_ANCHORED_ON_ACTIVATE
    76         | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE)
     77        | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
    7778{
    78     BRect rect = Bounds();
    79     BView *topView = new BView(rect, "Background", B_FOLLOW_ALL, 0);
    80     topView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
    81     AddChild(topView);
     79    fSettingsTypeListView = new BListView("List View", B_SINGLE_SELECTION_LIST);
    8280
    83     rect.InsetBy(10, 10);
    84     rect.right = be_plain_font->StringWidth(B_TRANSLATE("Volume Icons"))
    85         + rect.left + (float)B_V_SCROLL_BAR_WIDTH + 40.0f;
    86     fSettingsTypeListView = new BListView(rect, "List View", B_SINGLE_SELECTION_LIST,
    87         B_FOLLOW_LEFT | B_FOLLOW_TOP_BOTTOM);
     81// TODO: Get width of listview using longest translated label.
     82    float width = be_plain_font->StringWidth(B_TRANSLATE("Volume Icons"))
     83        + (float)B_V_SCROLL_BAR_WIDTH + 40.0f;
     84    fSettingsTypeListView->SetExplicitMinSize(BSize(width, 0));
     85    fSettingsTypeListView->SetExplicitMaxSize(  BSize(width, B_SIZE_UNLIMITED));
     86
    8887    BScrollView* scrollView = new BScrollView("scrollview", fSettingsTypeListView,
    89         B_FOLLOW_LEFT | B_FOLLOW_TOP_BOTTOM, B_FRAME_EVENTS | B_WILL_DRAW, false, true);
    90     topView->AddChild(scrollView);
     88    B_FRAME_EVENTS | B_WILL_DRAW, false, true);
    9189
    92     rect = scrollView->Frame();
    93     rect.left = rect.right + 10;
    94     rect.top = rect.bottom;
    95     fDefaultsButton = new BButton(rect, "Defaults", B_TRANSLATE("Defaults"),
    96         new BMessage(kDefaultsButtonPressed), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
    97     fDefaultsButton->ResizeToPreferred();
     90    fDefaultsButton = new BButton("Defaults", B_TRANSLATE("Defaults"),
     91        new BMessage(kDefaultsButtonPressed));
    9892    fDefaultsButton->SetEnabled(false);
    99     fDefaultsButton->MoveBy(0, -fDefaultsButton->Bounds().Height());
    10093
    101     rect = fDefaultsButton->Frame();
    102     rect.left = rect.right + 10;
    103     fRevertButton = new BButton(rect, "Revert", B_TRANSLATE("Revert"),
    104         new BMessage(kRevertButtonPressed), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
     94    fRevertButton = new BButton("Revert", B_TRANSLATE("Revert"),
     95        new BMessage(kRevertButtonPressed));
    10596    fRevertButton->SetEnabled(false);
    106     fRevertButton->ResizeToPreferred();
    10797
    108     rect = scrollView->Frame();
    109     rect.left = rect.right + 10;
    110     rect.right = Bounds().right - 10;
    111     rect.bottom = fDefaultsButton->Frame().top - 10;
    112     fSettingsContainerBox = new BBox(rect, NULL, B_FOLLOW_ALL);
    113     topView->AddChild(fSettingsContainerBox);
    114     topView->AddChild(fDefaultsButton);
    115     topView->AddChild(fRevertButton);
     98    fSettingsContainerBox = new BBox("SettingsContainerBox");
     99   
     100    const float spacing = be_control_look->DefaultItemSpacing();
    116101
    117     rect = _SettingsFrame();
     102    BLayoutBuilder::Group<>(this)
     103        .AddGroup(B_HORIZONTAL, spacing)
     104            .Add(scrollView)
     105            .AddGroup(B_VERTICAL, spacing)
     106                .Add(fSettingsContainerBox)
     107                .AddGroup(B_HORIZONTAL, spacing)
     108                    .Add(fDefaultsButton)
     109                    .Add(fRevertButton)
     110                    .AddGlue()
     111                .End()
     112            .End()
     113        .SetInsets(spacing, spacing, spacing, spacing)
     114        .End();
    118115
    119116    fSettingsTypeListView->AddItem(new SettingsItem(B_TRANSLATE("Desktop"),
    120         new DesktopSettingsView(rect)));
     117        new DesktopSettingsView()));
    121118    fSettingsTypeListView->AddItem(new SettingsItem(B_TRANSLATE("Windows"),
    122         new WindowsSettingsView(rect)));
     119        new WindowsSettingsView()));
    123120    fSettingsTypeListView->AddItem(new SettingsItem(B_TRANSLATE("Trash"),
    124         new TrashSettingsView(rect)));
     121        new TrashSettingsView()));
    125122    fSettingsTypeListView->AddItem(new SettingsItem(B_TRANSLATE("Volume icons"),
    126         new SpaceBarSettingsView(rect)));
     123        new SpaceBarSettingsView()));
    127124
    128     // compute preferred view size
    129 
    130     float minWidth = 0, minHeight = 0;
    131 
    132     for (int32 i = 0; i < fSettingsTypeListView->CountItems(); i++) {
    133         SettingsView* view = ((SettingsItem *)fSettingsTypeListView->ItemAt(i))->View();
    134 
    135         float width, height;
    136         view->GetPreferredSize(&width, &height);
    137 
    138         if (minWidth < width)
    139             minWidth = width;
    140         if (minHeight < height)
    141             minHeight = height;
    142     }
    143 
    144     ResizeBy(max_c(minWidth - rect.Width(), 0), max_c(minHeight - rect.Height(), 0));
    145         // make sure window is large enough to contain all views
    146 
    147125    fSettingsTypeListView->SetSelectionMessage(new BMessage(kSettingsViewChanged));
    148126    fSettingsTypeListView->Select(0);
    149127}
     
    230208}
    231209
    232210
    233 BRect
    234 TrackerSettingsWindow::_SettingsFrame()
    235 {
    236     font_height fontHeight;
    237     be_bold_font->GetHeight(&fontHeight);
    238 
    239     BRect rect = fSettingsContainerBox->Bounds().InsetByCopy(8, 8);
    240     rect.top += ceilf(fontHeight.ascent + fontHeight.descent);
    241 
    242     return rect;
    243 }
    244 
    245 
    246211void
    247212TrackerSettingsWindow::_HandleChangedContents()
    248213{
     
    322287        view->Hide();
    323288        fSettingsContainerBox->AddChild(view);
    324289
    325         // Resize view after it has been attached to the window, so that
    326         // it's resizing modes are respected
    327         BRect rect = _SettingsFrame();
    328         view->ResizeTo(rect.Width(), rect.Height());
    329290        view->Show();
    330291    }
    331292}
  • SettingsViews.h

     
    3636#define _SETTINGS_VIEWS
    3737
    3838#include <CheckBox.h>
     39#include <GroupView.h>
    3940#include <RadioButton.h>
    4041#include <TextControl.h>
    4142#include <ColorControl.h>
     
    5152
    5253namespace BPrivate {
    5354
    54 class SettingsView : public BView {
     55class SettingsView : public BGroupView {
    5556    public:
    56         SettingsView(BRect frame, const char *name);
     57        SettingsView();
    5758        virtual ~SettingsView();
    5859
    5960        virtual void SetDefaults();
     
    6465        virtual bool IsRevertable() const;
    6566
    6667    protected:
    67         typedef BView _inherited;
     68        typedef BGroupView _inherited;
    6869};
    6970
    7071class DesktopSettingsView : public SettingsView {
    7172    public:
    72         DesktopSettingsView(BRect frame);
     73        DesktopSettingsView();
    7374
    7475        virtual void MessageReceived(BMessage *message);
    7576        virtual void AttachedToWindow();
    76         virtual void GetPreferredSize(float *_width, float *_height);
    7777
    7878        virtual void SetDefaults();
    7979        virtual bool IsDefaultable() const;
     
    102102
    103103class WindowsSettingsView : public SettingsView {
    104104    public:
    105         WindowsSettingsView(BRect frame);
     105        WindowsSettingsView();
    106106
    107107        virtual void MessageReceived(BMessage *message);
    108108        virtual void AttachedToWindow();
    109         virtual void GetPreferredSize(float *_width, float *_height);
    110109
    111110        virtual void SetDefaults();
    112111        virtual bool IsDefaultable() const;
     
    134133        typedef SettingsView _inherited;
    135134};
    136135
    137 
    138136class SpaceBarSettingsView : public SettingsView {
    139137    public:
    140         SpaceBarSettingsView(BRect frame);
     138        SpaceBarSettingsView();
    141139        virtual ~SpaceBarSettingsView();
    142140
    143141        virtual void MessageReceived(BMessage *message);
    144142        virtual void AttachedToWindow();
    145         virtual void GetPreferredSize(float *_width, float *_height);
    146143
    147144        virtual void SetDefaults();
    148145        virtual bool IsDefaultable() const;
     
    167164
    168165class TrashSettingsView : public SettingsView {
    169166    public:
    170         TrashSettingsView(BRect frame);
     167        TrashSettingsView();
    171168
    172169        virtual void MessageReceived(BMessage *message);
    173170        virtual void AttachedToWindow();
    174         virtual void GetPreferredSize(float *_width, float *_height);
    175171
    176172        virtual void SetDefaults();
    177173        virtual bool IsDefaultable() const;
  • TrackerSettingsWindow.h

     
    5757
    5858    private:
    5959        SettingsView *_ViewAt(int32 i);
    60         BRect _SettingsFrame();
    6160
    6261        void _HandleChangedContents();
    6362        void _HandlePressedDefaultsButton();