summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMataes <mataes2007@gmail.com>2020-04-25 22:54:36 +0300
committerMataes <mataes2007@gmail.com>2020-04-25 22:54:36 +0300
commita7b186710c8d71de94927810763ffab2611fccc1 (patch)
tree44544bbb0d0dc41d285676cd553c9f42195c053b /plugins
parentbd690ca47f74ca04b8832b9ba736d8b7fc31773b (diff)
newstory: cleanup
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/src/history.cpp98
1 files changed, 0 insertions, 98 deletions
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp
index 013b8d2659..aad9ed2294 100644
--- a/plugins/NewStory/src/history.cpp
+++ b/plugins/NewStory/src/history.cpp
@@ -38,104 +38,6 @@ void InitHistory()
HookEvent(ME_DB_EVENT_EDITED, evtEventEdited);
}
-/*bool ExportHistoryDialog(HANDLE hContact, HWND hwndHistory)
-{
- int filterIndex = 0;
- wchar_t *filter = 0;
- char filterSize = 0;
-
- wchar_t *templates[100] = {0};
- int nTemplates = 0;
-
- WIN32_FIND_DATA ffd;
- HANDLE hFind = FindFirstFile(L"plugins\\newstory\\x_*.txt", &ffd);
- while (hFind != INVALID_HANDLE_VALUE)
- {
- wchar_t *fn = (wchar_t*)mir_alloc(MAX_PATH);
- wsprintf(fn, L"plugins\\newstory\\%s", ffd.cFileName);
-
- wchar_t *szSignature = L"newstory export template";
- wchar_t line[1024];
- FILE *f = _wfopen(fn, L"r");
- fgetws(line, 1024, f);
- if (*line) line[mir_wstrlen(line)-1] = 0;
- if (!mir_wstrcmp(line, szSignature))
- {
- fgetws(line, 1024, f);
- if (*line) line[mir_wstrlen(line)-1] = 0;
-
- wchar_t *title = mir_wstrdup(TranslateW(line));
-
- fgetws(line, 1024, f);
- if (*line) line[mir_wstrlen(line)-1] = 0;
- wchar_t *ext = line;
-
- // <title> (*.<ext>)\0*.<ext>\0
- int newFilterSize = filterSize + mir_wstrlen(title) + 2*mir_wstrlen(ext) + 9;
- wchar_t *newFilter = (wchar_t *)mir_calloc(newFilterSize+1);
-
- if (filterSize)
- memcpy(newFilter, filter, filterSize);
-
- wchar_t buf[1024];
- wsprintf(buf, L"%s (*.%s)%c*.%s%c", title, ext, '\0', ext, '\0');
- memcpy(newFilter+filterSize, buf, newFilterSize-filterSize);
-
- mir_free(filter);
- filter = newFilter;
- filterSize = newFilterSize;
-
- templates[nTemplates++] = fn;
-
- mir_free(title);
- } else
- {
- mir_free(fn);
- }
- fclose(f);
-
- if (!FindNextFile(hFind, &ffd))
- break;
- }
-
-
- wchar_t filename[MAX_PATH] = {0};
-
- OPENFILENAME ofn = {0};
- ofn.lStructSize = sizeof(ofn);
- ofn.hwndOwner = hwndHistory;
- ofn.hInstance = g_plugin.getInst();
- ofn.lpstrFilter = filter;
- ofn.lpstrCustomFilter = 0;
- ofn.nMaxCustFilter = 0;
- ofn.nFilterIndex = filterIndex;
- ofn.lpstrFile = filename;
- ofn.nMaxFile = MAX_PATH;
- ofn.lpstrFileTitle = 0;
- ofn.nMaxFileTitle = 0;
- ofn.lpstrInitialDir = 0;
- ofn.lpstrTitle = TranslateT("Export History...");
- ofn.Flags = OFN_ENABLESIZING|OFN_LONGNAMES|OFN_NOCHANGEDIR|OFN_NOREADONLYRETURN|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST;
- ofn.lpstrDefExt = 0;
- ofn.lCustData = 0;
- ofn.lpfnHook = 0;
- ofn.lpTemplateName = 0;
- ofn.FlagsEx = 0;
-
- if (GetSaveFileName(&ofn))
- {
-// ofn.nFilterIndex;
- ExportHistory(hContact, templates[ofn.nFilterIndex-1], ofn.lpstrFile, hwndHistory);
- }
-
- for (int i = 0; i < 100; i++)
- if (templates[i])
- mir_free(templates[i]);
-
- return false;
-}*/
-
-
/////////////////////////////////////////////////////////////////////////////////////////
// Main history dialog