2020-12-30 22:07:54 -06:00
|
|
|
/*
|
|
|
|
* Copyright 2020, Jaidyn Levesque <jadedctrl@teknik.io>
|
|
|
|
* All rights reserved. Distributed under the terms of the MIT license.
|
|
|
|
*/
|
2021-01-24 23:20:11 -06:00
|
|
|
#ifndef PREFS_H
|
|
|
|
#define PREFS_H
|
2020-07-03 19:13:41 -05:00
|
|
|
|
2020-07-07 17:42:12 -05:00
|
|
|
#include <DateTime.h>
|
2020-07-04 04:44:54 -05:00
|
|
|
#include <String.h>
|
2020-07-03 19:13:41 -05:00
|
|
|
#include <StorageKit.h>
|
|
|
|
|
2020-12-30 22:07:54 -06:00
|
|
|
|
2021-01-28 00:19:36 -06:00
|
|
|
static const int64 HOUR_IN_MICROSECONDS = 3600000000;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
kOpenAsHtml = 1,
|
|
|
|
kOpenAsUrl = 2
|
|
|
|
};
|
2021-01-25 19:39:31 -06:00
|
|
|
|
|
|
|
|
2021-01-24 23:20:11 -06:00
|
|
|
class Preferences {
|
2020-07-03 19:13:41 -05:00
|
|
|
public:
|
2021-01-24 23:20:11 -06:00
|
|
|
Preferences();
|
|
|
|
Preferences(Preferences*);
|
2020-12-30 22:07:54 -06:00
|
|
|
|
|
|
|
void Load();
|
|
|
|
void Save();
|
2021-01-25 19:39:31 -06:00
|
|
|
|
|
|
|
int64 UpdateInterval();
|
|
|
|
int UpdateIntervalIndex();
|
|
|
|
void SetUpdateIntervalIndex(int8 index);
|
|
|
|
|
2021-01-28 00:19:36 -06:00
|
|
|
BString EntryDir();
|
|
|
|
status_t SetEntryDir(const char* path);
|
|
|
|
|
|
|
|
BString EntryOpenWith();
|
|
|
|
status_t SetEntryOpenWith(const char* binPath);
|
2021-01-25 19:39:31 -06:00
|
|
|
|
2021-02-20 20:26:42 -06:00
|
|
|
bool EntryOpenAsHtml();
|
|
|
|
bool SetEntryOpenAsHtml(bool asHtml);
|
|
|
|
|
2021-01-28 00:19:36 -06:00
|
|
|
bool fNewNotify;
|
|
|
|
bool fFailureNotify;
|
|
|
|
int8 fOpenAs;
|
2020-07-07 17:42:12 -05:00
|
|
|
|
2021-03-02 19:41:26 -06:00
|
|
|
BRect fMainWindowRect;
|
|
|
|
BRect fFeedEditRect;
|
|
|
|
int32 fTabSelection;
|
|
|
|
|
2021-01-25 19:39:31 -06:00
|
|
|
private:
|
|
|
|
int8 fUpdateInterval;
|
2020-07-07 20:17:52 -05:00
|
|
|
|
2021-01-28 00:19:36 -06:00
|
|
|
BString fEntryDir;
|
|
|
|
BString fOpenWith;
|
2020-07-03 19:13:41 -05:00
|
|
|
};
|
|
|
|
|
2020-12-30 22:07:54 -06:00
|
|
|
|
2021-01-24 23:20:11 -06:00
|
|
|
#endif // PREFS_H
|
2020-12-30 22:07:54 -06:00
|
|
|
|