Browse Source

Operation status is shown on task bar button and tray icon title also for command-line operations

Source commit: b25716ebec27336b1c8da5851a1fdddccac5fa01
Martin Prikryl 7 years ago
parent
commit
30b2932bb2
2 changed files with 3 additions and 3 deletions
  1. 1 1
      source/forms/CustomScpExplorer.cpp
  2. 2 2
      source/windows/TerminalManager.cpp

+ 1 - 1
source/forms/CustomScpExplorer.cpp

@@ -4595,7 +4595,7 @@ void __fastcall TCustomScpExplorerForm::ApplicationRestore(TObject * /*Sender*/)
 //---------------------------------------------------------------------------
 void __fastcall TCustomScpExplorerForm::UpdateTrayIcon()
 {
-  FTrayIcon->Hint = Caption;
+  FTrayIcon->Hint = GetMainForm()->Caption;
 }
 //---------------------------------------------------------------------------
 void __fastcall TCustomScpExplorerForm::ApplicationTitleChanged()

+ 2 - 2
source/windows/TerminalManager.cpp

@@ -675,7 +675,7 @@ bool __fastcall TTerminalManager::ShouldDisplayQueueStatusOnAppTitle()
 //---------------------------------------------------------------------------
 void __fastcall TTerminalManager::UpdateAppTitle()
 {
-  if (ScpExplorer)
+  if (ScpExplorer) // We should better check for GetMainForm() here
   {
     UnicodeString NewTitle = FormatMainFormCaption(GetActiveTerminalTitle(false));
 
@@ -699,7 +699,7 @@ void __fastcall TTerminalManager::UpdateAppTitle()
       AddToList(NewTitle, ScpExplorer->PathForCaption(), L" - ");
     }
 
-    ScpExplorer->Caption = NewTitle;
+    GetMainForm()->Caption = NewTitle;
     ScpExplorer->ApplicationTitleChanged();
   }
 }