Skip to content
Permalink
Browse files

Issue #140:

* fix: very last tab backup was not yet done
* tell user about activated auto-restore feature in very last question dialog for saving tab
* add missing translation strings
  • Loading branch information...
ansgarbecker committed Apr 8, 2019
1 parent 561a0ed commit f43c37a65fd703db48ab968d97af93dfe1cb78b1
Showing with 16 additions and 10 deletions.
  1. +10 −7 out/locale/en/LC_MESSAGES/default.po
  2. +6 −3 source/main.pas
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: HeidiSQL\n"
"POT-Creation-Date: 2012-11-05 21:40\n"
"PO-Revision-Date: 2019-04-07 13:11+0200\n"
"PO-Revision-Date: 2019-04-08 20:47+0200\n"
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n"
"MIME-Version: 1.0\n"
@@ -2733,12 +2733,6 @@ msgstr "Tabs to spaces"
msgid "Prompt to save modified files on tab close"
msgstr "Prompt to save modified files on tab close"

msgid "Reopen previously used SQL files in tabs"
msgstr "Reopen previously used SQL files in tabs"

msgid "Automatically backup and restore unsaved content (up to %s per file)"
msgstr "Automatically backup and restore unsaved content (up to %s per file)"

msgid "Show query warnings dialog"
msgstr "Show query warnings dialog"

@@ -6355,3 +6349,12 @@ msgstr "Background color:"

msgid "Backup file could not be deleted: %s"
msgstr "Backup file could not be deleted: %s"

msgid "Your code is saved anyway, as auto-restoring is activated."
msgstr "Your code is saved anyway, as auto-restoring is activated."

msgid "Files"
msgstr "Files"

msgid "Reopen previously used SQL files and unsaved content in tabs *"
msgstr "Reopen previously used SQL files and unsaved content in tabs *"
@@ -11124,10 +11124,15 @@ function TMainForm.ConfirmTabClear(PageIndex: Integer; AppIsClosing: Boolean): B
msg := f_('Save changes to file %s ?', [Tab.MemoFilename])
else
msg := f_('Save content of tab "%s"?', [Trim(Tab.TabSheet.Caption)]);
if AppSettings.ReadBool(asRestoreTabs) and AppIsClosing then begin
msg := msg + CRLF + CRLF + _('Your code is saved anyway, as auto-restoring is activated.');
end;

if FConnections.Count > 0 then
MsgButtons := [mbYes, mbNo, mbCancel]
else
MsgButtons := [mbYes, mbNo];

case MessageDialog(_('Modified query'), msg, mtConfirmation, MsgButtons, asPromptSaveFileOnTabClose) of
mrNo: Result := True;
mrYes: begin
@@ -11150,9 +11155,7 @@ function TMainForm.ConfirmTabClear(PageIndex: Integer; AppIsClosing: Boolean): B
if AppSettings.ReadBool(asRestoreTabs) then begin
if AppIsClosing then begin
// Do last backup before app closes
if not Result then begin
Tab.BackupUnsavedContent;
end;
Tab.BackupUnsavedContent;
end else begin
// Delete backup file if tab is closed by user, intentionally
if (not Tab.MemoBackupFilename.IsEmpty) and FileExists(Tab.MemoBackupFilename) then begin

0 comments on commit f43c37a

Please sign in to comment.
You can’t perform that action at this time.