summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Db_autobackups/res/db_autobackups.rc4
-rw-r--r--plugins/Db_autobackups/src/options.cpp24
-rw-r--r--plugins/Db_autobackups/src/resource.h4
-rw-r--r--plugins/Db_autobackups/src/version.h2
4 files changed, 18 insertions, 16 deletions
diff --git a/plugins/Db_autobackups/res/db_autobackups.rc b/plugins/Db_autobackups/res/db_autobackups.rc
index 695d07024a..87c9d3a357 100644
--- a/plugins/Db_autobackups/res/db_autobackups.rc
+++ b/plugins/Db_autobackups/res/db_autobackups.rc
@@ -29,7 +29,7 @@ EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "Automatic backups",IDC_STATIC,6,4,258,215,WS_GROUP
- CONTROL "Disabled",IDC_RAD_DISABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,19,128,10
+ CONTROL "Enabled",IDC_RAD_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,19,128,10
CONTROL "When Miranda starts",IDC_RAD_START,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,31,153,10
CONTROL "When Miranda exits",IDC_RAD_EXIT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,43,156,10
CONTROL "Every:",IDC_RAD_PERIODIC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,56,43,10
@@ -49,7 +49,7 @@ BEGIN
EDITTEXT IDC_FILEMASK,13,145,243,14,ES_AUTOHSCROLL
CONTROL "Compress backup to zip-archive",IDC_CHK_USEZIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,165,243,10
CONTROL "Backup profile folder",IDC_BACKUPPROFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,26,178,176,10
- CONTROL "Disable progress bar",IDC_CHK_NOPROG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,191,243,10
+ CONTROL "Enable progress bar",IDC_CHK_PROGRESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,191,243,10
CONTROL "Use CloudFile",IDC_CLOUDFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,203,105,10
COMBOBOX IDC_CLOUDFILESEVICE,139,200,117,30,CBS_DROPDOWNLIST | CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Backup NOW",IDC_BUT_NOW,181,19,75,14
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp
index 0dd0cbb4bf..86826b68e1 100644
--- a/plugins/Db_autobackups/src/options.cpp
+++ b/plugins/Db_autobackups/src/options.cpp
@@ -11,7 +11,7 @@ class COptionsDlg : public CDlgBase
auto *periodText = FindControl(IDC_ED_PERIOD);
auto *numBackupsText = FindControl(IDC_ED_NUMBACKUPS);
- bool bEnabled = !m_disable.IsChecked();
+ bool bEnabled = m_enabled.IsChecked();
m_backupOnStart.Enable(bEnabled);
m_backupOnExit.Enable(bEnabled);
m_backupPeriodic.Enable(bEnabled);
@@ -23,7 +23,7 @@ class COptionsDlg : public CDlgBase
m_browseFolder.Enable(bEnabled);
m_filemask.Enable(bEnabled);
m_foldersPageLink.Enable(bEnabled);
- m_disableProgress.Enable(bEnabled);
+ m_enableProgress.Enable(bEnabled);
m_useZip.Enable(bEnabled);
periodText->Enable(bEnabled);
m_period.Enable(bEnabled);
@@ -108,8 +108,8 @@ class COptionsDlg : public CDlgBase
CCtrlBase m_nextTime;
CCtrlEdit m_folder, m_filemask;
CCtrlSpin m_period, m_numBackups;
- CCtrlCheck m_disable, m_backupOnStart, m_backupOnExit, m_backupPeriodic;
- CCtrlCheck m_disableProgress, m_useZip, m_backupProfile, m_useCloudFile;
+ CCtrlCheck m_enabled, m_backupOnStart, m_backupOnExit, m_backupPeriodic;
+ CCtrlCheck m_enableProgress, m_useZip, m_backupProfile, m_useCloudFile;
CCtrlCombo m_periodType, m_cloudFileService;
CCtrlButton m_browseFolder, m_backup;
CCtrlHyperlink m_foldersPageLink;
@@ -130,7 +130,7 @@ class COptionsDlg : public CDlgBase
public:
COptionsDlg() :
CDlgBase(g_plugin, IDD_OPTIONS),
- m_disable(this, IDC_RAD_DISABLED),
+ m_enabled(this, IDC_RAD_ENABLED),
m_backupOnStart(this, IDC_RAD_START),
m_backupOnExit(this, IDC_RAD_EXIT),
m_backupPeriodic(this, IDC_RAD_PERIODIC),
@@ -144,20 +144,21 @@ public:
m_filemask(this, IDC_FILEMASK),
m_foldersPageLink(this, IDC_LNK_FOLDERS, nullptr),
m_numBackups(this, SPIN_NUMBACKUPS, 9999, 1),
- m_disableProgress(this, IDC_CHK_NOPROG),
+ m_enableProgress(this, IDC_CHK_PROGRESS),
m_useZip(this, IDC_CHK_USEZIP),
m_useCloudFile(this, IDC_CLOUDFILE),
m_cloudFileService(this, IDC_CLOUDFILESEVICE)
{
CreateLink(m_period, g_plugin.period);
CreateLink(m_numBackups, g_plugin.num_backups);
- CreateLink(m_disableProgress, g_plugin.disable_progress);
CreateLink(m_useZip, g_plugin.use_zip);
CreateLink(m_filemask, g_plugin.file_mask);
CreateLink(m_backupProfile, g_plugin.backup_profile);
CreateLink(m_useCloudFile, g_plugin.use_cloudfile);
- m_disable.OnChange = Callback(this, &COptionsDlg::onChange_Disable);
+ m_enableProgress.SetState(!g_plugin.disable_progress);
+
+ m_enabled.OnChange = Callback(this, &COptionsDlg::onChange_Enabled);
m_backupOnStart.OnChange = m_backupOnExit.OnChange = m_backupPeriodic.OnChange = Callback(this, &COptionsDlg::onChange_BackupType);
m_useCloudFile.OnChange = Callback(this, &COptionsDlg::onChange_UseCloudFile);
m_useZip.OnChange = Callback(this, &COptionsDlg::onChange_UseZip);
@@ -172,7 +173,7 @@ public:
{
m_hEvent = HookEventMessage(ME_AUTOBACKUP_DONE, m_hwnd, WM_BACKUP_DONE);
- m_disable.SetState(g_plugin.backup_types == BT_DISABLED);
+ m_enabled.SetState(g_plugin.backup_types != BT_DISABLED);
m_backupOnStart.SetState(g_plugin.backup_types & BT_START ? TRUE : FALSE);
m_backupOnExit.SetState(g_plugin.backup_types & BT_EXIT ? TRUE : FALSE);
m_backupPeriodic.SetState(g_plugin.backup_types & BT_PERIODIC ? TRUE : FALSE);
@@ -241,6 +242,7 @@ public:
SetBackupTimer();
g_plugin.period_type = m_periodType.GetCurSel();
+ g_plugin.disable_progress = !m_enableProgress.GetState();
ptrW folder(m_folder.GetText());
@@ -279,7 +281,7 @@ public:
}
}
- void onChange_Disable(CCtrlBase*)
+ void onChange_Enabled(CCtrlBase*)
{
SetDialogState();
}
@@ -306,7 +308,7 @@ public:
m_nextTime.Enable(bEnabled);
if (!m_backupOnStart.IsChecked() && !m_backupOnExit.IsChecked() && !bEnabled) {
- m_disable.SetState(true);
+ m_enabled.SetState(false);
SetDialogState();
}
}
diff --git a/plugins/Db_autobackups/src/resource.h b/plugins/Db_autobackups/src/resource.h
index 47f0a7b122..6ed94f730f 100644
--- a/plugins/Db_autobackups/src/resource.h
+++ b/plugins/Db_autobackups/src/resource.h
@@ -9,7 +9,7 @@
#define SPIN_NUMBACKUPS 1370
#define IDC_PT 1371
#define IDC_ED_PERIOD 1658
-#define IDC_RAD_DISABLED 1660
+#define IDC_RAD_ENABLED 1660
#define IDC_RAD_START 1663
#define IDC_RAD_EXIT 1664
#define IDC_RAD_PERIODIC 1665
@@ -17,7 +17,7 @@
#define IDC_ED_FOLDER 1667
#define IDC_BUT_BROWSE 1668
#define IDC_LNK_FOLDERS 1669
-#define IDC_CHK_NOPROG 1670
+#define IDC_CHK_PROGRESS 1670
#define IDC_BUT_NOW 1671
#define IDC_CHK_USEZIP 1673
#define IDC_CLOUDFILE 1674
diff --git a/plugins/Db_autobackups/src/version.h b/plugins/Db_autobackups/src/version.h
index d9f773e87d..8dcfeb814e 100644
--- a/plugins/Db_autobackups/src/version.h
+++ b/plugins/Db_autobackups/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 0
-#define __BUILD_NUM 6
+#define __BUILD_NUM 7
#include <stdver.h>