From ba8b72b63c0533b5a398339e8295d7276482f3b9 Mon Sep 17 00:00:00 2001 From: zigm Date: Wed, 20 Nov 2019 18:59:40 -0600 Subject: [PATCH] Update hint text and User Guide. --- src/MboxMail.cpp | 2 +- src/NListView.cpp | 36 +++++++++++++++--------------------- src/mboxview.rc | 28 ++++++++++++++-------------- 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/src/MboxMail.cpp b/src/MboxMail.cpp index c18db25..941c5a5 100644 --- a/src/MboxMail.cpp +++ b/src/MboxMail.cpp @@ -958,7 +958,7 @@ void MboxMail::Parse(LPCSTR path) errorText.Empty(); bool ret2 = MboxMail::GetArchiveSpecificCachePath(cpath, rootPrintSubFolder, targetPrintSubFolder, prtCachePath, errorText); if (errorText.IsEmpty() && PathFileExist(prtCachePath)) { - pCUPDUPData->SetProgress(_T("Deleting all files in the ImageCache directory ..."), 0); + pCUPDUPData->SetProgress(_T("Deleting all related files in the ImageCache directory ..."), 0); RemoveDir(prtCachePath, true); } diff --git a/src/NListView.cpp b/src/NListView.cpp index 4ed98c2..dba0510 100644 --- a/src/NListView.cpp +++ b/src/NListView.cpp @@ -3241,6 +3241,8 @@ void NListView::SelectItem(int iItem) bool alreadyFoundHTML = false; // prefer HTML Text over Plain Text int partsCnt = 0; + + // Please please find time and stop making small changes and rewrite. CString ext = ""; if (bodies.begin() == bodies.end()) { // should never be true @@ -3411,10 +3413,14 @@ void NListView::SelectItem(int iItem) } CString cStrName = strName.c_str(); - pos = cStrName.ReverseFind('.'); - if (pos < 0) + if (strName.length() > 0) { - cStrName += "." + contentTypeExtension; + pos = cStrName.ReverseFind('.'); + if (pos < 0) + { + cStrName += "." + contentTypeExtension; + strName.assign((LPCSTR)cStrName); + } } contentType.MakeLower(); @@ -3440,7 +3446,6 @@ void NListView::SelectItem(int iItem) if (!contentId.IsEmpty()) { - //CString cStrName = strName.c_str(); int pos = cStrName.ReverseFind('.'); CString nameExtension; if (pos >= 0) @@ -3449,21 +3454,13 @@ void NListView::SelectItem(int iItem) nameExtension = "." + contentTypeExtension; CString ext = PathFindExtension(cStrName); cStrName = contentId + nameExtension; - - strName.assign(cStrName); + strName.assign((LPCSTR)cStrName); int deb = 1; } int deb = 1; } - //printf("File name: %s\r\n", strName.c_str()); - //printf("File size: %d\r\n", pBP->GetContentLength()); - - //CString cStrName = strName.c_str(); - MboxMail::MakeValidFileName(cStrName); - strName.assign((LPCSTR)cStrName); - if (strName.length() > 0) ; else @@ -3477,7 +3474,6 @@ void NListView::SelectItem(int iItem) if (!contentId.IsEmpty()) { - //CString cStrName = strName.c_str(); int pos = cStrName.ReverseFind('.'); CString nameExtension; if (pos >= 0) @@ -3487,9 +3483,6 @@ void NListView::SelectItem(int iItem) CString ext = PathFindExtension(cStrName); cStrName = contentId + nameExtension; - - strName.assign(cStrName); - MboxMail::MakeValidFileName(cStrName); strName.assign((LPCSTR)cStrName); int deb = 1; @@ -3497,6 +3490,11 @@ void NListView::SelectItem(int iItem) int deb = 1; } } + if (cStrName.IsEmpty()) + cStrName = "." + contentTypeExtension; + + MboxMail::MakeValidFileName(cStrName); + strName.assign((LPCSTR)cStrName); // Check for duplicate names. Sometimes two or mor names can represent diffrent content pos = pMsgView->FindAttachmentByName(cStrName); @@ -3558,8 +3556,6 @@ void NListView::SelectItem(int iItem) CString hdr = "
"; outbuf->Append((LPCSTR)hdr, hdr.GetLength()); - - char *inData = (char*)(LPCSTR)bdy; int inDataLen = bdy.GetLength(); MboxMail::EncodeAsHtml(inData, inDataLen, MboxMail::m_tmpbuf); @@ -3602,7 +3598,6 @@ void NListView::SelectItem(int iItem) { int mailPosition = 0; // not used anyway here bool useMailPosition = false; - //fixInlineSrcImgPath(inData, inDataLen, outbuf, &pMsgView->m_attachments, mailPosition, useMailPosition); UpdateInlineSrcImgPath_SelectedItem(inData, inDataLen, outbuf, mailPosition, useMailPosition, cidArray); } else @@ -3655,7 +3650,6 @@ void NListView::SelectItem(int iItem) { int mailPosition = 0; // not used anyway here bool useMailPosition = false; - //fixInlineSrcImgPath(inData, inDataLen, outbuf, &pMsgView->m_attachments, mailPosition, useMailPosition); UpdateInlineSrcImgPath_SelectedItem(inData, inDataLen, outbuf, mailPosition, useMailPosition, cidArray); } else diff --git a/src/mboxview.rc b/src/mboxview.rc index efd9c56..ec62ff1 100644 --- a/src/mboxview.rc +++ b/src/mboxview.rc @@ -316,13 +316,13 @@ BEGIN PUSHBUTTON "Open File",IDYES,383,66,56,14 END -IDD_FIND_ADVANCED DIALOGEX 0, 0, 373, 406 +IDD_FIND_ADVANCED DIALOGEX 0, 0, 373, 382 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find Advanced" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "OK",IDOK,234,383,50,14 - PUSHBUTTON "Cancel",IDCANCEL,297,383,50,14 + DEFPUSHBUTTON "OK",IDOK,234,358,50,14 + PUSHBUTTON "Cancel",IDCANCEL,297,358,50,14 CONTROL "From",IDC_EDIT_FROM_CHECKED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,27,51,10 EDITTEXT IDC_EDIT_FROM,77,27,155,14,ES_AUTOHSCROLL CONTROL "",IDC_EDIT_FROM_WHOLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,242,27,12,10 @@ -346,21 +346,21 @@ BEGIN EDITTEXT IDC_EDIT_ATTACHMENT,77,151,155,14,ES_AUTOHSCROLL CONTROL "",IDC_EDIT_ATTACHMENT_WHOLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,242,151,12,10 CONTROL "",IDC_EDIT_ATTACHMENT_CASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,282,151,19,10 - CONTROL "",IDC_DATETIMEPICKER1,"SysDateTimePick32",DTS_RIGHTALIGN | WS_TABSTOP,101,337,100,15 - LTEXT "start date:",IDC_STATIC,64,340,32,8 - CONTROL "",IDC_DATETIMEPICKER2,"SysDateTimePick32",DTS_RIGHTALIGN | WS_TABSTOP,101,356,100,15 - LTEXT "end date:",IDC_STATIC,65,359,31,8 - CONTROL "filter dates:",IDC_FILTERDATES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,324,50,10 - CONTROL "Find all occurences",IDC_CHECK_FIND_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,386,76,10 + CONTROL "",IDC_DATETIMEPICKER1,"SysDateTimePick32",DTS_RIGHTALIGN | WS_TABSTOP,101,321,100,15 + LTEXT "start date:",IDC_STATIC,64,324,32,8 + CONTROL "",IDC_DATETIMEPICKER2,"SysDateTimePick32",DTS_RIGHTALIGN | WS_TABSTOP,101,340,100,15 + LTEXT "end date:",IDC_STATIC,63,343,31,8 + CONTROL "filter dates:",IDC_FILTERDATES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,314,50,10 + CONTROL "Find all occurences",IDC_CHECK_FIND_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,361,76,10 CONTROL "Set all",IDC_EDIT_SET_ALL_WHOLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,242,193,35,10 CONTROL "Set all",IDC_EDIT_SET_ALL_CASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,282,193,35,10 CONTROL " (From <-- --> To) and Subject and CC and BCC and (Message or Attachments) and Attachment Name",IDC_FILTER1, "Button",BS_AUTORADIOBUTTON | WS_GROUP,18,279,346,10 - GROUPBOX "Select filter rule",IDC_STATIC,7,214,361,100 + GROUPBOX "Select filter rule",IDC_STATIC,7,214,361,93 CONTROL " (From --> To) and Subject and CC and BCC and (Message or Attachments) and Attachment Name",IDC_RADIO2, - "Button",BS_AUTORADIOBUTTON,18,299,338,10 + "Button",BS_AUTORADIOBUTTON,18,294,338,10 GROUPBOX "Filter",IDC_STATIC,7,7,361,203 - GROUPBOX "",IDC_STATIC,7,316,361,64 + GROUPBOX "",IDC_STATIC,7,308,361,51 LTEXT "If some fields are not checked, for example From, then filter rule wil be reduced as follow:",IDC_STATIC,14,241,332,10 LTEXT "<-- --> To and Subject and CC and BCC and (Message or Attachments) and Attachment Name",IDC_STATIC,21,254,324,8 LTEXT "(From <-- --> To) attempts to match (John->Bob) and (Bob->John) mails",IDC_STATIC,28,226,340,8 @@ -379,7 +379,7 @@ BEGIN CONTROL "",IDC_EDIT_ATTACHMENT_NAME_CASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,281,171,19,10 LTEXT "Name",IDC_STATIC,35,179,34,8 CONTROL "Find all mails that don't match",IDC_CHECK_NEGATE_FIND_CRITERIA, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,98,386,110,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,98,361,110,10 LTEXT " i.e. ((Any -> Bob) or (Bob -> Any)) and ...",IDC_STATIC,22,265,325,8 END @@ -567,7 +567,7 @@ BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 368 TOPMARGIN, 7 - BOTTOMMARGIN, 399 + BOTTOMMARGIN, 375 END IDD_FIND_IN_MAIL, DIALOG