Windows Taskbar: use progress bar feature (ITaskbarList3)
Any status progress in LO status bar is also represented as progress in Windows taskbar. Change-Id: Ibd7131ff6246cf5ea37ab8730d0eddfa084265c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171886 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
This commit is contained in:
parent
e3d16cb1cc
commit
3c371b7bde
1 changed files with 15 additions and 0 deletions
|
@ -118,6 +118,11 @@ void ProgressBarWrapper::start( const OUString& Text, ::sal_Int32 Range )
|
|||
pStatusBar->SetUpdateMode( true );
|
||||
}
|
||||
pStatusBar->Show( true, ShowFlags::NoFocusChange | ShowFlags::NoActivate );
|
||||
|
||||
VclPtr<vcl::Window> pParent = pWindow->GetParent();
|
||||
assert(pParent);
|
||||
if (pParent)
|
||||
pWindow->GetParent()->SetTaskBarState(VclTaskBarStates::Progress);
|
||||
}
|
||||
|
||||
void ProgressBarWrapper::end()
|
||||
|
@ -144,6 +149,11 @@ void ProgressBarWrapper::end()
|
|||
StatusBar* pStatusBar = static_cast<StatusBar *>(pWindow.get());
|
||||
if ( pStatusBar->IsProgressMode() )
|
||||
pStatusBar->EndProgressMode();
|
||||
|
||||
VclPtr<vcl::Window> pParent = pWindow->GetParent();
|
||||
assert(pParent);
|
||||
if (pParent)
|
||||
pWindow->GetParent()->SetTaskBarState(VclTaskBarStates::Normal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -226,6 +236,11 @@ void ProgressBarWrapper::setValue( ::sal_Int32 nValue )
|
|||
if ( !pStatusBar->IsProgressMode() )
|
||||
pStatusBar->StartProgressMode( aText );
|
||||
pStatusBar->SetProgressValue( sal_uInt16( nValue ));
|
||||
|
||||
VclPtr<vcl::Window> pParent = pWindow->GetParent();
|
||||
assert(pParent);
|
||||
if (pParent)
|
||||
pWindow->GetParent()->SetTaskBarProgress(nValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue