Rename access method of custom categories.
Author: Chaobin Zhang git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -81,9 +81,9 @@ public:
|
|||||||
const wxTaskBarJumpListCategory& GetRecentCategory();
|
const wxTaskBarJumpListCategory& GetRecentCategory();
|
||||||
const wxTaskBarJumpListCategories& GetCustomCategories() const;
|
const wxTaskBarJumpListCategories& GetCustomCategories() const;
|
||||||
|
|
||||||
void AddCategory(wxTaskBarJumpListCategory* category);
|
void AddCustomCategory(wxTaskBarJumpListCategory* category);
|
||||||
wxTaskBarJumpListCategory* RemoveCategory(const wxString& title);
|
wxTaskBarJumpListCategory* RemoveCustomCategory(const wxString& title);
|
||||||
void DeleteCategory(const wxString& title);
|
void DeleteCustomCategory(const wxString& title);
|
||||||
void Update();
|
void Update();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -224,9 +224,10 @@ public:
|
|||||||
const wxTaskBarJumpListCategory& GetRecentCategory() const;
|
const wxTaskBarJumpListCategory& GetRecentCategory() const;
|
||||||
const wxTaskBarJumpListCategories& GetCustomCategories() const;
|
const wxTaskBarJumpListCategories& GetCustomCategories() const;
|
||||||
|
|
||||||
void AddCategory(wxTaskBarJumpListCategory* category);
|
void AddCustomCategory(wxTaskBarJumpListCategory* category);
|
||||||
wxTaskBarJumpListCategory* RemoveCategory(const wxString& title);
|
wxTaskBarJumpListCategory* RemoveCustomCategory(const wxString& title);
|
||||||
void DeleteCategory(const wxString& title);
|
void DeleteCustomCategory(const wxString& title);
|
||||||
|
|
||||||
void Update();
|
void Update();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -139,6 +139,7 @@ bool MyApp::OnInit()
|
|||||||
{
|
{
|
||||||
if ( !wxApp::OnInit() )
|
if ( !wxApp::OnInit() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
wxTaskBarJumpList jumpList;
|
wxTaskBarJumpList jumpList;
|
||||||
wxTaskBarJumpListItem *item1 = new wxTaskBarJumpListItem(
|
wxTaskBarJumpListItem *item1 = new wxTaskBarJumpListItem(
|
||||||
wxTASKBAR_JUMP_LIST_TASK,
|
wxTASKBAR_JUMP_LIST_TASK,
|
||||||
@@ -165,16 +166,16 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
wxTaskBarJumpListItem* item3 = new wxTaskBarJumpListItem(
|
wxTaskBarJumpListItem* item3 = new wxTaskBarJumpListItem(
|
||||||
wxTASKBAR_JUMP_LIST_DESTIONATION,
|
wxTASKBAR_JUMP_LIST_DESTIONATION,
|
||||||
wxT("Custom Item - Help"),
|
wxT("Help"),
|
||||||
wxStandardPaths::Get().GetExecutablePath(),
|
wxStandardPaths::Get().GetExecutablePath(),
|
||||||
wxT("--help"),
|
wxT("--help"),
|
||||||
wxT("Test Custom Category."),
|
wxT("wxTaskBarButton help."),
|
||||||
wxStandardPaths::Get().GetExecutablePath(),
|
wxStandardPaths::Get().GetExecutablePath(),
|
||||||
0);
|
0);
|
||||||
wxTaskBarJumpListCategory* customCategory =
|
wxTaskBarJumpListCategory* customCategory =
|
||||||
new wxTaskBarJumpListCategory(wxT("Custom"));
|
new wxTaskBarJumpListCategory(wxT("Custom"));
|
||||||
customCategory->Append(item3);
|
customCategory->Append(item3);
|
||||||
jumpList.AddCategory(customCategory);
|
jumpList.AddCustomCategory(customCategory);
|
||||||
|
|
||||||
jumpList.Update();
|
jumpList.Update();
|
||||||
|
|
||||||
|
@@ -919,7 +919,6 @@ wxTaskBarJumpListItem::wxTaskBarJumpListItem(wxTaskBarJumpListItemType type,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxTaskBarJumpListItemType wxTaskBarJumpListItem::GetType() const
|
wxTaskBarJumpListItemType wxTaskBarJumpListItem::GetType() const
|
||||||
{
|
{
|
||||||
return m_type;
|
return m_type;
|
||||||
@@ -1129,20 +1128,20 @@ wxTaskBarJumpList::GetCustomCategories() const
|
|||||||
return m_jumpListImpl->GetCustomCategories();
|
return m_jumpListImpl->GetCustomCategories();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTaskBarJumpList::AddCategory(wxTaskBarJumpListCategory* category)
|
void wxTaskBarJumpList::AddCustomCategory(wxTaskBarJumpListCategory* category)
|
||||||
{
|
{
|
||||||
m_jumpListImpl->AddCategory(category);
|
m_jumpListImpl->AddCustomCategory(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTaskBarJumpListCategory* wxTaskBarJumpList::RemoveCategory(
|
wxTaskBarJumpListCategory* wxTaskBarJumpList::RemoveCustomCategory(
|
||||||
const wxString& title)
|
const wxString& title)
|
||||||
{
|
{
|
||||||
return m_jumpListImpl->RemoveCategory(title);
|
return m_jumpListImpl->RemoveCustomCategory(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTaskBarJumpList::DeleteCategory(const wxString& title)
|
void wxTaskBarJumpList::DeleteCustomCategory(const wxString& title)
|
||||||
{
|
{
|
||||||
m_jumpListImpl->DeleteCategory(title);
|
m_jumpListImpl->DeleteCustomCategory(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTaskBarJumpList::Update()
|
void wxTaskBarJumpList::Update()
|
||||||
@@ -1251,13 +1250,15 @@ wxTaskBarJumpListImpl::GetCustomCategories() const
|
|||||||
return m_customCategories;
|
return m_customCategories;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTaskBarJumpListImpl::AddCategory(wxTaskBarJumpListCategory *category)
|
void
|
||||||
|
wxTaskBarJumpListImpl::AddCustomCategory(wxTaskBarJumpListCategory *category)
|
||||||
{
|
{
|
||||||
|
wxASSERT_MSG( category != NULL, "Invalid category." );
|
||||||
m_customCategories.push_back(category);
|
m_customCategories.push_back(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTaskBarJumpListCategory*
|
wxTaskBarJumpListCategory*
|
||||||
wxTaskBarJumpListImpl::RemoveCategory(const wxString& title)
|
wxTaskBarJumpListImpl::RemoveCustomCategory(const wxString& title)
|
||||||
{
|
{
|
||||||
for ( wxTaskBarJumpListCategories::iterator it = m_customCategories.begin();
|
for ( wxTaskBarJumpListCategories::iterator it = m_customCategories.begin();
|
||||||
it != m_customCategories.end();
|
it != m_customCategories.end();
|
||||||
@@ -1273,9 +1274,9 @@ wxTaskBarJumpListImpl::RemoveCategory(const wxString& title)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTaskBarJumpListImpl::DeleteCategory(const wxString& title)
|
void wxTaskBarJumpListImpl::DeleteCustomCategory(const wxString& title)
|
||||||
{
|
{
|
||||||
wxTaskBarJumpListCategory* category = RemoveCategory(title);
|
wxTaskBarJumpListCategory* category = RemoveCustomCategory(title);
|
||||||
if ( category )
|
if ( category )
|
||||||
delete category;
|
delete category;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user