Skip to content

Commit

Permalink
Update hint text and User Guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
zigm committed Nov 21, 2019
1 parent 6e0a862 commit ba8b72b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 36 deletions.
2 changes: 1 addition & 1 deletion src/MboxMail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
36 changes: 15 additions & 21 deletions src/NListView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -3487,16 +3483,18 @@ 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;
}
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);
Expand Down Expand Up @@ -3558,8 +3556,6 @@ void NListView::SelectItem(int iItem)
CString hdr = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=" + bdycharset + "\"></head><body><br>";
outbuf->Append((LPCSTR)hdr, hdr.GetLength());



char *inData = (char*)(LPCSTR)bdy;
int inDataLen = bdy.GetLength();
MboxMail::EncodeAsHtml(inData, inDataLen, MboxMail::m_tmpbuf);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
28 changes: 14 additions & 14 deletions src/mboxview.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -567,7 +567,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 368
TOPMARGIN, 7
BOTTOMMARGIN, 399
BOTTOMMARGIN, 375
END

IDD_FIND_IN_MAIL, DIALOG
Expand Down

0 comments on commit ba8b72b

Please sign in to comment.