void wxTaskBarJumpListImpl::AddCustomCategoriesToDestionationList() { for ( wxTaskBarJumpListCategories::iterator it = m_customCategories.begin(); it != m_customCategories.end(); ++it ) { IObjectCollection* collection = CreateObjectCollection(); if ( !collection ) continue; const wxTaskBarJumpListItems& tasks = (*it)->GetItems(); for ( wxTaskBarJumpListItems::const_iterator iter = tasks.begin(); iter != tasks.end(); ++iter ) { wxASSERT_MSG( (*iter)->GetType() == wxTASKBAR_JUMP_LIST_DESTIONATION, "Invalid category item." ); AddShellLink(collection, *(*iter)); } m_destinationList->AppendCategory((*it)->GetTitle().wc_str(), collection); collection->Release(); } }
void wxTaskBarJumpListImpl::AddTasksToDestinationList() { if ( !m_tasks.get() ) return; wxCOMPtr<IObjectCollection> collection(CreateObjectCollection()); if ( !collection ) return; const wxTaskBarJumpListItems& tasks = m_tasks->GetItems(); for ( wxTaskBarJumpListItems::const_iterator it = tasks.begin(); it != tasks.end(); ++it ) { wxASSERT_MSG( ((*it)->GetType() == wxTASKBAR_JUMP_LIST_TASK || (*it)->GetType() == wxTASKBAR_JUMP_LIST_SEPARATOR), "Invalid task Item." ); AddShellLink(collection, *(*it)); } m_destinationList->AddUserTasks(collection); }