Changeset 97 for Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar/Calendar_View/Calendar_Store_View/CCalendarStoreTable.cp
- Timestamp:
- 07/09/07 22:13:35 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
Mulberry/branches/v4.1d1/MacOS/Sources/Application/Calendar/Calendar_View/Calendar_Store_View/CCalendarStoreTable.cp
r74 r97 156 156 if (TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionServer)) 157 157 OnServerProperties(); 158 else if (TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCalendar ))158 else if (TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCalendarStoreNode)) 159 159 OnCalendarProperties(); 160 160 break; … … 230 230 case cmd_FileExport: 231 231 { 232 outEnabled = TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCa lendar);232 outEnabled = TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCanChangeCalendar); 233 233 LStr255 txt(STRx_Standards, str_ExportCalendar); 234 234 ::PLstrcpy(outName, txt); … … 276 276 outEnabled = true; 277 277 outUsesMark = true; 278 outMark = node->GetProtocol()->IsLoggedOn() ? (UInt16)checkMark : (UInt16)noMark;278 outMark = node->GetProtocol()->IsLoggedOn() ? checkMark : noMark; 279 279 ::GetIndString(outName, STRx_Standards, !outMark ? str_Logon : str_Logoff); 280 280 } … … 296 296 outEnabled = true; 297 297 outUsesMark = true; 298 outMark = !node->GetProtocol()->IsDisconnected() ? (UInt16)checkMark : (UInt16)noMark;298 outMark = !node->GetProtocol()->IsDisconnected() ? checkMark : noMark; 299 299 ::GetIndString(outName, STRx_Standards, !outMark ? str_Logon : str_Logoff); 300 300 } … … 327 327 case cmd_SendCalendar: 328 328 // Only if calendar selection; 329 outEnabled = TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCa lendar);329 outEnabled = TestSelectionAnd((TestSelectionPP) &CCalendarStoreTable::TestSelectionCanChangeCalendar); 330 330 break; 331 331 … … 459 459 460 460 // Check for actual calendars 461 if (!inMouseDown.delaySelect && !node->IsProtocol() && !node->IsDirectory())461 if (!inMouseDown.delaySelect && node->IsViewableCalendar()) 462 462 { 463 463 switch(col_info.column_type) … … 619 619 620 620 // Do status flag 621 if ( !node->IsProtocol() && !node->IsDirectory())621 if (node->IsViewableCalendar()) 622 622 { 623 623 if (node->IsCached()) … … 694 694 else 695 695 { 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; 697 705 } 698 706 } … … 913 921 got_server = 1; 914 922 } 923 else if (node->IsInbox() || node->IsOutbox()) 924 // Cannot operate on Inbox/Outbox 925 got_calendar = 2; 915 926 else 916 927 got_calendar = 1; … … 942 953 flavor = cDragCalServerType; 943 954 } 944 else 955 else if (!node->IsInbox() && !node->IsOutbox()) 945 956 { 946 957 // Dragging mailbox … … 1047 1058 { 1048 1059 // Drop into valid calendars only 1049 return !node->IsProtocol() && !node->IsDirectory();1060 return node->IsViewableCalendar(); 1050 1061 } 1051 1062 case cDragCalServerType: … … 1054 1065 case cDragCalendarType: 1055 1066 { 1056 if (node->IsProtocol() )1067 if (node->IsProtocol() || node->IsInbox() || node->IsOutbox()) 1057 1068 return false; 1058 1069 else 1059 // Allow drop into any calendar (directory = move, mbox= copy)1070 // Allow drop into any calendar (directory = move, calendar = copy) 1060 1071 return true; 1061 1072 } … … 1167 1178 // Get drop cell type 1168 1179 calstore::CCalendarStoreNode* node = GetCellNode(theCell.row); 1169 if (!node->IsProtocol() )1180 if (!node->IsProtocol() && !node->IsInbox() && !node->IsOutbox()) 1170 1181 { 1171 1182 CDragCalendarIntoCalendarTask* task = dynamic_cast<CDragCalendarIntoCalendarTask*>(CDragTask::GetCurrentDragTask());