summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/history_control.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewStory/src/history_control.cpp')
-rw-r--r--plugins/NewStory/src/history_control.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 0909b186cc..a208d62312 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -533,6 +533,21 @@ ItemData* NewstoryListData::LoadItem(int idx)
return (bSortAscending) ? items.get(idx, true) : items.get(totalCount - 1 - idx, true);
}
+void NewstoryListData::OpenFolder()
+{
+ if (auto *pItem = GetItem(caret)) {
+ if (pItem->m_bOfflineDownloaded) {
+ DB::EventInfo dbei(pItem->hEvent);
+ DB::FILE_BLOB blob(dbei);
+ CMStringW wszFile(blob.getLocalName());
+ int idx = wszFile.ReverseFind('\\');
+ if (idx != -1)
+ wszFile.Truncate(idx);
+ ::ShellExecute(nullptr, L"open", wszFile, nullptr, nullptr, SW_SHOWNORMAL);
+ }
+ }
+}
+
int NewstoryListData::PaintItem(HDC hdc, int index, int top, int width)
{
auto *item = LoadItem(index);