Permalink
Browse files

Move the dedicated help button on the SQL export tab to the window ti…

…tle bar. See #228.
  • Loading branch information...
ansgarbecker committed Nov 26, 2018
1 parent 7878864 commit 201f8da8e334496e0198f7095da7b73104c02f25
Showing with 31 additions and 21 deletions.
  1. +4 −1 out/locale/en/LC_MESSAGES/default.po
  2. +2 −11 source/tabletools.dfm
  3. +25 −9 source/tabletools.pas
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: HeidiSQL\n"
"POT-Creation-Date: 2012-11-05 21:40\n"
"PO-Revision-Date: 2018-11-13 19:14+0100\n"
"PO-Revision-Date: 2018-11-26 16:37+0100\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"
@@ -6269,3 +6269,6 @@ msgstr "Current custom settings"
msgid "current value:"
msgstr "current value:"
msgid "No help available for this tab."
msgstr "No help available for this tab."
@@ -1,6 +1,7 @@
object frmTableTools: TfrmTableTools
Left = 734
Top = 126
BorderIcons = [biSystemMenu, biHelp]
Caption = 'Table tools'
ClientHeight = 383
ClientWidth = 764
@@ -506,16 +507,6 @@ object frmTableTools: TfrmTableTools
TabOrder = 6
Wrap = True
end
object btnHelpSQLExport: TButton
Left = 514
Top = 3
Width = 75
Height = 25
Anchors = [akTop, akRight]
Caption = 'Help'
TabOrder = 10
OnClick = btnHelpSQLExportClick
end
object btnExportOptions: TButton
Left = 464
Top = 72
@@ -525,7 +516,7 @@ object frmTableTools: TfrmTableTools
Caption = 'Options'
DropDownMenu = popupExportOptions
Style = bsSplitButton
TabOrder = 11
TabOrder = 10
OnClick = btnExportOptionsClick
end
end
@@ -11,7 +11,7 @@ interface
uses
Windows, SysUtils, Classes, Controls, Forms, StdCtrls, ComCtrls, Buttons, Dialogs, StdActns,
VirtualTrees, ExtCtrls, Graphics, SynRegExpr, Math, Generics.Collections, extra_controls,
dbconnection, apphelpers, Menus, gnugettext, DateUtils, System.Zip, System.UITypes, StrUtils;
dbconnection, apphelpers, Menus, gnugettext, DateUtils, System.Zip, System.UITypes, StrUtils, Messages;
type
TToolMode = (tmMaintenance, tmFind, tmSQLExport, tmBulkTableEdit);
@@ -76,7 +76,6 @@ TfrmTableTools = class(TFormWithSizeGrip)
editInsertSize: TEdit;
updownInsertSize: TUpDown;
lblInsertSizeUnit: TLabel;
btnHelpSQLExport: TButton;
btnExportOptions: TButton;
popupExportOptions: TPopupMenu;
menuExportAddComments: TMenuItem;
@@ -131,7 +130,6 @@ TfrmTableTools = class(TFormWithSizeGrip)
var ContentRect: TRect);
procedure CheckAllClick(Sender: TObject);
procedure TreeObjectsExpanded(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure btnHelpSQLExportClick(Sender: TObject);
procedure btnExportOptionsClick(Sender: TObject);
private
{ Private declarations }
@@ -150,6 +148,8 @@ TfrmTableTools = class(TFormWithSizeGrip)
FFindSeeResultSQL: TStringList;
ToFile, ToDir, ToClipboard, ToDb, ToServer: Boolean;
FObjectSizes, FObjectSizesDone, FObjectSizesDoneExact: Int64;
procedure WMNCLBUTTONDOWN(var Msg: TWMNCLButtonDown) ; message WM_NCLBUTTONDOWN;
procedure WMNCLBUTTONUP(var Msg: TWMNCLButtonUp) ; message WM_NCLBUTTONUP;
procedure SetToolMode(Value: TToolMode);
procedure Output(SQL: String; IsEndOfQuery, ForFile, ForDir, ForDb, ForServer: Boolean);
procedure AddResults(SQL: String; Connection: TDBConnection);
@@ -194,6 +194,28 @@ implementation
{$R *.DFM}
procedure TfrmTableTools.WMNCLBUTTONDOWN(var Msg: TWMNCLButtonDown) ;
begin
if Msg.HitTest = HTHELP then
Msg.Result := 0 // "eat" the message
else
inherited;
end;
procedure TfrmTableTools.WMNCLBUTTONUP(var Msg: TWMNCLButtonUp) ;
begin
if Msg.HitTest = HTHELP then begin
Msg.Result := 0;
if tabsTools.ActivePage = tabSQLexport then
Help(Self, 'sqlexport')
else
ErrorDialog(_('No help available for this tab.'));
end else
inherited;
end;
procedure TfrmTableTools.FormCreate(Sender: TObject);
var
i: Integer;
@@ -577,12 +599,6 @@ procedure TfrmTableTools.btnHelpMaintenanceClick(Sender: TObject);
end;
procedure TfrmTableTools.btnHelpSQLExportClick(Sender: TObject);
begin
Help(Sender, 'sqlexport');
end;
procedure TfrmTableTools.Execute(Sender: TObject);
var
SessionNode, DBNode: PVirtualNode;

0 comments on commit 201f8da

Please sign in to comment.