📄 mainmsg.c
字号:
//// Show it with list. Show it before adding the items so the pixmaps will// create properly. This should probably be fixed in the view box.// ishApp->undelWin->Show(); ishApp->undelWin->SetItems(pub->curFolder->DelItemList()); pub->BusyCursor(False);} // End UndeleteHidden/*--------------------------------------------------------------- * Callbacks to handle message-status */voidMainWinP::DoMsgMarkRead(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->msg->SetRead(); } SortMgrC *sortMgr = This->pub->curFolder->SortMgr(); if ( sortMgr->Threaded() && sortMgr->StatusKey() ) This->msgVBox->Sort(); This->pub->Refresh();}voidMainWinP::DoMsgPUMarkRead(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgMarkRead(NULL, This, NULL); else if ( This->pub->popupMsg ) { This->pub->popupMsg->SetRead(); SortMgrC *sortMgr = This->pub->curFolder->SortMgr(); if ( sortMgr->Threaded() && sortMgr->StatusKey() ) This->msgVBox->Sort(); This->pub->Refresh(); }}voidMainWinP::DoMsgMarkUnread(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->msg->ClearNew(); item->msg->ClearRead(); } SortMgrC *sortMgr = This->pub->curFolder->SortMgr(); if ( sortMgr->Threaded() && sortMgr->StatusKey() ) This->msgVBox->Sort(); This->pub->Refresh();}voidMainWinP::DoMsgPUMarkUnread(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgMarkUnread(NULL, This, NULL); else if ( This->pub->popupMsg ) { This->pub->popupMsg->ClearNew(); This->pub->popupMsg->ClearRead(); SortMgrC *sortMgr = This->pub->curFolder->SortMgr(); if ( sortMgr->Threaded() && sortMgr->StatusKey() ) This->msgVBox->Sort(); This->pub->Refresh(); }}voidMainWinP::DoMsgMarkNew(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->SetNew(); } SortMgrC *sortMgr = This->pub->curFolder->SortMgr(); if ( sortMgr->Threaded() && sortMgr->StatusKey() ) This->msgVBox->Sort(); This->pub->Refresh();}voidMainWinP::DoMsgPUMarkNew(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgMarkNew(NULL, This, NULL); else if ( This->pub->popupMsg ) { This->pub->popupMsg->SetNew(); SortMgrC *sortMgr = This->pub->curFolder->SortMgr(); if ( sortMgr->Threaded() && sortMgr->StatusKey() ) This->msgVBox->Sort(); This->pub->Refresh(); }}voidMainWinP::DoMsgSetSaved(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->SetSaved(); } This->pub->Refresh();}voidMainWinP::DoMsgPUSetSaved(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgSetSaved(NULL, This, NULL); else if ( This->pub->popupMsg ) { This->pub->popupMsg->SetSaved(); This->pub->Refresh(); }}voidMainWinP::DoMsgSetReplied(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->SetReplied(); } This->pub->Refresh();}voidMainWinP::DoMsgPUSetReplied(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgSetReplied(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->SetReplied();}voidMainWinP::DoMsgSetForwarded(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->SetForwarded(); } This->pub->Refresh();}voidMainWinP::DoMsgPUSetForwarded(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgSetForwarded(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->SetForwarded();}voidMainWinP::DoMsgSetResent(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->SetResent(); } This->pub->Refresh();}voidMainWinP::DoMsgPUSetResent(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgSetResent(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->SetResent();}voidMainWinP::DoMsgSetPrinted(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->SetPrinted(); } This->pub->Refresh();}voidMainWinP::DoMsgPUSetPrinted(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgSetPrinted(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->SetPrinted();}voidMainWinP::DoMsgSetFiltered(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->SetFiltered(); } This->pub->Refresh();}voidMainWinP::DoMsgPUSetFiltered(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgSetFiltered(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->SetFiltered();}voidMainWinP::DoMsgClearAll(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->ClearSaved(); item->ClearReplied(); item->ClearForwarded(); item->ClearResent(); item->ClearPrinted(); item->ClearFiltered(); } This->pub->Refresh();}voidMainWinP::DoMsgPUClearAll(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgClearAll(NULL, This, NULL); else if ( This->pub->popupMsg ) { This->pub->popupMsg->ClearSaved(); This->pub->popupMsg->ClearReplied(); This->pub->popupMsg->ClearForwarded(); This->pub->popupMsg->ClearResent(); This->pub->popupMsg->ClearPrinted(); This->pub->popupMsg->ClearFiltered(); This->pub->Refresh(); }}voidMainWinP::DoMsgClearSaved(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->ClearSaved(); } This->pub->Refresh();}voidMainWinP::DoMsgPUClearSaved(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgClearSaved(NULL, This, NULL); else if ( This->pub->popupMsg ) { This->pub->popupMsg->ClearSaved(); This->pub->Refresh(); }}voidMainWinP::DoMsgClearReplied(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->ClearReplied(); } This->pub->Refresh();}voidMainWinP::DoMsgPUClearReplied(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgClearReplied(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->ClearReplied();}voidMainWinP::DoMsgClearForwarded(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->ClearForwarded(); } This->pub->Refresh();}voidMainWinP::DoMsgPUClearForwarded(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgClearForwarded(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->ClearForwarded();}voidMainWinP::DoMsgClearResent(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->ClearResent(); } This->pub->Refresh();}voidMainWinP::DoMsgPUClearResent(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgClearResent(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->ClearResent();}voidMainWinP::DoMsgClearPrinted(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->ClearPrinted(); } This->pub->Refresh();}voidMainWinP::DoMsgPUClearPrinted(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgClearPrinted(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->ClearPrinted();}voidMainWinP::DoMsgClearFiltered(Widget, MainWinP *This, XtPointer){ VItemListC& slist = This->msgVBox->SelItems(); u_int count = slist.size(); for (int i=0; i<count; i++) { MsgItemC *item = (MsgItemC*)slist[i]; item->ClearFiltered(); } This->pub->Refresh();}voidMainWinP::DoMsgPUClearFiltered(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgClearFiltered(NULL, This, NULL); else if ( This->pub->popupMsg ) This->pub->popupMsg->ClearFiltered();}/*--------------------------------------------------------------- * Callback to handle message-select all */voidMainWinP::DoMsgSel(Widget, MainWinP *This, XtPointer){ This->pub->BusyCursor(True); This->msgVBox->SelectItemsOnly(This->msgVBox->VisItems()); This->pub->BusyCursor(False);}/*--------------------------------------------------------------- * Callback to handle message-deselect all */voidMainWinP::DoMsgDesel(Widget, MainWinP *This, XtPointer){ This->pub->BusyCursor(True); This->msgVBox->DeselectAllItems(); This->pub->BusyCursor(False);}/*--------------------------------------------------------------- * Callback to handle simple message-find */voidMainWinP::DoMsgFind(Widget, MainWinP *This, XtPointer){ This->pub->BusyCursor(True);//// Create dialog if necessary// if ( !This->msgFindWin ) This->msgFindWin = new MsgFindWinC(*This->pub); This->msgFindWin->Show(); This->pub->BusyCursor(False);} // End DoMsgFind/*--------------------------------------------------------------- * Callback to handle message-read */voidMainWinP::DoMsgRead(Widget, MainWinP *This, XtPointer){//// Display selected messages. If more than one is selected, set a flag so// we will display them in order.// VItemListC& list = This->msgVBox->SelItems(); unsigned count = list.size(); This->pub->readingSelected = (count > 1);//// Display the first message// MsgItemC *item = (MsgItemC *)list[0]; ishApp->DisplayMessage(item->msg);} // End DoMsgReadvoidMainWinP::DoMsgPURead(Widget, MainWinP *This, XtPointer){ if ( This->pub->popupOnSelected ) DoMsgRead(NULL, This, NULL); else if ( This->pub->popupMsg ) { This->pub->readingSelected = False; ishApp->DisplayMessage(This->pub->popupMsg); }}/*--------------------------------------------------------------- * Callback to handle message-read-next */voidMainWinP::DoMsgNext(Widget, MainWinP *This, XtPointer){ ishApp->VerifyMailCheck();//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -