| | 836 | void CCalendarStoreTable::OnCheckCalendar() |
| | 837 | { |
| | 838 | // If no selection, check all subscribed calendars |
| | 839 | if (!IsSelectionValid()) |
| | 840 | { |
| | 841 | const iCal::CICalendarList& cals = calstore::CCalendarStoreManager::sCalendarStoreManager->GetSubscribedCalendars(); |
| | 842 | for(iCal::CICalendarList::const_iterator iter = cals.begin(); iter != cals.end(); iter++) |
| | 843 | { |
| | 844 | calstore::CCalendarStoreNode* node = const_cast<calstore::CCalendarStoreNode*>(calstore::CCalendarStoreManager::sCalendarStoreManager->GetNode(*iter)); |
| | 845 | node->GetProtocol()->CheckCalendar(*node, *node->GetCalendar()); |
| | 846 | } |
| | 847 | } |
| | 848 | else |
| | 849 | { |
| | 850 | DoToSelection((DoToSelectionPP) &CCalendarStoreTable::CheckCalendar); |
| | 851 | } |
| | 852 | |
| | 853 | // Reset all views |
| | 854 | CCalendarView::ResetAll(); |
| | 855 | } |
| | 856 | |
| | 857 | bool CCalendarStoreTable::CheckCalendar(TableIndexT row) |
| | 858 | { |
| | 859 | // Get calendar for hit cell |
| | 860 | calstore::CCalendarStoreNode* node = GetCellNode(row); |
| | 861 | |
| | 862 | // Only do those that are active calendars |
| | 863 | if ((node == NULL) || !node->IsViewableCalendar() || !node->IsActive()) |
| | 864 | return false; |
| | 865 | |
| | 866 | if (node->GetCalendar() != NULL) |
| | 867 | return node->GetProtocol()->CheckCalendar(*node, *node->GetCalendar()); |
| | 868 | |
| | 869 | return false; |
| | 870 | } |
| | 871 | |