瀏覽代碼

Do not repeat "Synchronizing" in Synchronization checklist window title, when on background

Source commit: ecf852d86e1514008661302e35dae63f5a612476
Martin Prikryl 7 年之前
父節點
當前提交
03ad5d53a7
共有 2 個文件被更改,包括 7 次插入6 次删除
  1. 6 1
      source/forms/SynchronizeChecklist.cpp
  2. 1 5
      source/windows/TerminalManager.cpp

+ 6 - 1
source/forms/SynchronizeChecklist.cpp

@@ -122,7 +122,12 @@ bool __fastcall TSynchronizeChecklistDialog::Execute(TSynchronizeChecklist * Che
 void __fastcall TSynchronizeChecklistDialog::UpdateCaption()
 {
   TTerminalManager * Manager = TTerminalManager::Instance();
-  UnicodeString Title = Manager->GetAppProgressTitle() + LoadStr(FSynchronizing ? SYNCHRONIZE_PROGRESS_SYNCHRONIZE2 : SYNCHRONIZE_CHECKLIST_CAPTION);
+  UnicodeString Title = Manager->GetAppProgressTitle();
+  UnicodeString StatusTitle = LoadStr(FSynchronizing ? SYNCHRONIZE_PROGRESS_SYNCHRONIZE2 : SYNCHRONIZE_CHECKLIST_CAPTION);
+  if (Title.Pos(StatusTitle) <= 0)
+  {
+    AddToList(Title, StatusTitle, L" - ");
+  }
   Caption = FormatFormCaption(this, Title);
 }
 //---------------------------------------------------------------------

+ 1 - 5
source/windows/TerminalManager.cpp

@@ -697,10 +697,6 @@ UnicodeString __fastcall TTerminalManager::GetAppProgressTitle()
     Result = QueueProgressTitle;
   }
 
-  if (!Result.IsEmpty())
-  {
-    Result += L" - ";
-  }
   return Result;
 }
 //---------------------------------------------------------------------------
@@ -720,7 +716,7 @@ void __fastcall TTerminalManager::UpdateAppTitle()
     UnicodeString ProgressTitle = GetAppProgressTitle();
     if (!ProgressTitle.IsEmpty())
     {
-      NewTitle = ProgressTitle + NewTitle;
+      NewTitle = ProgressTitle + L" - " + NewTitle;
     }
     else if (ActiveTerminal && (ScpExplorer != NULL))
     {