mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Add support for Windows 7 task button progress. Unify all callers of ProgressBarStatus in a set of 5 functions in main unit instead of helpers, as this is where the progress bar is placed and also we need the handle of the main window.
This commit is contained in:
@ -542,11 +542,11 @@ begin
|
||||
end;
|
||||
|
||||
// Update columns
|
||||
EnableProgressBar(FColumns.Count + DeletedKeys.Count + FKeys.Count);
|
||||
MainForm.EnableProgress(FColumns.Count + DeletedKeys.Count + FKeys.Count);
|
||||
Node := listColumns.GetFirst;
|
||||
PreviousCol := nil;
|
||||
while Assigned(Node) do begin
|
||||
Mainform.ProgressBarStatus.StepIt;
|
||||
Mainform.ProgressStep;
|
||||
Col := listColumns.GetNodeData(Node);
|
||||
if Col.Status <> esUntouched then begin
|
||||
ColSpec := DBObject.Connection.QuoteIdent(Col.Name);
|
||||
@ -602,7 +602,7 @@ begin
|
||||
|
||||
// Drop indexes, also changed indexes, which will be readded below
|
||||
for i:=0 to DeletedKeys.Count-1 do begin
|
||||
Mainform.ProgressBarStatus.StepIt;
|
||||
Mainform.ProgressStep;
|
||||
if DeletedKeys[i] = PKEY then
|
||||
IndexSQL := 'PRIMARY KEY'
|
||||
else
|
||||
@ -611,7 +611,7 @@ begin
|
||||
end;
|
||||
// Add changed or added indexes
|
||||
for i:=0 to FKeys.Count-1 do begin
|
||||
Mainform.ProgressBarStatus.StepIt;
|
||||
Mainform.ProgressStep;
|
||||
if FKeys[i].Modified and (not FKeys[i].Added) then begin
|
||||
if FKeys[i].OldIndexType = PKEY then
|
||||
IndexSQL := 'PRIMARY KEY'
|
||||
@ -634,7 +634,7 @@ begin
|
||||
|
||||
FreeAndNil(Specs);
|
||||
Mainform.ShowStatusMsg;
|
||||
Mainform.ProgressBarStatus.Hide;
|
||||
MainForm.DisableProgress;
|
||||
Screen.Cursor := crDefault;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user