diff options
author | Sergey Tatarinov <tatarinov.sergey@gmail.com> | 2014-03-18 15:17:48 +0000 |
---|---|---|
committer | Sergey Tatarinov <tatarinov.sergey@gmail.com> | 2014-03-18 15:17:48 +0000 |
commit | 806c7235a85177c0582a6b3c0f7ce395ffbaec20 (patch) | |
tree | 242391f39c0718f2e10f08e1a7a126c378198b5c /plugins/Db_autobackups/src/backup.cpp | |
parent | 6b3e9ea9d6481717040ad7a257f14bb83f83eb9d (diff) |
Db_autobackups:
- By clicking on the popup opens the folder with the backup
- Minor cosmetics
git-svn-id: http://svn.miranda-ng.org/main/trunk@8652 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db_autobackups/src/backup.cpp')
-rw-r--r-- | plugins/Db_autobackups/src/backup.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index 394bf7c552..aa7499131e 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -237,7 +237,7 @@ int Backup(TCHAR* backup_filename) bZip = true;
}
if (!options.disable_popups)
- ShowPopup(dbname, TranslateT("Backup in progress"));
+ ShowPopup(dbname, TranslateT("Backup in progress"), NULL);
if (!options.disable_progress)
progress_dialog = CreateDialog(hInst, MAKEINTRESOURCE(IDD_COPYPROGRESS), 0, DlgProcProgress);
@@ -274,7 +274,7 @@ int Backup(TCHAR* backup_filename) {
int i;
puText = (TCHAR*)mir_alloc(sizeof(TCHAR) * (dest_file_len + 2));
- for(i = (int)dest_file_len - 1; dest_file[i] != _T('\\'); i--);
+ for (i = (int)dest_file_len - 1; dest_file[i] != _T('\\'); i--);
lstrcpyn(puText, dest_file, i + 2);
lstrcat(puText, _T("\n"));
@@ -283,7 +283,10 @@ int Backup(TCHAR* backup_filename) else
puText = mir_tstrdup(dest_file);
- ShowPopup(puText, TranslateT("Database backed up"));
+ // Now we need to know, which folder we made a backup. Let's break unnecessary variables :)
+ while (dest_file[--dest_file_len] != L'\\');
+ dest_file[dest_file_len] = 0;
+ ShowPopup(puText, TranslateT("Database backed up"), dest_file);
mir_free(puText);
}
}
|