summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-03-04 17:03:38 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-03-04 17:03:38 +0000
commit59537cbe3af5af1830d5b41049a506e18e42c4d3 (patch)
treee093b0b3a46ac0cf7cad40efe26f6e4a0bbaac20 /plugins/Db_autobackups
parent05379824ac11098191faeb71a99ec38fdee1ef9e (diff)
Db_autobackups: moved to new dropbox service
git-svn-id: http://svn.miranda-ng.org/main/trunk@16422 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db_autobackups')
-rw-r--r--plugins/Db_autobackups/src/backup.cpp5
-rw-r--r--plugins/Db_autobackups/src/main.cpp2
-rw-r--r--plugins/Db_autobackups/src/options.cpp6
3 files changed, 6 insertions, 7 deletions
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp
index 18fd521c14..4e79fa83c5 100644
--- a/plugins/Db_autobackups/src/backup.cpp
+++ b/plugins/Db_autobackups/src/backup.cpp
@@ -319,9 +319,8 @@ int Backup(TCHAR *backup_filename)
if (options.use_dropbox)
{
- CMString s_path(FORMAT, L"/Backups/%s", _tcsrchr(dest_file, '\\') + 1);
- DropboxUploadInfo dui = { dest_file, s_path.GetString() };
- if (CallService(MS_DROPBOX_UPLOAD, NULL, (LPARAM)&dui))
+ DropboxUploadInfo ui = { dest_file, _T("Backups") };
+ if (CallService(MS_DROPBOX_UPLOAD, NULL, (LPARAM)&ui))
ShowPopup(TranslateT("Uploading to Dropbox failed"), TranslateT("Error"), nullptr);
}
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp
index 8e505794ac..92a4963789 100644
--- a/plugins/Db_autobackups/src/main.cpp
+++ b/plugins/Db_autobackups/src/main.cpp
@@ -86,7 +86,7 @@ static int ModulesLoad(WPARAM, LPARAM)
HookEvent(ME_FOLDERS_PATH_CHANGED, FoldersGetBackupPath);
FoldersGetBackupPath(0, 0);
}
- options.use_dropbox = (BOOL)(db_get_b(0, "AutoBackups", "UseDropbox", 0) && ServiceExists(MS_DROPBOX_SEND_FILE));
+ options.use_dropbox = (BOOL)(db_get_b(0, "AutoBackups", "UseDropbox", 0) && ServiceExists(MS_DROPBOX_UPLOAD));
if (options.backup_types & BT_START)
BackupStart(NULL);
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp
index bb5175de23..ecb594101e 100644
--- a/plugins/Db_autobackups/src/options.cpp
+++ b/plugins/Db_autobackups/src/options.cpp
@@ -60,7 +60,7 @@ int LoadOptions(void)
options.disable_progress = (BOOL)db_get_b(0, "AutoBackups", "NoProgress", 0);
options.disable_popups = (BOOL)db_get_b(0, "AutoBackups", "NoPopups", 0);
options.use_zip = (BOOL)db_get_b(0, "AutoBackups", "UseZip", 0);
- options.use_dropbox = (BOOL)(db_get_b(0, "AutoBackups", "UseDropbox", 0) && ServiceExists(MS_DROPBOX_SEND_FILE));
+ options.use_dropbox = (BOOL)(db_get_b(0, "AutoBackups", "UseDropbox", 0) && ServiceExists(MS_DROPBOX_UPLOAD));
options.backup_profile = (BOOL)db_get_b(0, "AutoBackups", "BackupProfile", 0);
SetBackupTimer();
@@ -138,7 +138,7 @@ int SetDlgState(HWND hwndDlg)
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_USEZIP), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ED_PERIOD), new_options.backup_types & BT_PERIODIC);
EnableWindow(GetDlgItem(hwndDlg, IDC_PT), new_options.backup_types & BT_PERIODIC);
- EnableWindow(GetDlgItem(hwndDlg, IDC_DROPBOX), ServiceExists(MS_DROPBOX_SEND_FILE));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DROPBOX), ServiceExists(MS_DROPBOX_UPLOAD));
EnableWindow(GetDlgItem(hwndDlg, IDC_BACKUPPROFILE), new_options.use_zip);
CheckDlgButton(hwndDlg, IDC_RAD_DISABLED, BST_UNCHECKED);
@@ -158,7 +158,7 @@ int SetDlgState(HWND hwndDlg)
CheckDlgButton(hwndDlg, IDC_CHK_NOPROG, new_options.disable_progress ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_NOPOPUP, new_options.disable_popups ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHK_USEZIP, new_options.use_zip ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DROPBOX, new_options.use_dropbox && ServiceExists(MS_DROPBOX_SEND_FILE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DROPBOX, new_options.use_dropbox && ServiceExists(MS_DROPBOX_UPLOAD) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_BACKUPPROFILE, new_options.backup_profile && new_options.use_zip ? BST_CHECKED : BST_UNCHECKED);
if (!ServiceExists(MS_POPUP_ADDPOPUPT))
ShowWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPOPUP), SW_HIDE);