diff --git a/out/locale/en/LC_MESSAGES/default.po b/out/locale/en/LC_MESSAGES/default.po index 3cb51c6f..6e4726b0 100644 --- a/out/locale/en/LC_MESSAGES/default.po +++ b/out/locale/en/LC_MESSAGES/default.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: HeidiSQL\n" "POT-Creation-Date: 2012-11-05 21:40\n" -"PO-Revision-Date: 2018-04-15 14:45+0200\n" +"PO-Revision-Date: 2018-04-19 07:33+0200\n" "Last-Translator: Ansgar Becker \n" "Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n" "MIME-Version: 1.0\n" @@ -5692,6 +5692,9 @@ msgstr "Missing \"No\" button in %() call" msgid "Keep asking this question." msgstr "Keep asking this question." +msgid "Keep showing this dialog." +msgstr "Keep showing this dialog." + #. Table editor msgid "Foreign column count does not match source column count." msgstr "Foreign column count does not match source column count." diff --git a/source/apphelpers.pas b/source/apphelpers.pas index a26f6606..ed3d3134 100644 --- a/source/apphelpers.pas +++ b/source/apphelpers.pas @@ -167,7 +167,7 @@ type asCopyTableData, asCopyTableRecentFilter, asServerVersion, asServerVersionFull, asLastConnect, asConnectCount, asRefusedCount, asSessionCreated, asDoUsageStatistics, asLastUsageStatisticCall, asWheelZoom, asDisplayBars, asBarColor, asMySQLBinaries, asCustomSnippetsDirectory, - asPromptSaveFileOnTabClose, asWarnUnsafeUpdates, + asPromptSaveFileOnTabClose, asWarnUnsafeUpdates, asQueryWarningsMessage, asCompletionProposal, asCompletionProposalWidth, asCompletionProposalNbLinesInWindow, asTabsToSpaces, asFilterPanel, asAllowMultipleInstances, asFindDialogSearchHistory, asGUIFontName, asGUIFontSize, asFindDialogReplaceHistory, asMaxQueryResults, asLogErrors, @@ -2491,11 +2491,14 @@ begin // Checkbox, s'il vous plait? KeepAskingValue := True; if KeepAskingSetting <> asUnused then begin - if not (mbNo in Buttons) then + if (not (mbNo in Buttons)) and (Buttons <> [mbOK]) then raise Exception.CreateFmt(_('Missing "No" button in %() call'), ['MessageDialog']); KeepAskingValue := AppSettings.ReadBool(KeepAskingSetting); Dialog.Flags := Dialog.Flags + [tfVerificationFlagChecked]; - Dialog.VerificationText := _('Keep asking this question.'); + if Buttons = [mbOK] then + Dialog.VerificationText := _('Keep showing this dialog.') + else + Dialog.VerificationText := _('Keep asking this question.'); end; // Supress dialog and assume "No" if user disabled this dialog @@ -3502,6 +3505,7 @@ begin InitSetting(asCustomSnippetsDirectory, 'CustomSnippetsDirectory', 0, False, DefaultSnippetsDirectory); InitSetting(asPromptSaveFileOnTabClose, 'PromptSaveFileOnTabClose', 0, True); InitSetting(asWarnUnsafeUpdates, 'WarnUnsafeUpdates', 0, True); + InitSetting(asQueryWarningsMessage, 'QueryWarningsMessage', 0, True); InitSetting(asCompletionProposal, 'CompletionProposal', 0, True); InitSetting(asCompletionProposalWidth, 'CompletionProposalWidth', 350); InitSetting(asCompletionProposalNbLinesInWindow,'CompletionProposalNbLinesInWindow', 12); diff --git a/source/main.pas b/source/main.pas index 0afef360..23c42d36 100644 --- a/source/main.pas +++ b/source/main.pas @@ -2880,13 +2880,13 @@ begin end; MsgText := Trim(MsgText); if (Warnings.RecordCount = Thread.WarningCount) or (Warnings.RecordCount < 5) then - MessageDialog(MsgTitle, MsgText, mtWarning, [mbOk]) + MessageDialog(MsgTitle, MsgText, mtWarning, [mbOk], asQueryWarningsMessage) else begin MsgText := MsgText + CRLF+CRLF + _('Show all warnings in a new query tab?'); MaxWarnings := MakeInt(Thread.Connection.GetVar('SELECT @@max_error_count')); if MaxWarnings < Thread.WarningCount then MsgText := MsgText + CRLF+CRLF+ f_('The server variable %s is currently set to %d, so you won''t see all warnings.', ['@@max_error_count', MaxWarnings]); - if MessageDialog(MsgTitle, MsgText, mtWarning, [mbYes, mbNo]) = mrYes then begin + if MessageDialog(MsgTitle, MsgText, mtWarning, [mbYes, mbNo], asQueryWarningsMessage) = mrYes then begin actNewQueryTab.Execute; WarningsTab := QueryTabs[QueryTabs.Count-1]; WarningsTab.Memo.Text := 'SHOW WARNINGS'; diff --git a/source/options.dfm b/source/options.dfm index d8b9729c..41d8b1f2 100644 --- a/source/options.dfm +++ b/source/options.dfm @@ -493,7 +493,7 @@ object optionsform: Toptionsform object lblSQLFontSize: TLabel Left = 689 Top = 11 - Width = 12 + Width = 10 Height = 13 Anchors = [akTop, akRight] Caption = 'pt' @@ -514,14 +514,14 @@ object optionsform: Toptionsform end object lblSQLColElement: TLabel Left = 8 - Top = 158 + Top = 165 Width = 42 Height = 13 Caption = 'Element:' end object lblSQLColBackground: TLabel Left = 489 - Top = 184 + Top = 191 Width = 60 Height = 13 Anchors = [akTop, akRight] @@ -529,7 +529,7 @@ object optionsform: Toptionsform end object lblSQLColForeground: TLabel Left = 489 - Top = 158 + Top = 165 Width = 60 Height = 13 Anchors = [akTop, akRight] @@ -621,7 +621,7 @@ object optionsform: Toptionsform Top = 61 Width = 41 Height = 21 - TabOrder = 8 + TabOrder = 9 Text = '1' OnChange = Modified end @@ -633,51 +633,41 @@ object optionsform: Toptionsform Associate = editMaxQueryResults Min = 1 Position = 1 - TabOrder = 9 + TabOrder = 10 OnChanging = anyUpDownLimitChanging end object comboSQLColElement: TComboBox Left = 67 - Top = 155 + Top = 162 Width = 407 Height = 21 Style = csDropDownList Anchors = [akLeft, akTop, akRight] - TabOrder = 10 + TabOrder = 11 OnChange = comboSQLColElementChange end object chkSQLBold: TCheckBox Left = 67 - Top = 182 + Top = 189 Width = 130 Height = 17 Caption = 'Bold' - TabOrder = 11 + TabOrder = 12 OnClick = SQLFontChange end object chkSQLItalic: TCheckBox Left = 203 - Top = 182 + Top = 189 Width = 271 Height = 17 Anchors = [akLeft, akTop, akRight] Caption = 'Italic' - TabOrder = 12 + TabOrder = 13 OnClick = SQLFontChange end object cboxSQLColForeground: TColorBox Left = 583 - Top = 155 - Width = 118 - Height = 22 - Style = [cbStandardColors, cbExtendedColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors] - Anchors = [akTop, akRight] - TabOrder = 13 - OnChange = SQLFontChange - end - object cboxSQLColBackground: TColorBox - Left = 583 - Top = 181 + Top = 162 Width = 118 Height = 22 Style = [cbStandardColors, cbExtendedColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors] @@ -685,12 +675,22 @@ object optionsform: Toptionsform TabOrder = 14 OnChange = SQLFontChange end + object cboxSQLColBackground: TColorBox + Left = 583 + Top = 188 + Width = 118 + Height = 22 + Style = [cbStandardColors, cbExtendedColors, cbIncludeNone, cbCustomColor, cbPrettyNames, cbCustomColors] + Anchors = [akTop, akRight] + TabOrder = 15 + OnChange = SQLFontChange + end object SynMemoSQLSample: TSynMemo AlignWithMargins = True Left = 8 - Top = 208 + Top = 215 Width = 693 - Height = 133 + Height = 132 Cursor = crHandPoint SingleLineMode = False Anchors = [akLeft, akTop, akRight, akBottom] @@ -699,8 +699,16 @@ object optionsform: Toptionsform Font.Height = -13 Font.Name = 'Courier New' Font.Style = [] - TabOrder = 15 + TabOrder = 16 OnClick = SynMemoSQLSampleClick + CodeFolding.GutterShapeSize = 11 + CodeFolding.CollapsedLineColor = clGrayText + CodeFolding.FolderBarLinesColor = clGrayText + CodeFolding.IndentGuidesColor = clGray + CodeFolding.IndentGuides = True + CodeFolding.ShowCollapsedLine = False + CodeFolding.ShowHintMark = True + UseCodeFolding = False Gutter.Font.Charset = DEFAULT_CHARSET Gutter.Font.Color = clWindowText Gutter.Font.Height = -11 @@ -719,6 +727,15 @@ object optionsform: Toptionsform OnChange = SQLFontChange FontSmoothing = fsmNone end + object chkQueryWarningsMessage: TCheckBox + Left = 8 + Top = 136 + Width = 691 + Height = 17 + Caption = 'Show query warnings dialog' + TabOrder = 8 + OnClick = Modified + end end object tabGridFormatting: TTabSheet Caption = 'Grid formatting' @@ -1069,7 +1086,7 @@ object optionsform: Toptionsform Left = 306 Top = 64 Width = 45 - Height = 13 + Height = 12 Anchors = [akLeft, akTop, akBottom] Caption = 'Shortcut:' end @@ -1077,7 +1094,7 @@ object optionsform: Toptionsform Left = 306 Top = 3 Width = 279 - Height = 55 + Height = 54 Anchors = [akLeft, akTop, akBottom] AutoSize = False Caption = 'Please select a shortcut item in the tree.' @@ -1087,7 +1104,7 @@ object optionsform: Toptionsform Left = 306 Top = 107 Width = 98 - Height = 13 + Height = 12 Anchors = [akLeft, akTop, akBottom] Caption = 'Secondary shortcut:' end diff --git a/source/options.pas b/source/options.pas index 061d52e1..1aff2a97 100644 --- a/source/options.pas +++ b/source/options.pas @@ -142,6 +142,7 @@ type Label3: TLabel; cboxRowHighlightSameText: TColorBox; chkWheelZoom: TCheckBox; + chkQueryWarningsMessage: TCheckBox; procedure FormShow(Sender: TObject); procedure Modified(Sender: TObject); procedure Apply(Sender: TObject); @@ -243,6 +244,7 @@ begin AppSettings.WriteBool(asAllowMultipleInstances, chkAllowMultiInstances.Checked); AppSettings.WriteBool(asRestoreLastUsedDB, chkRestoreLastDB.Checked); AppSettings.WriteBool(asPromptSaveFileOnTabClose, chkAskFileSave.Checked); + AppSettings.WriteBool(asQueryWarningsMessage, chkQueryWarningsMessage.Checked); AppSettings.WriteString(asFontName, comboSQLFontName.Text); AppSettings.WriteInt(asFontSize, updownSQLFontSize.Position); AppSettings.WriteInt(asTabWidth, updownSQLTabWidth.Position); @@ -489,6 +491,7 @@ begin updownGUIFontSize.Position := AppSettings.ReadInt(asGUIFontSize); comboGUIFont.OnChange(comboGUIFont); chkAskFileSave.Checked := AppSettings.ReadBool(asPromptSaveFileOnTabClose); + chkQueryWarningsMessage.Checked := AppSettings.ReadBool(asQueryWarningsMessage); // Logging updownLogLines.Position := AppSettings.ReadInt(asLogsqlnum);