diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-07-05 13:27:02 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-07-05 13:27:02 +0000 |
commit | 3a56ba391bf176c11cc5bde6f860759a3ce4477c (patch) | |
tree | e6e82e3d87e43303e1e01fb2b206a812f3683af6 /plugins/BasicHistory/Options.h | |
parent | cde14766d167f10dbad62c66acc0c7cc9d62f518 (diff) |
BasicHistory: folder structure change
git-svn-id: http://svn.miranda-ng.org/main/trunk@773 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BasicHistory/Options.h')
-rw-r--r-- | plugins/BasicHistory/Options.h | 199 |
1 files changed, 0 insertions, 199 deletions
diff --git a/plugins/BasicHistory/Options.h b/plugins/BasicHistory/Options.h deleted file mode 100644 index 4a5d17229c..0000000000 --- a/plugins/BasicHistory/Options.h +++ /dev/null @@ -1,199 +0,0 @@ -/*
-Basic History plugin
-Copyright (C) 2011-2012 Krzysztof Kral
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#pragma once
-#include "IImport.h"
-#include "IExport.h"
-
-struct FilterOptions
-{
- FilterOptions()
- :onlyIncomming(false),
- onlyOutgoing(false)
- {
- }
-
- FilterOptions(const std::wstring& _name)
- :name(_name),
- onlyIncomming(false),
- onlyOutgoing(false)
- {
- }
-
- std::wstring name;
- std::vector<int> events;
- bool onlyIncomming;
- bool onlyOutgoing;
-};
-
-struct TaskOptions
-{
- bool compress;
- bool useFtp;
- bool isSystem;
- bool active;
- bool forceExecute;
- bool showMBAfterExecute;
- bool exportImported;
- enum TaskType
- {
- Export,
- Delete,
- ExportAndDelete,
- Import,
- ImportAndMarge
- } type;
-
- enum EventUnit
- {
- Minute,
- Hour,
- Day
- } eventUnit;
-
- enum TrigerType
- {
- AtStart,
- AtEnd,
- Daily,
- Weekly,
- Monthly,
- DeltaMin,
- DeltaHour
- } trigerType;
-
- IExport::ExportType exportType;
- IImport::ImportType importType;
- int eventDeltaTime;
- int filterId;
- int dayTime;
- int dayOfWeek;
- int dayOfMonth;
- int deltaTime;
- int orderNr;
- time_t lastExport;
- std::wstring ftpName;
- std::wstring filterName;
- std::wstring filePath;
- std::wstring taskName;
- std::string zipPassword; // char* because zip file using ANSI password
- std::vector<HANDLE> contacts;
- TaskOptions()
- {
- forceExecute = false;
- showMBAfterExecute = false;
- exportImported = true;
- type = Export;
- eventUnit = Hour;
- trigerType = AtStart;
- exportType = IExport::RichHtml;
- importType = IImport::Binary;
- eventDeltaTime = 0;
- filterId = 0;
- compress = true;
- useFtp = false;
- isSystem = false;
- active = true;
- dayTime = 20 * 60;
- dayOfWeek = 0;
- dayOfMonth = 1;
- deltaTime = 24;
- orderNr = 0;
- TCHAR buf[MAX_PATH];
- if(SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, buf)))
- {
- filePath = buf;
- filePath += _T("\\");
- }
-
- filePath += TranslateT("History");
- filePath += _T("_<contact>_<date>.<ext>");
- lastExport = time(NULL);
- }
-};
-
-class Options
-{
-private:
- std::vector<FilterOptions> customFiltersTemp;
-public:
- Options();
- ~Options();
- static int InitOptions(WPARAM wParam, LPARAM lParam);
-
- static INT_PTR CALLBACK DlgProcOptsMain(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
- static INT_PTR CALLBACK DlgProcOptsGroupList(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
- static INT_PTR CALLBACK DlgProcOptsMessages(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
- static INT_PTR CALLBACK DlgProcOptsSearching(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
- static INT_PTR CALLBACK DlgProcOptsExport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
- static INT_PTR CALLBACK DlgProcOptsScheduler(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
- static INT_PTR CALLBACK DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
- static bool FTPAvail();
-
- static Options *instance;
- void Save();
- void SaveTasks(std::list<TaskOptions>* tasks);
- void SaveTaskTime(TaskOptions& to);
- void Load(void);
- void LoadTasks();
- void Unload();
-
- bool showContacts, showContactGroups, groupNewOnTop, groupShowEvents, groupShowTime, groupShowName, groupShowMessage;
- bool messagesNewOnTop, messagesShowDate, messagesShowSec, messagesShowName, messagesShowEvents, messagesUseSmileys;
- bool searchForInList, searchForInMess, searchMatchCase, searchMatchWhole, searchOnlyIn, searchOnlyOut, searchOnlyGroup, searchAllContacts;
- bool schedulerAlerts, schedulerHistoryAlerts;
- int groupMessageLen, groupTime, groupMessagesNumber;
-
- std::vector<FilterOptions> customFilters;
- int defFilter;
- unsigned int codepageTxt, codepageHtml1, codepageHtml2;
- std::wstring encodingTxt, encodingHtml1, encodingHtml2;
- bool exportHtml1ShowDate, exportHtml2ShowDate, exportHtml2UseSmileys;
- std::wstring extCssHtml2;
- std::vector<TaskOptions> taskOptions;
- std::wstring ftpLogPath;
- std::wstring ftpExePathDef;
- std::wstring ftpExePath;
- CRITICAL_SECTION criticalSection;
-
- enum Fonts
- {
- OutTimestamp = 0,
- InTimestamp,
- OutName,
- InName,
- OutMessages,
- InMessages,
- GroupList,
- Find,
- };
-
- enum Colors
- {
- OutBackground = 0,
- InBackground,
- GroupListBackground,
- WindowBackground,
- ContactListBackground,
- FindBackground,
- };
-
- COLORREF GetFont(Fonts fontId, PLOGFONT font);
- COLORREF GetColor(Colors colorId);
-};
-
|