Show
Ignore:
Timestamp:
07/09/07 22:13:35 (2 years ago)
Author:
daboo
Message:

More v4.1 code. Includes experiment, though non-functioning WebKit? message
display option.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar/Calendar_View/Calendar_Store_View/CCalendarStoreTable.cp

    r74 r97  
    156156                if (TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionServer)) 
    157157                        OnServerProperties(); 
    158                 else if (TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCalendar)) 
     158                else if (TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCalendarStoreNode)) 
    159159                        OnCalendarProperties(); 
    160160                break; 
     
    230230        case cmd_FileExport: 
    231231        { 
    232                 outEnabled = TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCalendar); 
     232                outEnabled = TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCanChangeCalendar); 
    233233                LStr255 txt(STRx_Standards, str_ExportCalendar); 
    234234                ::PLstrcpy(outName, txt); 
     
    276276                                        outEnabled = true; 
    277277                                        outUsesMark = true; 
    278                                         outMark = node->GetProtocol()->IsLoggedOn() ? (UInt16)checkMark : (UInt16)noMark; 
     278                                        outMark = node->GetProtocol()->IsLoggedOn() ? checkMark : noMark; 
    279279                                        ::GetIndString(outName, STRx_Standards, !outMark ? str_Logon : str_Logoff); 
    280280                                } 
     
    296296                                        outEnabled = true; 
    297297                                        outUsesMark = true; 
    298                                         outMark = !node->GetProtocol()->IsDisconnected() ? (UInt16)checkMark : (UInt16)noMark; 
     298                                        outMark = !node->GetProtocol()->IsDisconnected() ? checkMark : noMark; 
    299299                                        ::GetIndString(outName, STRx_Standards, !outMark ? str_Logon : str_Logoff); 
    300300                                } 
     
    327327        case cmd_SendCalendar: 
    328328                // Only if calendar selection; 
    329                 outEnabled = TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCalendar); 
     329                outEnabled = TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCanChangeCalendar); 
    330330                break; 
    331331 
     
    459459 
    460460                // Check for actual calendars 
    461                 if (!inMouseDown.delaySelect && !node->IsProtocol() && !node->IsDirectory()) 
     461                if (!inMouseDown.delaySelect && node->IsViewableCalendar()) 
    462462                { 
    463463                        switch(col_info.column_type) 
     
    619619 
    620620                // Do status flag 
    621                 if (!node->IsProtocol() && !node->IsDirectory()) 
     621                if (node->IsViewableCalendar()) 
    622622                { 
    623623                        if (node->IsCached()) 
     
    694694        else 
    695695        { 
    696                 return node->IsCached() ? 1807 : 1817; 
     696                if (node->IsCached()) 
     697                        if (node->IsInbox()) 
     698                                return 1823; 
     699                        else if (node->IsOutbox()) 
     700                                return 1824; 
     701                        else 
     702                                return 1807; 
     703                else 
     704                        return 1817; 
    697705        } 
    698706} 
     
    913921                        got_server = 1; 
    914922                } 
     923                else if (node->IsInbox() || node->IsOutbox()) 
     924                        // Cannot operate on Inbox/Outbox 
     925                        got_calendar = 2; 
    915926                else 
    916927                        got_calendar = 1; 
     
    942953                flavor = cDragCalServerType; 
    943954        } 
    944         else 
     955        else if (!node->IsInbox() && !node->IsOutbox()) 
    945956        { 
    946957                // Dragging mailbox 
     
    10471058                { 
    10481059                        // Drop into valid calendars only 
    1049                         return !node->IsProtocol() && !node->IsDirectory(); 
     1060                        return node->IsViewableCalendar(); 
    10501061                } 
    10511062                case cDragCalServerType: 
     
    10541065                case cDragCalendarType: 
    10551066                { 
    1056                         if (node->IsProtocol()) 
     1067                        if (node->IsProtocol() || node->IsInbox() || node->IsOutbox()) 
    10571068                                return false; 
    10581069                        else 
    1059                                 // Allow drop into any calendar (directory = move, mbox = copy) 
     1070                                // Allow drop into any calendar (directory = move, calendar = copy) 
    10601071                                return true; 
    10611072                } 
     
    11671178                // Get drop cell type 
    11681179                calstore::CCalendarStoreNode* node = GetCellNode(theCell.row); 
    1169                 if (!node->IsProtocol()) 
     1180                if (!node->IsProtocol() && !node->IsInbox() && !node->IsOutbox()) 
    11701181                { 
    11711182                        CDragCalendarIntoCalendarTask* task = dynamic_cast<CDragCalendarIntoCalendarTask*>(CDragTask::GetCurrentDragTask());