Support setting AppUserModelID of wxTaskBarJumpList.
Specifies a unique Application User Model ID (AppUserModelID) for the application whose taskbar button will hold the custom Jump List built through the methods of this class. This parameter is optional. Author: Chaobin Zhang git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e464ed176f
commit
1ef98f2533
@ -69,7 +69,7 @@ private:
|
||||
class WXDLLIMPEXP_CORE wxTaskBarJumpListImpl
|
||||
{
|
||||
public:
|
||||
wxTaskBarJumpListImpl();
|
||||
wxTaskBarJumpListImpl(const wxString& appID = wxEmptyString);
|
||||
virtual ~wxTaskBarJumpListImpl();
|
||||
void ShowRecentCategory(bool shown = true);
|
||||
void HideRecentCategory();
|
||||
@ -102,6 +102,9 @@ private:
|
||||
wxTaskBarJumpListCategories m_customCategories;
|
||||
bool m_recent_visible;
|
||||
bool m_frequent_visible;
|
||||
|
||||
// Application User Model ID.
|
||||
wxString m_appID;
|
||||
};
|
||||
|
||||
#endif // wxUSE_TASKBARBUTTON
|
||||
|
@ -212,7 +212,7 @@ typedef wxVector<wxTaskBarJumpListCategory*> wxTaskBarJumpListCategories;
|
||||
class WXDLLIMPEXP_CORE wxTaskBarJumpList
|
||||
{
|
||||
public:
|
||||
wxTaskBarJumpList();
|
||||
wxTaskBarJumpList(const wxString& appID = wxEmptyString);
|
||||
virtual ~wxTaskBarJumpList();
|
||||
void ShowRecentCategory(bool shown = true);
|
||||
void HideRecentCategory();
|
||||
|
@ -1077,8 +1077,8 @@ const wxTaskBarJumpListItems& wxTaskBarJumpListCategory::GetItems() const
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTaskBarJumpList Implementation.
|
||||
// ----------------------------------------------------------------------------
|
||||
wxTaskBarJumpList::wxTaskBarJumpList()
|
||||
: m_jumpListImpl(new wxTaskBarJumpListImpl())
|
||||
wxTaskBarJumpList::wxTaskBarJumpList(const wxString& appID)
|
||||
: m_jumpListImpl(new wxTaskBarJumpListImpl(appID))
|
||||
{
|
||||
}
|
||||
|
||||
@ -1152,7 +1152,9 @@ void wxTaskBarJumpList::Update()
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTaskBarJumpListImpl Implementation.
|
||||
// ----------------------------------------------------------------------------
|
||||
wxTaskBarJumpListImpl::wxTaskBarJumpListImpl() : m_destinationList(NULL)
|
||||
wxTaskBarJumpListImpl::wxTaskBarJumpListImpl(const wxString& appID)
|
||||
: m_appID(appID),
|
||||
m_destinationList(NULL)
|
||||
{
|
||||
HRESULT hr = CoCreateInstance
|
||||
(
|
||||
@ -1289,6 +1291,8 @@ bool wxTaskBarJumpListImpl::BeginUpdate()
|
||||
unsigned int max_count = 0;
|
||||
HRESULT hr = m_destinationList->BeginList(&max_count,
|
||||
wxIID_IObjectArray, reinterpret_cast<void**>(&(m_objectArray)));
|
||||
if ( !m_appID.empty() )
|
||||
m_destinationList->SetAppID(m_appID.wc_str());
|
||||
|
||||
return SUCCEEDED(hr);
|
||||
}
|
||||
@ -1364,6 +1368,8 @@ void wxTaskBarJumpListImpl::LoadKnownCategory(const wxString& title)
|
||||
wxLogApiError("CoCreateInstance(wxCLSID_ApplicationDocumentLists)", hr);
|
||||
return;
|
||||
}
|
||||
if ( !m_appID.empty() )
|
||||
docList->SetAppID(m_appID.wc_str());
|
||||
|
||||
IObjectArray *array = NULL;
|
||||
wxASSERT_MSG( title == "Recent" || title == "Frequent", "Invalid title." );
|
||||
|
Loading…
Reference in New Issue
Block a user