mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Move heading panels from above grids to tab captions (hostname, database, table) and status bar (uptime, MySQL version). Makes space for coming GUI changes.
This commit is contained in:
@ -130,9 +130,9 @@ object MDIChild: TMDIChild
|
|||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
object PageControlHost: TPageControl
|
object PageControlHost: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 17
|
Top = 0
|
||||||
Width = 496
|
Width = 496
|
||||||
Height = 203
|
Height = 220
|
||||||
ActivePage = tabVariables
|
ActivePage = tabVariables
|
||||||
Align = alClient
|
Align = alClient
|
||||||
HotTrack = True
|
HotTrack = True
|
||||||
@ -144,7 +144,7 @@ object MDIChild: TMDIChild
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 25
|
Top = 25
|
||||||
Width = 488
|
Width = 488
|
||||||
Height = 150
|
Height = 167
|
||||||
Align = alClient
|
Align = alClient
|
||||||
DragOperations = []
|
DragOperations = []
|
||||||
Header.AutoSizeIndex = 1
|
Header.AutoSizeIndex = 1
|
||||||
@ -220,7 +220,7 @@ object MDIChild: TMDIChild
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 25
|
Top = 25
|
||||||
Width = 488
|
Width = 488
|
||||||
Height = 150
|
Height = 167
|
||||||
Align = alClient
|
Align = alClient
|
||||||
DragOperations = []
|
DragOperations = []
|
||||||
Header.AutoSizeIndex = 1
|
Header.AutoSizeIndex = 1
|
||||||
@ -294,7 +294,7 @@ object MDIChild: TMDIChild
|
|||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
object Splitter3: TSplitter
|
object Splitter3: TSplitter
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 102
|
Top = 119
|
||||||
Width = 488
|
Width = 488
|
||||||
Height = 4
|
Height = 4
|
||||||
Cursor = crSizeNS
|
Cursor = crSizeNS
|
||||||
@ -305,7 +305,7 @@ object MDIChild: TMDIChild
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 25
|
Top = 25
|
||||||
Width = 488
|
Width = 488
|
||||||
Height = 77
|
Height = 94
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Header.AutoSizeIndex = 7
|
Header.AutoSizeIndex = 7
|
||||||
Header.Font.Charset = DEFAULT_CHARSET
|
Header.Font.Charset = DEFAULT_CHARSET
|
||||||
@ -381,7 +381,7 @@ object MDIChild: TMDIChild
|
|||||||
end
|
end
|
||||||
object pnlProcessViewBox: TPanel
|
object pnlProcessViewBox: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 106
|
Top = 123
|
||||||
Width = 488
|
Width = 488
|
||||||
Height = 69
|
Height = 69
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
@ -455,7 +455,7 @@ object MDIChild: TMDIChild
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 488
|
Width = 488
|
||||||
Height = 175
|
Height = 192
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Header.AutoSizeIndex = 4
|
Header.AutoSizeIndex = 4
|
||||||
Header.Font.Charset = DEFAULT_CHARSET
|
Header.Font.Charset = DEFAULT_CHARSET
|
||||||
@ -520,51 +520,15 @@ object MDIChild: TMDIChild
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Panel4: TPanel
|
|
||||||
Left = 0
|
|
||||||
Top = 0
|
|
||||||
Width = 496
|
|
||||||
Height = 17
|
|
||||||
Align = alTop
|
|
||||||
Alignment = taLeftJustify
|
|
||||||
BevelOuter = bvNone
|
|
||||||
BorderWidth = 1
|
|
||||||
Caption = 'Host'
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clBlack
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
object tabDatabase: TTabSheet
|
object tabDatabase: TTabSheet
|
||||||
Caption = 'Database'
|
Caption = 'Database'
|
||||||
ImageIndex = 5
|
ImageIndex = 5
|
||||||
object pnlDatabaseTop: TPanel
|
|
||||||
Left = 0
|
|
||||||
Top = 0
|
|
||||||
Width = 496
|
|
||||||
Height = 17
|
|
||||||
Align = alTop
|
|
||||||
Alignment = taLeftJustify
|
|
||||||
BevelOuter = bvNone
|
|
||||||
BorderWidth = 1
|
|
||||||
Caption = 'Database'
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clBlack
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object ListTables: TVirtualStringTree
|
object ListTables: TVirtualStringTree
|
||||||
Left = 28
|
Left = 28
|
||||||
Top = 17
|
Top = 0
|
||||||
Width = 468
|
Width = 468
|
||||||
Height = 203
|
Height = 220
|
||||||
Align = alClient
|
Align = alClient
|
||||||
EditDelay = 500
|
EditDelay = 500
|
||||||
Header.AutoSizeIndex = -1
|
Header.AutoSizeIndex = -1
|
||||||
@ -583,7 +547,7 @@ object MDIChild: TMDIChild
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
PopupMenu = popupDbGrid
|
PopupMenu = popupDbGrid
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 1
|
TabOrder = 0
|
||||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoSort, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoSort, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||||
TreeOptions.MiscOptions = [toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
TreeOptions.MiscOptions = [toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||||
TreeOptions.PaintOptions = [toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages]
|
TreeOptions.PaintOptions = [toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages]
|
||||||
@ -717,12 +681,12 @@ object MDIChild: TMDIChild
|
|||||||
end
|
end
|
||||||
object pnlDatabaseToolbar: TPanel
|
object pnlDatabaseToolbar: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 17
|
Top = 0
|
||||||
Width = 28
|
Width = 28
|
||||||
Height = 203
|
Height = 220
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 2
|
TabOrder = 1
|
||||||
object tlbDataLeft1: TToolBar
|
object tlbDataLeft1: TToolBar
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 1
|
Top = 1
|
||||||
@ -801,32 +765,14 @@ object MDIChild: TMDIChild
|
|||||||
object tabTable: TTabSheet
|
object tabTable: TTabSheet
|
||||||
Caption = 'Table'
|
Caption = 'Table'
|
||||||
ImageIndex = 14
|
ImageIndex = 14
|
||||||
object pnlTableTop: TPanel
|
|
||||||
Left = 0
|
|
||||||
Top = 0
|
|
||||||
Width = 496
|
|
||||||
Height = 17
|
|
||||||
Align = alTop
|
|
||||||
Alignment = taLeftJustify
|
|
||||||
BevelOuter = bvNone
|
|
||||||
BorderWidth = 1
|
|
||||||
Caption = 'Table-Properties'
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
|
||||||
Font.Color = clBlack
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object pnlTableToolbar: TPanel
|
object pnlTableToolbar: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 17
|
Top = 0
|
||||||
Width = 28
|
Width = 28
|
||||||
Height = 203
|
Height = 220
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 1
|
TabOrder = 0
|
||||||
object tlbTableLeft1: TToolBar
|
object tlbTableLeft1: TToolBar
|
||||||
Left = 2
|
Left = 2
|
||||||
Top = 1
|
Top = 1
|
||||||
@ -908,9 +854,9 @@ object MDIChild: TMDIChild
|
|||||||
end
|
end
|
||||||
object ListColumns: TVirtualStringTree
|
object ListColumns: TVirtualStringTree
|
||||||
Left = 28
|
Left = 28
|
||||||
Top = 17
|
Top = 0
|
||||||
Width = 468
|
Width = 468
|
||||||
Height = 203
|
Height = 220
|
||||||
Align = alClient
|
Align = alClient
|
||||||
EditDelay = 500
|
EditDelay = 500
|
||||||
Header.AutoSizeIndex = -1
|
Header.AutoSizeIndex = -1
|
||||||
@ -927,7 +873,7 @@ object MDIChild: TMDIChild
|
|||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
PopupMenu = popupTableGrid
|
PopupMenu = popupTableGrid
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 2
|
TabOrder = 1
|
||||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||||
TreeOptions.PaintOptions = [toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages]
|
TreeOptions.PaintOptions = [toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toThemeAware, toUseBlendedImages]
|
||||||
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect, toRightClickSelect]
|
TreeOptions.SelectionOptions = [toFullRowSelect, toMultiSelect, toRightClickSelect]
|
||||||
@ -1118,7 +1064,6 @@ object MDIChild: TMDIChild
|
|||||||
Alignment = taLeftJustify
|
Alignment = taLeftJustify
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
BorderWidth = 1
|
BorderWidth = 1
|
||||||
Caption = 'SQL-Query:'
|
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clBlack
|
Font.Color = clBlack
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
|
@ -47,9 +47,7 @@ type
|
|||||||
tabQuery: TTabSheet;
|
tabQuery: TTabSheet;
|
||||||
popupTreeView: TPopupMenu;
|
popupTreeView: TPopupMenu;
|
||||||
menuRefreshDBTree: TMenuItem;
|
menuRefreshDBTree: TMenuItem;
|
||||||
pnlDatabaseTop: TPanel;
|
|
||||||
tabTable: TTabSheet;
|
tabTable: TTabSheet;
|
||||||
pnlTableTop: TPanel;
|
|
||||||
popupDbGrid: TPopupMenu;
|
popupDbGrid: TPopupMenu;
|
||||||
menuviewdata: TMenuItem;
|
menuviewdata: TMenuItem;
|
||||||
menuproperties: TMenuItem;
|
menuproperties: TMenuItem;
|
||||||
@ -66,7 +64,6 @@ type
|
|||||||
NewDatabase1: TMenuItem;
|
NewDatabase1: TMenuItem;
|
||||||
ListTables: TVirtualStringTree;
|
ListTables: TVirtualStringTree;
|
||||||
Refresh1: TMenuItem;
|
Refresh1: TMenuItem;
|
||||||
Panel4: TPanel;
|
|
||||||
pnlDataTop: TPanel;
|
pnlDataTop: TPanel;
|
||||||
pnlQueryTop: TPanel;
|
pnlQueryTop: TPanel;
|
||||||
menurefresh: TMenuItem;
|
menurefresh: TMenuItem;
|
||||||
@ -560,8 +557,6 @@ type
|
|||||||
var ImageIndex: Integer);
|
var ImageIndex: Integer);
|
||||||
|
|
||||||
private
|
private
|
||||||
strHostRunning : String;
|
|
||||||
strHostNotRunning : String;
|
|
||||||
uptime : Integer;
|
uptime : Integer;
|
||||||
time_connected : Cardinal;
|
time_connected : Cardinal;
|
||||||
viewingdata : Boolean;
|
viewingdata : Boolean;
|
||||||
@ -740,8 +735,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
rx.Free;
|
rx.Free;
|
||||||
mysql_version := MakeInt(v1) *10000 + MakeInt(v2) *100 + MakeInt(v3);
|
mysql_version := MakeInt(v1) *10000 + MakeInt(v2) *100 + MakeInt(v3);
|
||||||
strHostRunning := FConn.MysqlParams.Host + ' running MySQL-Version ' + v + ' / Uptime: %s';
|
tabHost.Caption := 'Host: '+MySQLConn.Connection.HostName;
|
||||||
strHostNotRunning := 'Disconnected from ' + FConn.MysqlParams.Host + '.';
|
Mainform.showstatus('MySQL '+v1+'.'+v2+'.'+v3, 2);
|
||||||
|
|
||||||
// On Re-Connection, try to restore lost properties
|
// On Re-Connection, try to restore lost properties
|
||||||
if FMysqlConn.Connection.Database <> '' then
|
if FMysqlConn.Connection.Database <> '' then
|
||||||
@ -824,7 +819,7 @@ begin
|
|||||||
FConn.MysqlConn := FMysqlConn.Connection; // use this connection (instead of zConn)
|
FConn.MysqlConn := FMysqlConn.Connection; // use this connection (instead of zConn)
|
||||||
|
|
||||||
// Initialization: establish connection and read some vars from registry
|
// Initialization: establish connection and read some vars from registry
|
||||||
MainForm.Showstatus( 'Creating window...', 2 );
|
MainForm.Showstatus( 'Creating window...' );
|
||||||
|
|
||||||
// Temporarily disable AutoReconnect in Registry
|
// Temporarily disable AutoReconnect in Registry
|
||||||
// in case of unexpected application-termination
|
// in case of unexpected application-termination
|
||||||
@ -839,7 +834,7 @@ begin
|
|||||||
|
|
||||||
ReadWindowOptions();
|
ReadWindowOptions();
|
||||||
|
|
||||||
MainForm.Showstatus( 'Connecting to ' + FConn.MysqlParams.Host + '...', 2 );
|
MainForm.Showstatus( 'Connecting to ' + FConn.MysqlParams.Host + '...' );
|
||||||
|
|
||||||
try
|
try
|
||||||
PerformConnect();
|
PerformConnect();
|
||||||
@ -1291,7 +1286,6 @@ begin
|
|||||||
tabTable.TabVisible := false;
|
tabTable.TabVisible := false;
|
||||||
tabData.TabVisible := false;
|
tabData.TabVisible := false;
|
||||||
|
|
||||||
pnlTableTop.Caption := 'Table-Properties';
|
|
||||||
Caption := SessionName + ' - /' + db;
|
Caption := SessionName + ' - /' + db;
|
||||||
ShowDBProperties( db );
|
ShowDBProperties( db );
|
||||||
end;
|
end;
|
||||||
@ -1390,7 +1384,7 @@ begin
|
|||||||
// Switch to <Data>
|
// Switch to <Data>
|
||||||
PageControlMain.ActivePage := tabData;
|
PageControlMain.ActivePage := tabData;
|
||||||
|
|
||||||
MainForm.ShowStatus( 'Retrieving data...', 2 );
|
MainForm.ShowStatus( 'Retrieving data...' );
|
||||||
|
|
||||||
// Read columns to display from registry
|
// Read columns to display from registry
|
||||||
reg_value := Mainform.GetRegValue(REGNAME_DISPLAYEDCOLUMNS + '_' + ActiveDatabase + '.' + SelectedTable, '', SessionName);
|
reg_value := Mainform.GetRegValue(REGNAME_DISPLAYEDCOLUMNS + '_' + ActiveDatabase + '.' + SelectedTable, '', SessionName);
|
||||||
@ -1459,7 +1453,7 @@ begin
|
|||||||
SynMemoFilter.Color := clWindow;
|
SynMemoFilter.Color := clWindow;
|
||||||
ds := GetResults(sl_query.Text, false);
|
ds := GetResults(sl_query.Text, false);
|
||||||
|
|
||||||
MainForm.ShowStatus( 'Filling grid with record-data...', 2 );
|
MainForm.ShowStatus( 'Filling grid with record-data...' );
|
||||||
ds.DisableControls();
|
ds.DisableControls();
|
||||||
DataSource1.DataSet := ds;
|
DataSource1.DataSet := ds;
|
||||||
|
|
||||||
@ -1481,13 +1475,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
SynMemoFilter.Color := $008080FF; // light pink
|
SynMemoFilter.Color := $008080FF; // light pink
|
||||||
MessageDlg( E.Message, mtError, [mbOK], 0 );
|
MessageDlg( E.Message, mtError, [mbOK], 0 );
|
||||||
MainForm.ShowStatus( STATUS_MSG_READY, 2 );
|
MainForm.ShowStatus( STATUS_MSG_READY );
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
MainForm.ShowStatus( STATUS_MSG_READY, 2 );
|
MainForm.ShowStatus( STATUS_MSG_READY );
|
||||||
|
|
||||||
if DataSource1.DataSet <> nil then begin
|
if DataSource1.DataSet <> nil then begin
|
||||||
for i := 0 to Length(VTRowDataListColumns) - 1 do
|
for i := 0 to Length(VTRowDataListColumns) - 1 do
|
||||||
@ -1669,10 +1663,6 @@ begin
|
|||||||
viewdata(Sender);
|
viewdata(Sender);
|
||||||
if PageControlMain.ActivePage = tabQuery then
|
if PageControlMain.ActivePage = tabQuery then
|
||||||
begin
|
begin
|
||||||
if ActiveDatabase <> '' then
|
|
||||||
pnlQueryTop.Caption := 'SQL-Query on Database ' + ActiveDatabase + ':'
|
|
||||||
else
|
|
||||||
pnlQueryTop.Caption := 'SQL-Query on Host ' + FConn.MysqlParams.Host + ':';
|
|
||||||
// Manually invoke OnChange event of tabset to fill helper list with data
|
// Manually invoke OnChange event of tabset to fill helper list with data
|
||||||
tabsetQueryHelpers.OnChange( Sender, tabsetQueryHelpers.TabIndex, dummy);
|
tabsetQueryHelpers.OnChange( Sender, tabsetQueryHelpers.TabIndex, dummy);
|
||||||
end;
|
end;
|
||||||
@ -1733,7 +1723,7 @@ begin
|
|||||||
// Not in cache, load table list.
|
// Not in cache, load table list.
|
||||||
OldCursor := Screen.Cursor;
|
OldCursor := Screen.Cursor;
|
||||||
Screen.Cursor := crHourGlass;
|
Screen.Cursor := crHourGlass;
|
||||||
MainForm.ShowStatus('Fetching tables from "' + db + '" ...', 2);
|
MainForm.ShowStatus('Fetching tables from "' + db + '" ...');
|
||||||
if (mysql_version >= 32300) and (not prefPreferShowTables) then begin
|
if (mysql_version >= 32300) and (not prefPreferShowTables) then begin
|
||||||
ds := GetResults('SHOW TABLE STATUS FROM ' + mask(db), false, false);
|
ds := GetResults('SHOW TABLE STATUS FROM ' + mask(db), false, false);
|
||||||
end else begin
|
end else begin
|
||||||
@ -1744,7 +1734,7 @@ begin
|
|||||||
// SELECT COUNT(*), but that would potentially be rather slow.
|
// SELECT COUNT(*), but that would potentially be rather slow.
|
||||||
end;
|
end;
|
||||||
CachedTableLists.AddObject(db, ds);
|
CachedTableLists.AddObject(db, ds);
|
||||||
MainForm.ShowStatus(STATUS_MSG_READY, 2);
|
MainForm.ShowStatus(STATUS_MSG_READY);
|
||||||
Screen.Cursor := OldCursor;
|
Screen.Cursor := OldCursor;
|
||||||
end;
|
end;
|
||||||
Result := TDataSet(CachedTableLists.Objects[CachedTableLists.IndexOf(db)]);
|
Result := TDataSet(CachedTableLists.Objects[CachedTableLists.IndexOf(db)]);
|
||||||
@ -1822,7 +1812,7 @@ begin
|
|||||||
|
|
||||||
try
|
try
|
||||||
ds := FetchDbTableList(db);
|
ds := FetchDbTableList(db);
|
||||||
MainForm.ShowStatus( 'Displaying tables from "' + db + '" ...', 2 );
|
MainForm.ShowStatus( 'Displaying tables from "' + db + '" ...' );
|
||||||
|
|
||||||
ListTables.BeginUpdate;
|
ListTables.BeginUpdate;
|
||||||
ListTables.Clear;
|
ListTables.Clear;
|
||||||
@ -1946,11 +1936,11 @@ begin
|
|||||||
ListTables.RootNodeCount := Length(VTRowDataListTables);
|
ListTables.RootNodeCount := Length(VTRowDataListTables);
|
||||||
ListTables.EndUpdate;
|
ListTables.EndUpdate;
|
||||||
SetVTSelection(ListTables, SelectedCaptions);
|
SetVTSelection(ListTables, SelectedCaptions);
|
||||||
Mainform.showstatus(db + ': ' + IntToStr(ListTables.RootNodeCount) +' table(s)');
|
Mainform.showstatus(db + ': ' + IntToStr(ListTables.RootNodeCount) +' table(s)', 0);
|
||||||
pnlDatabaseTop.Caption := 'Database ' + db + ': ' + IntToStr(ListTables.RootNodeCount) + ' table(s)';
|
tabDatabase.Caption := sstr('Database: ' + db, 30);
|
||||||
// Ensure tree db node displays its chidren initialized
|
// Ensure tree db node displays its chidren initialized
|
||||||
DBtree.ReinitChildren(FindDBNode(db), False);
|
DBtree.ReinitChildren(FindDBNode(db), False);
|
||||||
MainForm.ShowStatus(STATUS_MSG_READY, 2);
|
MainForm.ShowStatus(STATUS_MSG_READY);
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1961,7 +1951,7 @@ procedure TMDIChild.ShowDBProperties(db: string);
|
|||||||
begin
|
begin
|
||||||
Screen.Cursor := crHourglass;
|
Screen.Cursor := crHourglass;
|
||||||
pcChange( Self );
|
pcChange( Self );
|
||||||
MainForm.ShowStatus( STATUS_MSG_READY, 2 );
|
MainForm.ShowStatus( STATUS_MSG_READY );
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1995,9 +1985,9 @@ begin
|
|||||||
tabTable.TabVisible := true;
|
tabTable.TabVisible := true;
|
||||||
tabData.TabVisible := true;
|
tabData.TabVisible := true;
|
||||||
|
|
||||||
pnlTableTop.Caption := 'Table-Properties for ' + ActiveDatabase + ': ' + table;
|
tabTable.Caption := sstr('Table: ' + table, 30);
|
||||||
|
|
||||||
MainForm.ShowStatus( 'Reading table properties...', 2 );
|
MainForm.ShowStatus( 'Reading table properties...' );
|
||||||
// Remember selected nodes
|
// Remember selected nodes
|
||||||
SelectedCaptions := GetVTCaptions(ListColumns, True);
|
SelectedCaptions := GetVTCaptions(ListColumns, True);
|
||||||
ListColumns.BeginUpdate;
|
ListColumns.BeginUpdate;
|
||||||
@ -2117,8 +2107,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
pcChange( Self );
|
pcChange( Self );
|
||||||
MainForm.ShowStatus( STATUS_MSG_READY, 2 );
|
MainForm.ShowStatus( STATUS_MSG_READY );
|
||||||
MainForm.showstatus(ActiveDatabase + ': '+ table + ': ' + IntToStr(ListColumns.RootNodeCount) +' field(s)');
|
MainForm.showstatus(ActiveDatabase + ': '+ table + ': ' + IntToStr(ListColumns.RootNodeCount) +' field(s)', 0);
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2263,9 +2253,11 @@ begin
|
|||||||
btnSQLHelp.Enabled := (mysql_version >= 40100) and FrmIsFocussed;
|
btnSQLHelp.Enabled := (mysql_version >= 40100) and FrmIsFocussed;
|
||||||
menuSQLHelp.Enabled := btnSQLHelp.Enabled and FrmIsFocussed;
|
menuSQLHelp.Enabled := btnSQLHelp.Enabled and FrmIsFocussed;
|
||||||
|
|
||||||
if not FrmIsFocussed then
|
if not FrmIsFocussed then begin
|
||||||
begin
|
// Empty "connected" and "uptime"
|
||||||
MainForm.showstatus('', 1); // empty connected_time
|
MainForm.showstatus('', 1);
|
||||||
|
MainForm.showstatus('', 2);
|
||||||
|
MainForm.showstatus('', 3);
|
||||||
end;
|
end;
|
||||||
tabEditors.tabVisible := inDataOrQueryTab;
|
tabEditors.tabVisible := inDataOrQueryTab;
|
||||||
end;
|
end;
|
||||||
@ -2650,7 +2642,7 @@ begin
|
|||||||
|
|
||||||
ds := nil;
|
ds := nil;
|
||||||
try
|
try
|
||||||
MainForm.showstatus( 'Initializing SQL...', 2 );
|
MainForm.showstatus( 'Initializing SQL...' );
|
||||||
Mainform.ExecuteQuery.Enabled := false;
|
Mainform.ExecuteQuery.Enabled := false;
|
||||||
Mainform.ExecuteSelection.Enabled := false;
|
Mainform.ExecuteSelection.Enabled := false;
|
||||||
|
|
||||||
@ -2664,7 +2656,7 @@ begin
|
|||||||
ProgressBarQuery.Position := 0;
|
ProgressBarQuery.Position := 0;
|
||||||
ProgressBarQuery.Show();
|
ProgressBarQuery.Show();
|
||||||
|
|
||||||
MainForm.showstatus( 'Executing SQL...', 2 );
|
MainForm.showstatus( 'Executing SQL...' );
|
||||||
for i := 0 to (SQL.Count - 1) do
|
for i := 0 to (SQL.Count - 1) do
|
||||||
begin
|
begin
|
||||||
ProgressBarQuery.StepIt();
|
ProgressBarQuery.StepIt();
|
||||||
@ -2772,7 +2764,7 @@ begin
|
|||||||
TZQuery(ds).EnableControls();
|
TZQuery(ds).EnableControls();
|
||||||
end;
|
end;
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
MainForm.ShowStatus( STATUS_MSG_READY, 2 );
|
MainForm.ShowStatus( STATUS_MSG_READY );
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3058,9 +3050,9 @@ begin
|
|||||||
|
|
||||||
inc(uptime);
|
inc(uptime);
|
||||||
msg := Format('%d days, %.2d:%.2d:%.2d', [days,hours,minutes,seconds]);
|
msg := Format('%d days, %.2d:%.2d:%.2d', [days,hours,minutes,seconds]);
|
||||||
if TimerHostUptime.Enabled then msg := Format(strHostRunning, [msg])
|
if TimerHostUptime.Enabled then msg := Format('Uptime: %s', [msg])
|
||||||
else msg := Format(strHostNotRunning, [msg]);
|
else msg := '';
|
||||||
Panel4.Caption := msg;
|
Mainform.showstatus(msg, 3);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -3312,7 +3304,7 @@ begin
|
|||||||
// can't connect -> close MDI-Child
|
// can't connect -> close MDI-Child
|
||||||
TimerConnectErrorCloseWindow.Enabled := false;
|
TimerConnectErrorCloseWindow.Enabled := false;
|
||||||
Mainform.Showstatus('', 1);
|
Mainform.Showstatus('', 1);
|
||||||
MainForm.ShowStatus( STATUS_MSG_READY, 2 );
|
MainForm.ShowStatus( STATUS_MSG_READY );
|
||||||
close;
|
close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -4851,7 +4843,8 @@ begin
|
|||||||
|
|
||||||
MainForm.showstatus('Image: ' + IntToStr( EDBImage1.Picture.width)
|
MainForm.showstatus('Image: ' + IntToStr( EDBImage1.Picture.width)
|
||||||
+ ' x ' + IntToStr( EDBImage1.Picture.Height ) + ' pixel, '
|
+ ' x ' + IntToStr( EDBImage1.Picture.Height ) + ' pixel, '
|
||||||
+ 'zoomed to ' + IntToStr(Round( 100 / EDBImage1.Picture.Height * EDBImage1.Height )) + '%'
|
+ 'zoomed to ' + IntToStr(Round( 100 / EDBImage1.Picture.Height * EDBImage1.Height )) + '%',
|
||||||
|
0
|
||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -6753,7 +6746,7 @@ begin
|
|||||||
// Root node has only one single child (user@host)
|
// Root node has only one single child (user@host)
|
||||||
0: begin
|
0: begin
|
||||||
Screen.Cursor := crSQLWait;
|
Screen.Cursor := crSQLWait;
|
||||||
mainform.Showstatus( 'Reading Databases...', 2 );
|
mainform.Showstatus( 'Reading Databases...' );
|
||||||
Databases := TStringList.Create;
|
Databases := TStringList.Create;
|
||||||
if DatabasesWanted.Count = 0 then begin
|
if DatabasesWanted.Count = 0 then begin
|
||||||
ds := GetResults( 'SHOW DATABASES' );
|
ds := GetResults( 'SHOW DATABASES' );
|
||||||
@ -6772,7 +6765,7 @@ begin
|
|||||||
Databases.Insert( 0, specialDbs[i] );
|
Databases.Insert( 0, specialDbs[i] );
|
||||||
end else
|
end else
|
||||||
Databases.AddStrings(DatabasesWanted);
|
Databases.AddStrings(DatabasesWanted);
|
||||||
Mainform.showstatus( IntToStr( Databases.Count ) + ' Databases' );
|
Mainform.showstatus( IntToStr( Databases.Count ) + ' Databases', 0 );
|
||||||
ChildCount := Databases.Count;
|
ChildCount := Databases.Count;
|
||||||
// Avoids excessive InitializeKeywordLists() calls.
|
// Avoids excessive InitializeKeywordLists() calls.
|
||||||
SynSQLSyn1.TableNames.BeginUpdate;
|
SynSQLSyn1.TableNames.BeginUpdate;
|
||||||
@ -6781,7 +6774,7 @@ begin
|
|||||||
// TODO: Is this right? Adding "<db name>.<table name>" seems to make more sense..
|
// TODO: Is this right? Adding "<db name>.<table name>" seems to make more sense..
|
||||||
SynSQLSyn1.TableNames.AddStrings( Databases );
|
SynSQLSyn1.TableNames.AddStrings( Databases );
|
||||||
SynSQLSyn1.TableNames.EndUpdate;
|
SynSQLSyn1.TableNames.EndUpdate;
|
||||||
MainForm.ShowStatus( STATUS_MSG_READY, 2 );
|
MainForm.ShowStatus( STATUS_MSG_READY );
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
// DB node expanding
|
// DB node expanding
|
||||||
|
@ -192,7 +192,7 @@ begin
|
|||||||
TimerCloseFormReminder.Enabled := true;
|
TimerCloseFormReminder.Enabled := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
MainForm.ShowStatus( STATUS_MSG_READY, 2 );
|
MainForm.ShowStatus( STATUS_MSG_READY );
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,13 @@ object MainForm: TMainForm
|
|||||||
Width = 130
|
Width = 130
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Width = 280
|
Width = 90
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 150
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 250
|
||||||
end>
|
end>
|
||||||
end
|
end
|
||||||
object ControlBar1: TControlBar
|
object ControlBar1: TControlBar
|
||||||
|
@ -185,7 +185,7 @@ type
|
|||||||
procedure Copy2CSVExecute(Sender: TObject);
|
procedure Copy2CSVExecute(Sender: TObject);
|
||||||
procedure PrintListExecute(Sender: TObject);
|
procedure PrintListExecute(Sender: TObject);
|
||||||
procedure CopyTableExecute(Sender: TObject);
|
procedure CopyTableExecute(Sender: TObject);
|
||||||
procedure showstatus(msg: string=''; panel: Integer=0);
|
procedure showstatus(msg: string=''; panel: Integer=4);
|
||||||
procedure ButtonOKClick(Sender: TObject);
|
procedure ButtonOKClick(Sender: TObject);
|
||||||
procedure LimitPanelEnter(Sender: TObject);
|
procedure LimitPanelEnter(Sender: TObject);
|
||||||
procedure LimitPanelExit(Sender: TObject);
|
procedure LimitPanelExit(Sender: TObject);
|
||||||
@ -332,7 +332,7 @@ begin
|
|||||||
ChildWin.ExecuteNonQuery(query);
|
ChildWin.ExecuteNonQuery(query);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.showstatus(msg: string=''; panel: Integer=0);
|
procedure TMainForm.showstatus(msg: string=''; panel: Integer=4);
|
||||||
begin
|
begin
|
||||||
// show Message in statusbar
|
// show Message in statusbar
|
||||||
StatusBar.Panels[panel].Text := msg;
|
StatusBar.Panels[panel].Text := msg;
|
||||||
@ -685,8 +685,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.FormResize(Sender: TObject);
|
procedure TMainForm.FormResize(Sender: TObject);
|
||||||
|
var
|
||||||
|
i, room: Integer;
|
||||||
begin
|
begin
|
||||||
StatusBar.Panels[0].Width := (width - StatusBar.Panels[1].Width) - StatusBar.Panels[2].Width;
|
room := 0;
|
||||||
|
for i := 1 to Statusbar.Panels.Count - 1 do
|
||||||
|
inc(room, Statusbar.Panels[i].Width);
|
||||||
|
StatusBar.Panels[0].Width := Statusbar.Width - room;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.UserManagerExecute(Sender: TObject);
|
procedure TMainForm.UserManagerExecute(Sender: TObject);
|
||||||
@ -1035,7 +1040,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Screen.Cursor := crHourGlass;
|
Screen.Cursor := crHourGlass;
|
||||||
showstatus('Saving contents to file...', 2);
|
showstatus('Saving contents to file...');
|
||||||
GetTempPath(MAX_PATH, buffer);
|
GetTempPath(MAX_PATH, buffer);
|
||||||
if g.SelectedField.IsBlob and (pos('JFIF', copy(g.SelectedField.AsString, 0, 20)) <> 0) then
|
if g.SelectedField.IsBlob and (pos('JFIF', copy(g.SelectedField.AsString, 0, 20)) <> 0) then
|
||||||
extension := 'jpg'
|
extension := 'jpg'
|
||||||
@ -1051,7 +1056,7 @@ begin
|
|||||||
Rewrite(f);
|
Rewrite(f);
|
||||||
Write(f, g.SelectedField.AsString);
|
Write(f, g.SelectedField.AsString);
|
||||||
CloseFile(f);
|
CloseFile(f);
|
||||||
ShowStatus( STATUS_MSG_READY, 2 );
|
ShowStatus( STATUS_MSG_READY );
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
ShellExec( filename );
|
ShellExec( filename );
|
||||||
end;
|
end;
|
||||||
@ -1328,7 +1333,7 @@ begin
|
|||||||
FreeAndNil (mysqlconn);
|
FreeAndNil (mysqlconn);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ShowStatus( STATUS_MSG_READY, 2 );
|
ShowStatus( STATUS_MSG_READY );
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.actDataSetDeleteExecute(Sender: TObject);
|
procedure TMainForm.actDataSetDeleteExecute(Sender: TObject);
|
||||||
|
Reference in New Issue
Block a user