Skip to content

Commit

Permalink
Finalized support for multiple folders with mbox files under the Tree…
Browse files Browse the repository at this point in the history
… view.
  • Loading branch information
zigm committed Jul 10, 2020
1 parent 91e584e commit 9d739cf
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 52 deletions.
7 changes: 7 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Changes
---

v 1.0.3.12

- To improve mboxview, please post reviews on what works, what doesn't, create bug tickets and enhancment requests;
- Added support for multiple folders housing mbox files under the Mail Tree view;
- Fixed HTML/PDF mail header dialog. User was able to configure custom font while the default font is set;
- Updated User Manual to describe new and updated features;

v 1.0.3.11

- To improve mboxview, please post reviews on what works, what doesn't, create bug tickets and enhancment requests;
Expand Down
7 changes: 7 additions & 0 deletions ReadMe.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ The LICENSE.txt file was added in v1.0.3.4 to make the licensing explicit and to
Changes
---

v 1.0.3.12

- To improve mboxview, please post reviews on what works, what doesn't, create bug tickets and enhancment requests;
- Added support for multiple folders housing mbox files under the Mail Tree view;
- Fixed HTML/PDF mail header dialog. User was able to configure custom font while the default font is set;
- Updated User Manual to describe new and updated features;

v 1.0.3.11

