Show
Ignore:
Timestamp:
02/03/08 20:17:26 (10 months ago)
Author:
cyrusdaboo
Message:

Add check calendar command/toolbar button to do fast checks of all active/open calendars.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/branches/v4.1d1/Sources_Common/Application/Calendar/Calendar_View/Calendar_Store_View/CCalendarStoreTableCommon.cp

    r86 r160  
    834834} 
    835835 
     836void 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 
     857bool 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 
    836872void CCalendarStoreTable::OnRefreshList() 
    837873{