Tracker: style fixes to SettingsViews classes
This commit is contained in:
parent
b2ee107be9
commit
f435b67810
@ -83,12 +83,13 @@ send_bool_notices(uint32 what, const char* name, bool value)
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
#undef B_TRANSLATION_CONTEXT
|
||||
#define B_TRANSLATION_CONTEXT "SettingsView"
|
||||
|
||||
|
||||
// #pragma mark - SettingsView
|
||||
|
||||
|
||||
SettingsView::SettingsView(const char* name)
|
||||
:
|
||||
BGroupView(name)
|
||||
@ -169,7 +170,7 @@ SettingsView::IsRevertable() const
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
// #pragma mark - DesktopSettingsView
|
||||
|
||||
|
||||
DesktopSettingsView::DesktopSettingsView()
|
||||
@ -256,7 +257,8 @@ DesktopSettingsView::MessageReceived(BMessage* message)
|
||||
fMountSharedVolumesOntoDesktopCheckBox->Value() == 1);
|
||||
|
||||
// Send the notification message:
|
||||
tracker->SendNotices(kVolumesOnDesktopChanged, ¬ificationMessage);
|
||||
tracker->SendNotices(kVolumesOnDesktopChanged,
|
||||
¬ificationMessage);
|
||||
|
||||
// Tell the settings window the contents have changed:
|
||||
Window()->PostMessage(kSettingsContentsModified);
|
||||
@ -288,7 +290,8 @@ DesktopSettingsView::MessageReceived(BMessage* message)
|
||||
fMountSharedVolumesOntoDesktopCheckBox->Value() == 1);
|
||||
|
||||
// Send the notification message:
|
||||
tracker->SendNotices(kVolumesOnDesktopChanged, ¬ificationMessage);
|
||||
tracker->SendNotices(kVolumesOnDesktopChanged,\
|
||||
¬ificationMessage);
|
||||
|
||||
// Tell the settings window the contents have changed:
|
||||
Window()->PostMessage(kSettingsContentsModified);
|
||||
@ -297,6 +300,7 @@ DesktopSettingsView::MessageReceived(BMessage* message)
|
||||
|
||||
default:
|
||||
_inherited::MessageReceived(message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -405,7 +409,7 @@ DesktopSettingsView::IsRevertable() const
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
// #pragma mark - WindowsSettingsView
|
||||
|
||||
|
||||
WindowsSettingsView::WindowsSettingsView()
|
||||
@ -473,8 +477,9 @@ void
|
||||
WindowsSettingsView::MessageReceived(BMessage* message)
|
||||
{
|
||||
TTracker* tracker = dynamic_cast<TTracker*>(be_app);
|
||||
if (!tracker)
|
||||
if (tracker == NULL)
|
||||
return;
|
||||
|
||||
TrackerSettings settings;
|
||||
|
||||
switch (message->what) {
|
||||
@ -703,7 +708,7 @@ WindowsSettingsView::IsRevertable() const
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
// #pragma mark - SpaceBarSettingsView
|
||||
|
||||
|
||||
SpaceBarSettingsView::SpaceBarSettingsView()
|
||||
@ -791,9 +796,11 @@ SpaceBarSettingsView::MessageReceived(BMessage* message)
|
||||
case 0:
|
||||
fColorControl->SetValue(settings.UsedSpaceColor());
|
||||
break;
|
||||
|
||||
case 1:
|
||||
fColorControl->SetValue(settings.FreeSpaceColor());
|
||||
break;
|
||||
|
||||
case 2:
|
||||
fColorControl->SetValue(settings.WarningSpaceColor());
|
||||
break;
|
||||
@ -812,9 +819,11 @@ SpaceBarSettingsView::MessageReceived(BMessage* message)
|
||||
case 0:
|
||||
settings.SetUsedSpaceColor(color);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
settings.SetFreeSpaceColor(color);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
settings.SetWarningSpaceColor(color);
|
||||
break;
|
||||
@ -836,7 +845,7 @@ void
|
||||
SpaceBarSettingsView::SetDefaults()
|
||||
{
|
||||
TTracker* tracker = dynamic_cast<TTracker*>(be_app);
|
||||
if (!tracker)
|
||||
if (tracker == NULL)
|
||||
return;
|
||||
|
||||
TrackerSettings settings;
|
||||
@ -875,7 +884,7 @@ void
|
||||
SpaceBarSettingsView::Revert()
|
||||
{
|
||||
TTracker* tracker = dynamic_cast<TTracker*>(be_app);
|
||||
if (!tracker)
|
||||
if (tracker == NULL)
|
||||
return;
|
||||
|
||||
TrackerSettings settings;
|
||||
|
@ -31,8 +31,8 @@ of Be Incorporated in the United States and other countries. Other brand product
|
||||
names are registered trademarks or trademarks of their respective holders.
|
||||
All rights reserved.
|
||||
*/
|
||||
#ifndef _SETTINGS_VIEWS
|
||||
#define _SETTINGS_VIEWS
|
||||
#ifndef _SETTINGS_VIEWS_H
|
||||
#define _SETTINGS_VIEWS_H
|
||||
|
||||
|
||||
#include <GroupView.h>
|
||||
@ -54,120 +54,121 @@ class BStringView;
|
||||
namespace BPrivate {
|
||||
|
||||
class SettingsView : public BGroupView {
|
||||
public:
|
||||
SettingsView(const char* name);
|
||||
virtual ~SettingsView();
|
||||
public:
|
||||
SettingsView(const char* name);
|
||||
virtual ~SettingsView();
|
||||
|
||||
virtual void SetDefaults();
|
||||
virtual bool IsDefaultable() const;
|
||||
virtual void Revert();
|
||||
virtual void ShowCurrentSettings();
|
||||
virtual void RecordRevertSettings();
|
||||
virtual bool IsRevertable() const;
|
||||
virtual void SetDefaults();
|
||||
virtual bool IsDefaultable() const;
|
||||
virtual void Revert();
|
||||
virtual void ShowCurrentSettings();
|
||||
virtual void RecordRevertSettings();
|
||||
virtual bool IsRevertable() const;
|
||||
|
||||
protected:
|
||||
typedef BGroupView _inherited;
|
||||
protected:
|
||||
typedef BGroupView _inherited;
|
||||
};
|
||||
|
||||
|
||||
class DesktopSettingsView : public SettingsView {
|
||||
public:
|
||||
DesktopSettingsView();
|
||||
public:
|
||||
DesktopSettingsView();
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AttachedToWindow();
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AttachedToWindow();
|
||||
|
||||
virtual void SetDefaults();
|
||||
virtual bool IsDefaultable() const;
|
||||
virtual void Revert();
|
||||
virtual void ShowCurrentSettings();
|
||||
virtual void RecordRevertSettings();
|
||||
virtual bool IsRevertable() const;
|
||||
virtual void SetDefaults();
|
||||
virtual bool IsDefaultable() const;
|
||||
virtual void Revert();
|
||||
virtual void ShowCurrentSettings();
|
||||
virtual void RecordRevertSettings();
|
||||
virtual bool IsRevertable() const;
|
||||
|
||||
private:
|
||||
void _SendNotices();
|
||||
private:
|
||||
void _SendNotices();
|
||||
|
||||
BRadioButton* fShowDisksIconRadioButton;
|
||||
BRadioButton* fMountVolumesOntoDesktopRadioButton;
|
||||
BCheckBox* fMountSharedVolumesOntoDesktopCheckBox;
|
||||
BCheckBox* fIntegrateNonBootBeOSDesktopsCheckBox;
|
||||
BButton* fMountButton;
|
||||
BRadioButton* fShowDisksIconRadioButton;
|
||||
BRadioButton* fMountVolumesOntoDesktopRadioButton;
|
||||
BCheckBox* fMountSharedVolumesOntoDesktopCheckBox;
|
||||
BCheckBox* fIntegrateNonBootBeOSDesktopsCheckBox;
|
||||
BButton* fMountButton;
|
||||
|
||||
bool fShowDisksIcon;
|
||||
bool fMountVolumesOntoDesktop;
|
||||
bool fMountSharedVolumesOntoDesktop;
|
||||
bool fIntegrateNonBootBeOSDesktops;
|
||||
bool fEjectWhenUnmounting;
|
||||
bool fShowDisksIcon;
|
||||
bool fMountVolumesOntoDesktop;
|
||||
bool fMountSharedVolumesOntoDesktop;
|
||||
bool fIntegrateNonBootBeOSDesktops;
|
||||
bool fEjectWhenUnmounting;
|
||||
|
||||
typedef SettingsView _inherited;
|
||||
typedef SettingsView _inherited;
|
||||
};
|
||||
|
||||
|
||||
class WindowsSettingsView : public SettingsView {
|
||||
public:
|
||||
WindowsSettingsView();
|
||||
public:
|
||||
WindowsSettingsView();
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AttachedToWindow();
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AttachedToWindow();
|
||||
|
||||
virtual void SetDefaults();
|
||||
virtual bool IsDefaultable() const;
|
||||
virtual void Revert();
|
||||
virtual void ShowCurrentSettings();
|
||||
virtual void RecordRevertSettings();
|
||||
virtual bool IsRevertable() const;
|
||||
virtual void SetDefaults();
|
||||
virtual bool IsDefaultable() const;
|
||||
virtual void Revert();
|
||||
virtual void ShowCurrentSettings();
|
||||
virtual void RecordRevertSettings();
|
||||
virtual bool IsRevertable() const;
|
||||
|
||||
private:
|
||||
BCheckBox* fShowFullPathInTitleBarCheckBox;
|
||||
BCheckBox* fSingleWindowBrowseCheckBox;
|
||||
BCheckBox* fShowNavigatorCheckBox;
|
||||
BCheckBox* fShowSelectionWhenInactiveCheckBox;
|
||||
BCheckBox* fOutlineSelectionCheckBox;
|
||||
BCheckBox* fSortFolderNamesFirstCheckBox;
|
||||
BCheckBox* fTypeAheadFilteringCheckBox;
|
||||
private:
|
||||
BCheckBox* fShowFullPathInTitleBarCheckBox;
|
||||
BCheckBox* fSingleWindowBrowseCheckBox;
|
||||
BCheckBox* fShowNavigatorCheckBox;
|
||||
BCheckBox* fShowSelectionWhenInactiveCheckBox;
|
||||
BCheckBox* fOutlineSelectionCheckBox;
|
||||
BCheckBox* fSortFolderNamesFirstCheckBox;
|
||||
BCheckBox* fTypeAheadFilteringCheckBox;
|
||||
|
||||
bool fShowFullPathInTitleBar;
|
||||
bool fSingleWindowBrowse;
|
||||
bool fShowNavigator;
|
||||
bool fTransparentSelection;
|
||||
bool fSortFolderNamesFirst;
|
||||
bool fTypeAheadFiltering;
|
||||
bool fShowFullPathInTitleBar;
|
||||
bool fSingleWindowBrowse;
|
||||
bool fShowNavigator;
|
||||
bool fTransparentSelection;
|
||||
bool fSortFolderNamesFirst;
|
||||
bool fTypeAheadFiltering;
|
||||
|
||||
typedef SettingsView _inherited;
|
||||
typedef SettingsView _inherited;
|
||||
};
|
||||
|
||||
|
||||
class SpaceBarSettingsView : public SettingsView {
|
||||
public:
|
||||
SpaceBarSettingsView();
|
||||
virtual ~SpaceBarSettingsView();
|
||||
public:
|
||||
SpaceBarSettingsView();
|
||||
virtual ~SpaceBarSettingsView();
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AttachedToWindow();
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AttachedToWindow();
|
||||
|
||||
virtual void SetDefaults();
|
||||
virtual bool IsDefaultable() const;
|
||||
virtual void Revert();
|
||||
virtual void ShowCurrentSettings();
|
||||
virtual void RecordRevertSettings();
|
||||
virtual bool IsRevertable() const;
|
||||
virtual void SetDefaults();
|
||||
virtual bool IsDefaultable() const;
|
||||
virtual void Revert();
|
||||
virtual void ShowCurrentSettings();
|
||||
virtual void RecordRevertSettings();
|
||||
virtual bool IsRevertable() const;
|
||||
|
||||
private:
|
||||
BCheckBox* fSpaceBarShowCheckBox;
|
||||
BColorControl* fColorControl;
|
||||
BMenuField* fColorPicker;
|
||||
int32 fCurrentColor;
|
||||
private:
|
||||
BCheckBox* fSpaceBarShowCheckBox;
|
||||
BColorControl* fColorControl;
|
||||
BMenuField* fColorPicker;
|
||||
int32 fCurrentColor;
|
||||
|
||||
bool fSpaceBarShow;
|
||||
rgb_color fUsedSpaceColor;
|
||||
rgb_color fFreeSpaceColor;
|
||||
rgb_color fWarningSpaceColor;
|
||||
bool fSpaceBarShow;
|
||||
rgb_color fUsedSpaceColor;
|
||||
rgb_color fFreeSpaceColor;
|
||||
rgb_color fWarningSpaceColor;
|
||||
|
||||
typedef SettingsView _inherited;
|
||||
typedef SettingsView _inherited;
|
||||
};
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
using namespace BPrivate;
|
||||
|
||||
#endif // _SETTINGS_VIEWS
|
||||
|
||||
#endif // _SETTINGS_VIEWS_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user