- To improve mboxview, please post reviews on what works, what doesn't, create bug tickets and enhancment requests;
Expand Down
Binary file modified UserGuide.odt
Binary file not shown.
Binary file modified UserGuide.pdf
Binary file not shown.
16 changes: 6 additions & 10 deletions src/ColorStyleConfigDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,18 +846,14 @@ void ColorStyleConfigDlg::OnBnClickedButtonHelp()
{
// TODO: Add your control notification handler code here

CString path = CProfile::_GetProfileString(HKEY_CURRENT_USER, sz_Software_mboxview, "lastPath");
if (!path.IsEmpty())
{
if (!FileUtils::PathDirExists(path)) {
return;
}
}
else
return;
CString HelpPath = FileUtils::GetmboxviewTempPath("MboxHelp");

BOOL createDirOk = TRUE;
if (!FileUtils::PathDirExists(HelpPath))
createDirOk = CreateDirectory(HelpPath, NULL);

CString codePageIdsFile = "ColorStyleConfigHelp.htm";
CString fullPath = path + "\\" + codePageIdsFile;
CString fullPath = HelpPath + "\\" + codePageIdsFile;

CFile fp;
if (!fp.Open(fullPath, CFile::modeWrite | CFile::modeCreate)) {
Expand Down
12 changes: 2 additions & 10 deletions src/HtmlPdfHdrConfigDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,18 +634,10 @@ void HtmlPdfHdrConfigDlg::OnBnClickedHdrFldHelp()
{
// TODO: Add your control notification handler code here

CString path = CProfile::_GetProfileString(HKEY_CURRENT_USER, sz_Software_mboxview, "lastPath");
if (!path.IsEmpty())
{
if (!FileUtils::PathDirExists(path)) {
return;
}
}
else
return;
CString HelpPath = FileUtils::GetmboxviewTempPath("MboxHelp");

CString htmlHelpFileFile = "HTML_PDF_HdrConfigHelp.htm";
CString fullPath = path + "\\" + htmlHelpFileFile;
CString fullPath = HelpPath + "\\" + htmlHelpFileFile;

CFile fp;
if (!fp.Open(fullPath, CFile::modeWrite | CFile::modeCreate)) {
Expand Down
52 changes: 20 additions & 32 deletions src/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,16 +781,13 @@ void CMainFrame::OnViewCodepageids()
{
// TODO: Add your command handler code here

CString path = CProfile::_GetProfileString(HKEY_CURRENT_USER, sz_Software_mboxview, "lastPath");
if (!path.IsEmpty())
{
if (!FileUtils::PathDirExists(path)) {
return;
}
}
else
return;
int ret = TextUtilsEx::showCodePageTable(path);
CString HelpPath = FileUtils::GetmboxviewTempPath("MboxHelp");

BOOL createDirOk = TRUE;
if (!FileUtils::PathDirExists(HelpPath))
createDirOk = CreateDirectory(HelpPath, NULL);

int ret = TextUtilsEx::showCodePageTable(HelpPath);
}

// Called when File->"Print To"->CSV
Expand Down Expand Up @@ -1519,18 +1516,14 @@ void CMainFrame::OnBnClickedButton2() // help button on tool bar
{
// TODO: Add your control notification handler code here

CString path = CProfile::_GetProfileString(HKEY_CURRENT_USER, sz_Software_mboxview, "lastPath");
if (!path.IsEmpty())
{
if (!FileUtils::PathDirExists(path)) {
return;
}
}
else
return;
CString HelpPath = FileUtils::GetmboxviewTempPath("MboxHelp");

BOOL createDirOk = TRUE;
if (!FileUtils::PathDirExists(HelpPath))
createDirOk = CreateDirectory(HelpPath, NULL);

CString codePageIdsFile = "MailListsInfo.htm";
CString fullPath = path + "\\" + codePageIdsFile;
CString fullPath = HelpPath + "\\" + codePageIdsFile;

CFile fp;
if (!fp.Open(fullPath, CFile::modeWrite | CFile::modeCreate)) {
Expand Down Expand Up @@ -1774,18 +1767,14 @@ void CMainFrame::OnHelpMboxviewhelp()
{
// TODO: Add your command handler code here

CString path = CProfile::_GetProfileString(HKEY_CURRENT_USER, sz_Software_mboxview, "lastPath");
if (!path.IsEmpty())
{
if (!FileUtils::PathDirExists(path)) {
return;
}
}
else
return;
CString HelpPath = FileUtils::GetmboxviewTempPath("MboxHelp");

BOOL createDirOk = TRUE;
if (!FileUtils::PathDirExists(HelpPath))
createDirOk = CreateDirectory(HelpPath, NULL);

CString codePageIdsFile = "MboxviewerHelp.htm";
CString fullPath = path + "\\" + codePageIdsFile;
CString fullPath = HelpPath + "\\" + codePageIdsFile;

CFile fp;
if (!fp.Open(fullPath, CFile::modeWrite | CFile::modeCreate)) {
Expand Down Expand Up @@ -2039,8 +2028,6 @@ void CMainFrame::OnHelpMboxviewhelp()
"ROOT_MAIL_DIRECTORY\\MailArchiveFile1.mbox.mboxview<br>"
"ROOT_MAIL_DIRECTORY\\MailArchiveFile2.mbox<br>"
"ROOT_MAIL_DIRECTORY\\MailArchiveFile2.mbox.mboxview<br>"
"ROOT_MAIL_DIRECTORY\\MboxviewerHelp.htm<br>"
"ROOT_MAIL_DIRECTORY\\MailListsInfo.htm<br>"
"ROOT_MAIL_DIRECTORY\\ImageCache<br>"
"ROOT_MAIL_DIRECTORY\\ImageCache\\MailArchiveFile1 - <font color=red>target directory for image files, such as png,jpg,etc, embeded into mails</font><br>"
"ROOT_MAIL_DIRECTORY\\ImageCache\\MailArchiveFile2<br>"
Expand All @@ -2059,6 +2046,7 @@ void CMainFrame::OnHelpMboxviewhelp()
"<br>"
"<br>"
"Mbox Viewer also creates and manages temporary directory C:\\Users\\UserName\\AppData\\Local\\Temp\\mboxview directory to store temporary files (attachments, eml and htm) created when a single mail is selected by the user.<br>"
"Mbox Viewer created help files such as MailListsInfo.htm and MboxviewerHelp.htm are stored in the temporary directory C:\\Users\\UserName\\AppData\\Local\\Temp\\mboxview\\MboxHelp directory.<br>"
"<br><br>"
);
fp.Write((LPCSTR)text, text.GetLength());
Expand Down
4 changes: 4 additions & 0 deletions src/NTreeView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,9 +759,13 @@ void NTreeView::Traverse( HTREEITEM hItem, CFile &fp )
if (m_tree.ItemHasChildren(hItem))
{
HTREEITEM hChild = m_tree.GetChildItem(hItem);

Traverse(hChild, fp);
}
hItem = m_tree.GetNextSiblingItem(hItem);
HTREEITEM hParent = m_tree.GetParentItem(hItem);
if (hParent == 0)
return;
}
}

Expand Down

0 comments on commit 9d739cf

Please sign in to comment.