diff options
Diffstat (limited to 'plugins/Db_autobackups/src/options.h')
-rw-r--r-- | plugins/Db_autobackups/src/options.h | 95 |
1 files changed, 78 insertions, 17 deletions
diff --git a/plugins/Db_autobackups/src/options.h b/plugins/Db_autobackups/src/options.h index d680a73f87..8a33514f26 100644 --- a/plugins/Db_autobackups/src/options.h +++ b/plugins/Db_autobackups/src/options.h @@ -22,20 +22,81 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-typedef enum { BT_DISABLED = 0, BT_START = 1, BT_EXIT = 2, BT_PERIODIC = 4 } BackupType;
-typedef enum { PT_DAYS, PT_HOURS, PT_MINUTES } PeriodType;
-
-typedef struct Options_tag {
- int backup_types;
- unsigned int period;
- PeriodType period_type;
- wchar_t folder[MAX_PATH];
- int num_backups;
- BOOL disable_progress;
- BOOL disable_popups;
- BOOL use_zip;
- BOOL use_dropbox;
- BOOL backup_profile;
-} Options;
-
-extern Options options;
\ No newline at end of file +enum BackupType
+{
+ BT_DISABLED = 0,
+ BT_START = 1,
+ BT_EXIT = 2,
+ BT_PERIODIC = 4
+};
+
+enum PeriodType
+{
+ PT_DAYS,
+ PT_HOURS,
+ PT_MINUTES
+};
+
+struct Options
+{
+ CMOption<BYTE> backup_types;
+ CMOption<WORD> period;
+ CMOption<BYTE> period_type;
+ wchar_t folder[MAX_PATH];
+ CMOption<WORD> num_backups;
+ CMOption<BYTE> disable_progress;
+ CMOption<BYTE> disable_popups;
+ CMOption<BYTE> use_zip;
+ CMOption<BYTE> backup_profile;
+ CMOption<BYTE> use_cloudfile;
+ CMOption<char*> cloudfile_service;
+
+ Options();
+};
+
+class COptionsDlg : public CPluginDlgBase
+{
+ CCtrlCheck m_disable;
+ CCtrlCheck m_backupOnStart;
+ CCtrlCheck m_backupOnExit;
+ CCtrlCheck m_backupPeriodic;
+ CCtrlButton m_backup;
+ CCtrlSpin m_period;
+ CCtrlCombo m_periodType;
+ CCtrlEdit m_folder;
+ CCtrlButton m_browseFolder;
+ CCtrlHyperlink m_foldersPageLink;
+ CCtrlSpin m_numBackups;
+ CCtrlCheck m_disableProgress;
+ CCtrlCheck m_disablePopups;
+ CCtrlCheck m_useZip;
+ CCtrlCheck m_backupProfile;
+ CCtrlCheck m_useCloudFile;
+ CCtrlCombo m_cloudFileService;
+
+ HWND m_hPathTip;
+
+protected:
+ void OnInitDialog() override;
+ void OnApply() override;
+ void OnTimer(CTimer*) override;
+ void OnDestroy() override;
+
+ void Disable_OnChange(CCtrlBase*);
+ void UseCloudFile_OnChange(CCtrlBase*);
+
+ void Backup_OnClick(CCtrlButton*);
+ void BrowseFolder_OnClick(CCtrlButton*);
+ void FoldersPageLink_OnClick(CCtrlHyperlink*);
+
+ void SetDialogState();
+
+ void CreateToolTip(LPTSTR ptszText, LPTSTR ptszTitle);
+
+ static int CALLBACK BrowseProc(HWND hwnd, UINT uMsg, LPARAM, LPARAM);
+
+ static int EnumCloudFileServices(const CFSERVICEINFO *serviceInfo, void *param);
+
+public:
+ COptionsDlg();
+};
\ No newline at end of file |