Tracker: style fixes to TrackerSettings
This commit is contained in:
parent
a92b628772
commit
4c0810574e
@ -42,58 +42,59 @@ All rights reserved.
|
||||
|
||||
|
||||
class TTrackerState : public Settings {
|
||||
public:
|
||||
static TTrackerState* Get();
|
||||
void Release();
|
||||
public:
|
||||
static TTrackerState* Get();
|
||||
void Release();
|
||||
|
||||
void LoadSettingsIfNeeded();
|
||||
void SaveSettings(bool onlyIfNonDefault = true);
|
||||
void LoadSettingsIfNeeded();
|
||||
void SaveSettings(bool onlyIfNonDefault = true);
|
||||
|
||||
TTrackerState();
|
||||
~TTrackerState();
|
||||
TTrackerState();
|
||||
~TTrackerState();
|
||||
|
||||
private:
|
||||
friend class BPrivate::TrackerSettings;
|
||||
private:
|
||||
friend class BPrivate::TrackerSettings;
|
||||
|
||||
static void InitIfNeeded();
|
||||
TTrackerState(const TTrackerState&);
|
||||
static void InitIfNeeded();
|
||||
TTrackerState(const TTrackerState&);
|
||||
|
||||
BooleanValueSetting* fShowDisksIcon;
|
||||
BooleanValueSetting* fMountVolumesOntoDesktop;
|
||||
BooleanValueSetting* fDesktopFilePanelRoot;
|
||||
BooleanValueSetting* fMountSharedVolumesOntoDesktop;
|
||||
BooleanValueSetting* fEjectWhenUnmounting;
|
||||
BooleanValueSetting* fShowDisksIcon;
|
||||
BooleanValueSetting* fMountVolumesOntoDesktop;
|
||||
BooleanValueSetting* fDesktopFilePanelRoot;
|
||||
BooleanValueSetting* fMountSharedVolumesOntoDesktop;
|
||||
BooleanValueSetting* fEjectWhenUnmounting;
|
||||
|
||||
BooleanValueSetting* fShowFullPathInTitleBar;
|
||||
BooleanValueSetting* fSingleWindowBrowse;
|
||||
BooleanValueSetting* fShowNavigator;
|
||||
BooleanValueSetting* fShowSelectionWhenInactive;
|
||||
BooleanValueSetting* fTransparentSelection;
|
||||
BooleanValueSetting* fSortFolderNamesFirst;
|
||||
BooleanValueSetting* fHideDotFiles;
|
||||
BooleanValueSetting* fTypeAheadFiltering;
|
||||
BooleanValueSetting* fShowFullPathInTitleBar;
|
||||
BooleanValueSetting* fSingleWindowBrowse;
|
||||
BooleanValueSetting* fShowNavigator;
|
||||
BooleanValueSetting* fShowSelectionWhenInactive;
|
||||
BooleanValueSetting* fTransparentSelection;
|
||||
BooleanValueSetting* fSortFolderNamesFirst;
|
||||
BooleanValueSetting* fHideDotFiles;
|
||||
BooleanValueSetting* fTypeAheadFiltering;
|
||||
|
||||
ScalarValueSetting* fRecentApplicationsCount;
|
||||
ScalarValueSetting* fRecentDocumentsCount;
|
||||
ScalarValueSetting* fRecentFoldersCount;
|
||||
ScalarValueSetting* fRecentApplicationsCount;
|
||||
ScalarValueSetting* fRecentDocumentsCount;
|
||||
ScalarValueSetting* fRecentFoldersCount;
|
||||
|
||||
BooleanValueSetting* fShowVolumeSpaceBar;
|
||||
HexScalarValueSetting* fUsedSpaceColor;
|
||||
HexScalarValueSetting* fFreeSpaceColor;
|
||||
HexScalarValueSetting* fWarningSpaceColor;
|
||||
BooleanValueSetting* fShowVolumeSpaceBar;
|
||||
HexScalarValueSetting* fUsedSpaceColor;
|
||||
HexScalarValueSetting* fFreeSpaceColor;
|
||||
HexScalarValueSetting* fWarningSpaceColor;
|
||||
|
||||
BooleanValueSetting* fDontMoveFilesToTrash;
|
||||
BooleanValueSetting* fAskBeforeDeleteFile;
|
||||
BooleanValueSetting* fDontMoveFilesToTrash;
|
||||
BooleanValueSetting* fAskBeforeDeleteFile;
|
||||
|
||||
Benaphore fInitLock;
|
||||
bool fInited;
|
||||
bool fSettingsLoaded;
|
||||
Benaphore fInitLock;
|
||||
bool fInited;
|
||||
bool fSettingsLoaded;
|
||||
|
||||
int32 fUseCounter;
|
||||
int32 fUseCounter;
|
||||
|
||||
typedef Settings _inherited;
|
||||
typedef Settings _inherited;
|
||||
};
|
||||
|
||||
|
||||
static TTrackerState gTrackerState;
|
||||
|
||||
|
||||
@ -116,7 +117,7 @@ int32 ColorToValue(rgb_color color)
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
// #pragma mark - TTrackerState
|
||||
|
||||
|
||||
TTrackerState::TTrackerState()
|
||||
@ -181,7 +182,7 @@ TTrackerState::LoadSettingsIfNeeded()
|
||||
Add(fHideDotFiles = new BooleanValueSetting("HideDotFiles", false));
|
||||
Add(fTypeAheadFiltering
|
||||
= new BooleanValueSetting("TypeAheadFiltering", false));
|
||||
Add(fSingleWindowBrowse
|
||||
Add(fSingleWindowBrowse
|
||||
= new BooleanValueSetting("SingleWindowBrowse", false));
|
||||
Add(fShowNavigator = new BooleanValueSetting("ShowNavigator", false));
|
||||
|
||||
@ -218,7 +219,7 @@ TTrackerState::LoadSettingsIfNeeded()
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
// #pragma mark - TrackerSettings
|
||||
|
||||
|
||||
TrackerSettings::TrackerSettings()
|
||||
|
@ -42,91 +42,92 @@ All rights reserved.
|
||||
namespace BPrivate {
|
||||
|
||||
enum FormatSeparator {
|
||||
kNoSeparator,
|
||||
kSpaceSeparator,
|
||||
kMinusSeparator,
|
||||
kSlashSeparator,
|
||||
kBackslashSeparator,
|
||||
kDotSeparator,
|
||||
kSeparatorsEnd
|
||||
kNoSeparator,
|
||||
kSpaceSeparator,
|
||||
kMinusSeparator,
|
||||
kSlashSeparator,
|
||||
kBackslashSeparator,
|
||||
kDotSeparator,
|
||||
kSeparatorsEnd
|
||||
};
|
||||
|
||||
enum DateOrder {
|
||||
kYMDFormat,
|
||||
kDMYFormat,
|
||||
kMDYFormat,
|
||||
kDateFormatEnd
|
||||
kYMDFormat,
|
||||
kDMYFormat,
|
||||
kMDYFormat,
|
||||
kDateFormatEnd
|
||||
};
|
||||
|
||||
|
||||
class TrackerSettings {
|
||||
public:
|
||||
TrackerSettings();
|
||||
public:
|
||||
TrackerSettings();
|
||||
|
||||
//TTrackerState* Settings() const { return fSettings; }
|
||||
void SaveSettings(bool onlyIfNonDefault = true);
|
||||
//TTrackerState* Settings() const { return fSettings; }
|
||||
void SaveSettings(bool onlyIfNonDefault = true);
|
||||
|
||||
bool ShowDisksIcon();
|
||||
void SetShowDisksIcon(bool);
|
||||
bool DesktopFilePanelRoot();
|
||||
void SetDesktopFilePanelRoot(bool);
|
||||
bool MountVolumesOntoDesktop();
|
||||
void SetMountVolumesOntoDesktop(bool);
|
||||
bool MountSharedVolumesOntoDesktop();
|
||||
void SetMountSharedVolumesOntoDesktop(bool);
|
||||
bool EjectWhenUnmounting();
|
||||
void SetEjectWhenUnmounting(bool);
|
||||
bool ShowDisksIcon();
|
||||
void SetShowDisksIcon(bool);
|
||||
bool DesktopFilePanelRoot();
|
||||
void SetDesktopFilePanelRoot(bool);
|
||||
bool MountVolumesOntoDesktop();
|
||||
void SetMountVolumesOntoDesktop(bool);
|
||||
bool MountSharedVolumesOntoDesktop();
|
||||
void SetMountSharedVolumesOntoDesktop(bool);
|
||||
bool EjectWhenUnmounting();
|
||||
void SetEjectWhenUnmounting(bool);
|
||||
|
||||
bool ShowVolumeSpaceBar();
|
||||
void SetShowVolumeSpaceBar(bool);
|
||||
rgb_color UsedSpaceColor();
|
||||
void SetUsedSpaceColor(rgb_color color);
|
||||
rgb_color FreeSpaceColor();
|
||||
void SetFreeSpaceColor(rgb_color color);
|
||||
rgb_color WarningSpaceColor();
|
||||
void SetWarningSpaceColor(rgb_color color);
|
||||
bool ShowVolumeSpaceBar();
|
||||
void SetShowVolumeSpaceBar(bool);
|
||||
rgb_color UsedSpaceColor();
|
||||
void SetUsedSpaceColor(rgb_color color);
|
||||
rgb_color FreeSpaceColor();
|
||||
void SetFreeSpaceColor(rgb_color color);
|
||||
rgb_color WarningSpaceColor();
|
||||
void SetWarningSpaceColor(rgb_color color);
|
||||
|
||||
bool ShowFullPathInTitleBar();
|
||||
void SetShowFullPathInTitleBar(bool);
|
||||
bool SortFolderNamesFirst();
|
||||
void SetSortFolderNamesFirst(bool);
|
||||
bool HideDotFiles();
|
||||
void SetHideDotFiles(bool hide);
|
||||
bool TypeAheadFiltering();
|
||||
void SetTypeAheadFiltering(bool enabled);
|
||||
bool ShowFullPathInTitleBar();
|
||||
void SetShowFullPathInTitleBar(bool);
|
||||
bool SortFolderNamesFirst();
|
||||
void SetSortFolderNamesFirst(bool);
|
||||
bool HideDotFiles();
|
||||
void SetHideDotFiles(bool hide);
|
||||
bool TypeAheadFiltering();
|
||||
void SetTypeAheadFiltering(bool enabled);
|
||||
|
||||
bool ShowSelectionWhenInactive();
|
||||
void SetShowSelectionWhenInactive(bool);
|
||||
bool TransparentSelection();
|
||||
void SetTransparentSelection(bool);
|
||||
bool ShowSelectionWhenInactive();
|
||||
void SetShowSelectionWhenInactive(bool);
|
||||
bool TransparentSelection();
|
||||
void SetTransparentSelection(bool);
|
||||
|
||||
bool SingleWindowBrowse();
|
||||
void SetSingleWindowBrowse(bool);
|
||||
bool ShowNavigator();
|
||||
void SetShowNavigator(bool);
|
||||
bool SingleWindowBrowse();
|
||||
void SetSingleWindowBrowse(bool);
|
||||
bool ShowNavigator();
|
||||
void SetShowNavigator(bool);
|
||||
|
||||
void RecentCounts(int32* applications, int32* documents,
|
||||
int32* folders);
|
||||
void SetRecentApplicationsCount(int32);
|
||||
void SetRecentDocumentsCount(int32);
|
||||
void SetRecentFoldersCount(int32);
|
||||
void RecentCounts(int32* applications, int32* documents,
|
||||
int32* folders);
|
||||
void SetRecentApplicationsCount(int32);
|
||||
void SetRecentDocumentsCount(int32);
|
||||
void SetRecentFoldersCount(int32);
|
||||
|
||||
FormatSeparator TimeFormatSeparator();
|
||||
void SetTimeFormatSeparator(FormatSeparator);
|
||||
DateOrder DateOrderFormat();
|
||||
void SetDateOrderFormat(DateOrder);
|
||||
bool ClockIs24Hr();
|
||||
void SetClockTo24Hr(bool);
|
||||
FormatSeparator TimeFormatSeparator();
|
||||
void SetTimeFormatSeparator(FormatSeparator);
|
||||
DateOrder DateOrderFormat();
|
||||
void SetDateOrderFormat(DateOrder);
|
||||
bool ClockIs24Hr();
|
||||
void SetClockTo24Hr(bool);
|
||||
|
||||
bool DontMoveFilesToTrash();
|
||||
void SetDontMoveFilesToTrash(bool);
|
||||
bool AskBeforeDeleteFile();
|
||||
void SetAskBeforeDeleteFile(bool);
|
||||
bool DontMoveFilesToTrash();
|
||||
void SetDontMoveFilesToTrash(bool);
|
||||
bool AskBeforeDeleteFile();
|
||||
void SetAskBeforeDeleteFile(bool);
|
||||
|
||||
private:
|
||||
//TTrackerState* fSettings;
|
||||
private:
|
||||
//TTrackerState* fSettings;
|
||||
};
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
|
||||
#endif // _TRACKER_SETTINGS_H
|
||||
|
Loading…
Reference in New Issue
Block a user