Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2015-01-03 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:53 +0300
commit0713a3ab803e57401f18432148b4139e5fe6e5dd (patch)
treeb66fd26676cf817f2bc2a889b6123c00da96d6d0 /CPP/7zip/UI/FileManager/ProgressDialog2.cpp
parent7e021179cd9f46b5bf2d48aac84783ff431dd5ac (diff)
9.389.38
Diffstat (limited to 'CPP/7zip/UI/FileManager/ProgressDialog2.cpp')
-rw-r--r--CPP/7zip/UI/FileManager/ProgressDialog2.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2.cpp b/CPP/7zip/UI/FileManager/ProgressDialog2.cpp
index bccb6e88..c9ca3942 100644
--- a/CPP/7zip/UI/FileManager/ProgressDialog2.cpp
+++ b/CPP/7zip/UI/FileManager/ProgressDialog2.cpp
@@ -238,16 +238,20 @@ CProgressDialog::CProgressDialog(): _timer(0), CompressingMode(true), MainWindow
throw 1334987;
if (_createDialogEvent.Create() != S_OK)
throw 1334987;
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (void**)&_taskbarList);
if (_taskbarList)
_taskbarList->HrInit();
+ #endif
}
#ifndef _SFX
CProgressDialog::~CProgressDialog()
{
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
SetTaskbarProgressState(TBPF_NOPROGRESS);
+ #endif
AddToTitle(L"");
}
void CProgressDialog::AddToTitle(LPCWSTR s)
@@ -264,6 +268,7 @@ void CProgressDialog::AddToTitle(LPCWSTR s)
void CProgressDialog::SetTaskbarProgressState()
{
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
if (_taskbarList && _hwndForTaskbar)
{
TBPFLAG tbpFlags;
@@ -273,6 +278,7 @@ void CProgressDialog::SetTaskbarProgressState()
tbpFlags = _errorsWereDisplayed ? TBPF_ERROR: TBPF_NORMAL;
SetTaskbarProgressState(tbpFlags);
}
+ #endif
}
static const unsigned kTitleFileNameSizeLimit = 36;
@@ -543,8 +549,10 @@ void CProgressDialog::SetProgressPos(UInt64 pos)
pos - _progressBar_Pos >= (_progressBar_Range >> 10))
{
m_ProgressBar.SetPos(_progressConv.Count(pos));
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
if (_taskbarList && _hwndForTaskbar)
_taskbarList->SetProgressValue(_hwndForTaskbar, pos, _progressBar_Range);
+ #endif
_progressBar_Pos = pos;
}
}
@@ -935,7 +943,9 @@ INT_PTR CProgressDialog::Create(const UString &title, NWindows::CThread &thread,
bool CProgressDialog::OnExternalCloseMessage()
{
// it doesn't work if there is MessageBox.
+ #ifdef __ITaskbarList3_INTERFACE_DEFINED__
SetTaskbarProgressState(TBPF_NOPROGRESS);
+ #endif
// AddToTitle(L"Finished ");
// SetText(L"Finished2 ");