Преглед изворни кода

UPD: Use BeginWaitCursor / EndWaitCursor

Alexander Koblov пре 2 година
родитељ
комит
8062c9b330
3 измењених фајлова са 6 додато и 10 уклоњено
  1. 2 2
      src/fdiffer.pas
  2. 2 4
      src/frames/foptionsdirectoryhotlist.pas
  3. 2 4
      src/uhotdir.pas

+ 2 - 2
src/fdiffer.pas

@@ -366,7 +366,7 @@ begin
     end
     else try
       Inc(ScrollLock);
-      Screen.Cursor := crHourGlass;
+      Screen.BeginWaitCursor;
 
       if SynDiffEditLeft.Modified then SynDiffEditLeft.Lines.RemoveFake;
       if SynDiffEditRight.Modified then SynDiffEditRight.Lines.RemoveFake;
@@ -447,9 +447,9 @@ begin
     finally
       SynDiffEditLeft.FinishCompare;
       SynDiffEditRight.FinishCompare;
-      Screen.Cursor := crDefault;
       actStartCompare.Enabled := True;
       actCancelCompare.Enabled := False;
+      Screen.EndWaitCursor;
       Dec(ScrollLock);
     end;
     if actLineDifferences.Checked then

+ 2 - 4
src/frames/foptionsdirectoryhotlist.pas

@@ -1953,7 +1953,6 @@ procedure TfrmOptionsDirectoryHotlist.RefreshExistingProperty(ScanMode: integer)
 var
   Index, LocalThreadCount: longint;
   ListOfAlreadyCheckDrive, ListOfNonExistingDrive: TStringList;
-  RememberCursor: TCursor;
   FreezeTime: dword;
 
   procedure StartThreadToSeeIfThisDriveExists(const sDrive: string);
@@ -2026,11 +2025,10 @@ var
   end;
 
 begin
-  RememberCursor := Screen.Cursor;
   SetNormalIconsInTreeView;
 
   try
-    Screen.Cursor := crHourGlass;
+    Screen.BeginWaitCursor;
 
     ListOfAlreadyCheckDrive := TStringList.Create;
     ListOfAlreadyCheckDrive.Sorted := False;
@@ -2100,7 +2098,7 @@ begin
     end;
 
   finally
-    Screen.Cursor := RememberCursor;
+    Screen.EndWaitCursor;
   end;
 
   tvDirectoryHotlist.Refresh;

+ 2 - 4
src/uhotdir.pas

@@ -1174,14 +1174,12 @@ var
   ConfigFile: TIniFileEx;
   Index, OffsetForOnesAlreadyThere: integer;
   sName: string;
-  RememberCursor: TCursor;
 begin
   Result := True;
   OffsetForOnesAlreadyThere := 0;
 
   try
-    RememberCursor := Screen.Cursor;
-    Screen.Cursor := crHourGlass;
+    Screen.BeginWaitCursor;
     try
       ConfigFile := TIniFileEx.Create(mbExpandFileName(TotalCommanderConfigFilename));
       try
@@ -1250,7 +1248,7 @@ begin
     end;
 
   finally
-    Screen.Cursor := RememberCursor;
+    Screen.EndWaitCursor;
   end;
 end;
 {$ENDIF}