diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-07 21:32:59 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-07 21:33:07 +0300 |
commit | 08e2f2b731c2a696b1c23edd1ac0e911c2336dba (patch) | |
tree | 239fd9453b487e6590d05e1d688b140879b2ecbb | |
parent | 140598d6c6061678f54c65acb2059ebc7b6b9aa7 (diff) |
IEView: double settings set removed
-rw-r--r-- | plugins/IEView/src/HTMLBuilder.cpp | 12 | ||||
-rw-r--r-- | plugins/IEView/src/IEView.cpp | 2 | ||||
-rw-r--r-- | plugins/IEView/src/Options.cpp | 672 | ||||
-rw-r--r-- | plugins/IEView/src/Options.h | 222 | ||||
-rw-r--r-- | plugins/IEView/src/TemplateHTMLBuilder.cpp | 2 | ||||
-rw-r--r-- | plugins/IEView/src/TextToken.cpp | 20 | ||||
-rw-r--r-- | plugins/IEView/src/ieview_services.cpp | 2 | ||||
-rw-r--r-- | plugins/IEView/src/version.h | 2 |
8 files changed, 346 insertions, 588 deletions
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index 67f501e30a..7d0c7a278d 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -53,7 +53,7 @@ bool HTMLBuilder::encode(MCONTACT hContact, const char *proto, const wchar_t *te }
level++;
case 1:
- if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_BBCODES) && (flags & ENF_BBCODES)) {
+ if ((Options::generalFlags & Options::GENERAL_ENABLE_BBCODES) && (flags & ENF_BBCODES)) {
token = TextToken::tokenizeBBCodes(text);
break;
}
@@ -62,7 +62,7 @@ bool HTMLBuilder::encode(MCONTACT hContact, const char *proto, const wchar_t *te token = TextToken::tokenizeLinks(text);
break;
case 3:
- if ((flags & ENF_SMILEYS) || ((Options::getGeneralFlags() & Options::GENERAL_SMILEYINNAMES) && (flags & ENF_NAMESMILEYS)))
+ if ((flags & ENF_SMILEYS) || ((Options::generalFlags & Options::GENERAL_SMILEYINNAMES) && (flags & ENF_NAMESMILEYS)))
token = TextToken::tokenizeSmileys(hContact, proto, text, isSent);
break;
}
@@ -343,7 +343,7 @@ ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(const char *protocolName) {
ProtocolSettings *protoSettings = Options::getProtocolSettings(protocolName);
if (protoSettings == nullptr || !protoSettings->isSRMMEnable())
- protoSettings = Options::getProtocolSettings();
+ protoSettings = Options::getDefaultSettings();
return protoSettings;
}
@@ -357,7 +357,7 @@ ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(const char *protocolNa {
ProtocolSettings *protoSettings = Options::getProtocolSettings(protocolName);
if (protoSettings == nullptr || !protoSettings->isHistoryEnable())
- protoSettings = Options::getProtocolSettings();
+ protoSettings = Options::getDefaultSettings();
return protoSettings;
}
@@ -367,14 +367,14 @@ ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(MCONTACT hContact) if (hContact != NULL)
return getHistoryProtocolSettings(ptrA(getRealProto(hContact)));
- return Options::getProtocolSettings();
+ return Options::getDefaultSettings();
}
ProtocolSettings* HTMLBuilder::getChatProtocolSettings(const char *protocolName)
{
ProtocolSettings *protoSettings = Options::getProtocolSettings(protocolName);
if (protoSettings == nullptr || !protoSettings->isChatEnable())
- protoSettings = Options::getProtocolSettings();
+ protoSettings = Options::getDefaultSettings();
return protoSettings;
}
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp index 6db3d246c2..28b19a3562 100644 --- a/plugins/IEView/src/IEView.cpp +++ b/plugins/IEView/src/IEView.cpp @@ -222,7 +222,7 @@ void IEView::setBorder() {
LONG style = GetWindowLongPtr(hwnd, GWL_EXSTYLE);
LONG oldStyle = style;
- if (Options::getGeneralFlags() & Options::GENERAL_NO_BORDER) {
+ if (Options::generalFlags & Options::GENERAL_NO_BORDER) {
#ifndef GECKO
style &= ~(WS_EX_STATICEDGE);
#endif
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index b74d604dfe..c07c1a41f9 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -30,6 +30,8 @@ static ProtocolSettings *historyCurrentProtoItem = nullptr; static HIMAGELIST hProtocolImageList = nullptr;
static HIMAGELIST hImageList = nullptr;
+static OBJLIST<ProtocolSettings> arProtos(1), arTemp(1);
+
static LPARAM GetItemParam(HWND hwndTreeView, HTREEITEM hItem)
{
TVITEM tvi = { 0 };
@@ -42,14 +44,13 @@ static LPARAM GetItemParam(HWND hwndTreeView, HTREEITEM hItem) static void SaveSRMMProtoSettings(HWND hwndDlg, ProtocolSettings *proto)
{
if (proto != nullptr) {
- char path[MAX_PATH];
int i = Options::MODE_COMPATIBLE;
if (IsDlgButtonChecked(hwndDlg, IDC_MODE_TEMPLATE))
i = Options::MODE_TEMPLATE;
else if (IsDlgButtonChecked(hwndDlg, IDC_MODE_CSS))
i = Options::MODE_CSS;
- proto->setSRMMModeTemp(i);
+ proto->setSRMMMode(i);
i = IsDlgButtonChecked(hwndDlg, IDC_BACKGROUND_IMAGE) ? Options::LOG_IMAGE_ENABLED : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE) ? Options::LOG_IMAGE_SCROLL : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_SHOW_NICKNAMES) ? Options::LOG_SHOW_NICKNAMES : 0;
@@ -59,27 +60,28 @@ static void SaveSRMMProtoSettings(HWND hwndDlg, ProtocolSettings *proto) i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_LONG_DATE) ? Options::LOG_LONG_DATE : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_RELATIVE_DATE) ? Options::LOG_RELATIVE_DATE : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_GROUP_MESSAGES) ? Options::LOG_GROUP_MESSAGES : 0;
- proto->setSRMMFlagsTemp(i);
+ proto->setSRMMFlags(i);
+
+ char path[MAX_PATH];
GetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, path, _countof(path));
- proto->setSRMMBackgroundFilenameTemp(path);
+ proto->setSRMMBackgroundFilename(path);
GetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, path, _countof(path));
- proto->setSRMMCssFilenameTemp(path);
+ proto->setSRMMCssFilename(path);
GetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, path, _countof(path));
- proto->setSRMMTemplateFilenameTemp(path);
+ proto->setSRMMTemplateFilename(path);
}
}
static void SaveChatProtoSettings(HWND hwndDlg, ProtocolSettings *proto)
{
if (proto != nullptr) {
- char path[MAX_PATH];
int i = Options::MODE_COMPATIBLE;
if (IsDlgButtonChecked(hwndDlg, IDC_MODE_TEMPLATE))
i = Options::MODE_TEMPLATE;
else if (IsDlgButtonChecked(hwndDlg, IDC_MODE_CSS))
i = Options::MODE_CSS;
- proto->setChatModeTemp(i);
+ proto->setChatMode(i);
i = IsDlgButtonChecked(hwndDlg, IDC_BACKGROUND_IMAGE) ? Options::LOG_IMAGE_ENABLED : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE) ? Options::LOG_IMAGE_SCROLL : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_SHOW_NICKNAMES) ? Options::LOG_SHOW_NICKNAMES : 0;
@@ -89,27 +91,28 @@ static void SaveChatProtoSettings(HWND hwndDlg, ProtocolSettings *proto) i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_LONG_DATE) ? Options::LOG_LONG_DATE : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_RELATIVE_DATE) ? Options::LOG_RELATIVE_DATE : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_GROUP_MESSAGES) ? Options::LOG_GROUP_MESSAGES : 0;
- proto->setChatFlagsTemp(i);
+ proto->setChatFlags(i);
+
+ char path[MAX_PATH];
GetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, path, _countof(path));
- proto->setChatBackgroundFilenameTemp(path);
+ proto->setChatBackgroundFilename(path);
GetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, path, _countof(path));
- proto->setChatCssFilenameTemp(path);
+ proto->setChatCssFilename(path);
GetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, path, _countof(path));
- proto->setChatTemplateFilenameTemp(path);
+ proto->setChatTemplateFilename(path);
}
}
static void SaveHistoryProtoSettings(HWND hwndDlg, ProtocolSettings *proto)
{
if (proto != nullptr) {
- char path[MAX_PATH];
int i = Options::MODE_COMPATIBLE;
if (IsDlgButtonChecked(hwndDlg, IDC_MODE_TEMPLATE))
i = Options::MODE_TEMPLATE;
else if (IsDlgButtonChecked(hwndDlg, IDC_MODE_CSS))
i = Options::MODE_CSS;
- proto->setHistoryModeTemp(i);
+ proto->setHistoryMode(i);
i = IsDlgButtonChecked(hwndDlg, IDC_BACKGROUND_IMAGE) ? Options::LOG_IMAGE_ENABLED : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE) ? Options::LOG_IMAGE_SCROLL : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_SHOW_NICKNAMES) ? Options::LOG_SHOW_NICKNAMES : 0;
@@ -119,13 +122,15 @@ static void SaveHistoryProtoSettings(HWND hwndDlg, ProtocolSettings *proto) i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_LONG_DATE) ? Options::LOG_LONG_DATE : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_RELATIVE_DATE) ? Options::LOG_RELATIVE_DATE : 0;
i |= IsDlgButtonChecked(hwndDlg, IDC_LOG_GROUP_MESSAGES) ? Options::LOG_GROUP_MESSAGES : 0;
- proto->setHistoryFlagsTemp(i);
+ proto->setHistoryFlags(i);
+
+ char path[MAX_PATH];
GetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, path, _countof(path));
- proto->setHistoryBackgroundFilenameTemp(path);
+ proto->setHistoryBackgroundFilename(path);
GetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, path, _countof(path));
- proto->setHistoryCssFilenameTemp(path);
+ proto->setHistoryCssFilename(path);
GetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, path, _countof(path));
- proto->setHistoryTemplateFilenameTemp(path);
+ proto->setHistoryTemplateFilename(path);
}
}
@@ -185,38 +190,25 @@ static void UpdateSRMMProtoInfo(HWND hwndDlg, ProtocolSettings *proto) {
if (proto != nullptr) {
HWND hProtoList = GetDlgItem(hwndDlg, IDC_PROTOLIST);
- TreeView_SetCheckState(hProtoList, TreeView_GetSelection(hProtoList), proto->isSRMMEnableTemp());
- CheckDlgButton(hwndDlg, IDC_MODE_TEMPLATE, proto->getSRMMModeTemp() == Options::MODE_TEMPLATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MODE_CSS, proto->getSRMMModeTemp() == Options::MODE_CSS ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MODE_COMPATIBLE, proto->getSRMMModeTemp() == Options::MODE_COMPATIBLE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BACKGROUND_IMAGE, proto->getSRMMFlagsTemp() & Options::LOG_IMAGE_ENABLED ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE, proto->getSRMMFlagsTemp() & Options::LOG_IMAGE_SCROLL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_NICKNAMES, proto->getSRMMFlagsTemp() & Options::LOG_SHOW_NICKNAMES ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_TIME, proto->getSRMMFlagsTemp() & Options::LOG_SHOW_TIME ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_DATE, proto->getSRMMFlagsTemp() & Options::LOG_SHOW_DATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_SECONDS, proto->getSRMMFlagsTemp() & Options::LOG_SHOW_SECONDS ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_LONG_DATE, proto->getSRMMFlagsTemp() & Options::LOG_LONG_DATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_RELATIVE_DATE, proto->getSRMMFlagsTemp() & Options::LOG_RELATIVE_DATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, proto->getSRMMFlagsTemp() & Options::LOG_GROUP_MESSAGES ? BST_CHECKED : BST_UNCHECKED);
- if (proto->getSRMMBackgroundFilenameTemp() != nullptr) {
- SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, proto->getSRMMBackgroundFilenameTemp());
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, "");
- }
- if (proto->getSRMMCssFilename() != nullptr) {
- SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, proto->getSRMMCssFilenameTemp());
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, "");
- }
- if (proto->getSRMMTemplateFilenameTemp() != nullptr) {
- SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, proto->getSRMMTemplateFilenameTemp());
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, "");
- }
- UpdateTemplateIcons(hwndDlg, proto->getSRMMTemplateFilenameTemp());
+ TreeView_SetCheckState(hProtoList, TreeView_GetSelection(hProtoList), proto->isSRMMEnable());
+ CheckDlgButton(hwndDlg, IDC_MODE_TEMPLATE, proto->getSRMMMode() == Options::MODE_TEMPLATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MODE_CSS, proto->getSRMMMode() == Options::MODE_CSS ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MODE_COMPATIBLE, proto->getSRMMMode() == Options::MODE_COMPATIBLE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BACKGROUND_IMAGE, proto->getSRMMFlags() & Options::LOG_IMAGE_ENABLED ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE, proto->getSRMMFlags() & Options::LOG_IMAGE_SCROLL ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_NICKNAMES, proto->getSRMMFlags() & Options::LOG_SHOW_NICKNAMES ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_TIME, proto->getSRMMFlags() & Options::LOG_SHOW_TIME ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_DATE, proto->getSRMMFlags() & Options::LOG_SHOW_DATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_SECONDS, proto->getSRMMFlags() & Options::LOG_SHOW_SECONDS ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_LONG_DATE, proto->getSRMMFlags() & Options::LOG_LONG_DATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_RELATIVE_DATE, proto->getSRMMFlags() & Options::LOG_RELATIVE_DATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, proto->getSRMMFlags() & Options::LOG_GROUP_MESSAGES ? BST_CHECKED : BST_UNCHECKED);
+
+ SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, proto->getSRMMBackgroundFilename());
+ SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, proto->getSRMMCssFilename());
+ SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, proto->getSRMMTemplateFilename());
+
+ UpdateTemplateIcons(hwndDlg, proto->getSRMMTemplateFilename());
srmmCurrentProtoItem = proto;
UpdateControlsState(hwndDlg);
}
@@ -226,38 +218,25 @@ static void UpdateChatProtoInfo(HWND hwndDlg, ProtocolSettings *proto) {
if (proto != nullptr) {
HWND hProtoList = GetDlgItem(hwndDlg, IDC_PROTOLIST);
- TreeView_SetCheckState(hProtoList, TreeView_GetSelection(hProtoList), proto->isChatEnableTemp());
- CheckDlgButton(hwndDlg, IDC_MODE_TEMPLATE, proto->getChatModeTemp() == Options::MODE_TEMPLATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MODE_CSS, proto->getChatModeTemp() == Options::MODE_CSS ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MODE_COMPATIBLE, proto->getChatModeTemp() == Options::MODE_COMPATIBLE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BACKGROUND_IMAGE, proto->getChatFlagsTemp() & Options::LOG_IMAGE_ENABLED ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE, proto->getChatFlagsTemp() & Options::LOG_IMAGE_SCROLL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_NICKNAMES, proto->getChatFlagsTemp() & Options::LOG_SHOW_NICKNAMES ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_TIME, proto->getChatFlagsTemp() & Options::LOG_SHOW_TIME ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_DATE, proto->getChatFlagsTemp() & Options::LOG_SHOW_DATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_SECONDS, proto->getChatFlagsTemp() & Options::LOG_SHOW_SECONDS ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_LONG_DATE, proto->getChatFlagsTemp() & Options::LOG_LONG_DATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_RELATIVE_DATE, proto->getChatFlagsTemp() & Options::LOG_RELATIVE_DATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, proto->getChatFlagsTemp() & Options::LOG_GROUP_MESSAGES ? BST_CHECKED : BST_UNCHECKED);
- if (proto->getChatBackgroundFilenameTemp() != nullptr) {
- SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, proto->getChatBackgroundFilenameTemp());
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, "");
- }
- if (proto->getChatCssFilename() != nullptr) {
- SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, proto->getChatCssFilenameTemp());
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, "");
- }
- if (proto->getChatTemplateFilenameTemp() != nullptr) {
- SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, proto->getChatTemplateFilenameTemp());
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, "");
- }
- UpdateTemplateIcons(hwndDlg, proto->getChatTemplateFilenameTemp());
+ TreeView_SetCheckState(hProtoList, TreeView_GetSelection(hProtoList), proto->isChatEnable());
+ CheckDlgButton(hwndDlg, IDC_MODE_TEMPLATE, proto->getChatMode() == Options::MODE_TEMPLATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MODE_CSS, proto->getChatMode() == Options::MODE_CSS ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MODE_COMPATIBLE, proto->getChatMode() == Options::MODE_COMPATIBLE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BACKGROUND_IMAGE, proto->getChatFlags() & Options::LOG_IMAGE_ENABLED ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE, proto->getChatFlags() & Options::LOG_IMAGE_SCROLL ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_NICKNAMES, proto->getChatFlags() & Options::LOG_SHOW_NICKNAMES ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_TIME, proto->getChatFlags() & Options::LOG_SHOW_TIME ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_DATE, proto->getChatFlags() & Options::LOG_SHOW_DATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_SECONDS, proto->getChatFlags() & Options::LOG_SHOW_SECONDS ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_LONG_DATE, proto->getChatFlags() & Options::LOG_LONG_DATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_RELATIVE_DATE, proto->getChatFlags() & Options::LOG_RELATIVE_DATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, proto->getChatFlags() & Options::LOG_GROUP_MESSAGES ? BST_CHECKED : BST_UNCHECKED);
+
+ SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, proto->getChatBackgroundFilename());
+ SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, proto->getChatCssFilename());
+ SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, proto->getChatTemplateFilename());
+
+ UpdateTemplateIcons(hwndDlg, proto->getChatTemplateFilename());
chatCurrentProtoItem = proto;
UpdateControlsState(hwndDlg);
}
@@ -267,38 +246,25 @@ static void UpdateHistoryProtoInfo(HWND hwndDlg, ProtocolSettings *proto) {
if (proto != nullptr) {
HWND hProtoList = GetDlgItem(hwndDlg, IDC_PROTOLIST);
- TreeView_SetCheckState(hProtoList, TreeView_GetSelection(hProtoList), proto->isHistoryEnableTemp());
- CheckDlgButton(hwndDlg, IDC_MODE_TEMPLATE, proto->getHistoryModeTemp() == Options::MODE_TEMPLATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MODE_CSS, proto->getHistoryModeTemp() == Options::MODE_CSS ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MODE_COMPATIBLE, proto->getHistoryModeTemp() == Options::MODE_COMPATIBLE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BACKGROUND_IMAGE, proto->getHistoryFlagsTemp() & Options::LOG_IMAGE_ENABLED ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE, proto->getHistoryFlagsTemp() & Options::LOG_IMAGE_SCROLL ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_NICKNAMES, proto->getHistoryFlagsTemp() & Options::LOG_SHOW_NICKNAMES ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_TIME, proto->getHistoryFlagsTemp() & Options::LOG_SHOW_TIME ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_DATE, proto->getHistoryFlagsTemp() & Options::LOG_SHOW_DATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_SHOW_SECONDS, proto->getHistoryFlagsTemp() & Options::LOG_SHOW_SECONDS ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_LONG_DATE, proto->getHistoryFlagsTemp() & Options::LOG_LONG_DATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_RELATIVE_DATE, proto->getHistoryFlagsTemp() & Options::LOG_RELATIVE_DATE ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, proto->getHistoryFlagsTemp() & Options::LOG_GROUP_MESSAGES ? BST_CHECKED : BST_UNCHECKED);
- if (proto->getHistoryBackgroundFilenameTemp() != nullptr) {
- SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, proto->getHistoryBackgroundFilenameTemp());
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, "");
- }
- if (proto->getHistoryCssFilename() != nullptr) {
- SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, proto->getHistoryCssFilenameTemp());
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, "");
- }
- if (proto->getHistoryTemplateFilenameTemp() != nullptr) {
- SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, proto->getHistoryTemplateFilenameTemp());
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, "");
- }
- UpdateTemplateIcons(hwndDlg, proto->getHistoryTemplateFilenameTemp());
+ TreeView_SetCheckState(hProtoList, TreeView_GetSelection(hProtoList), proto->isHistoryEnable());
+ CheckDlgButton(hwndDlg, IDC_MODE_TEMPLATE, proto->getHistoryMode() == Options::MODE_TEMPLATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MODE_CSS, proto->getHistoryMode() == Options::MODE_CSS ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_MODE_COMPATIBLE, proto->getHistoryMode() == Options::MODE_COMPATIBLE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BACKGROUND_IMAGE, proto->getHistoryFlags() & Options::LOG_IMAGE_ENABLED ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE, proto->getHistoryFlags() & Options::LOG_IMAGE_SCROLL ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_NICKNAMES, proto->getHistoryFlags() & Options::LOG_SHOW_NICKNAMES ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_TIME, proto->getHistoryFlags() & Options::LOG_SHOW_TIME ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_DATE, proto->getHistoryFlags() & Options::LOG_SHOW_DATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_SHOW_SECONDS, proto->getHistoryFlags() & Options::LOG_SHOW_SECONDS ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_LONG_DATE, proto->getHistoryFlags() & Options::LOG_LONG_DATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_RELATIVE_DATE, proto->getHistoryFlags() & Options::LOG_RELATIVE_DATE ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, proto->getHistoryFlags() & Options::LOG_GROUP_MESSAGES ? BST_CHECKED : BST_UNCHECKED);
+
+ SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, proto->getHistoryBackgroundFilename());
+ SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, proto->getHistoryCssFilename());
+ SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, proto->getHistoryTemplateFilename());
+
+ UpdateTemplateIcons(hwndDlg, proto->getHistoryTemplateFilename());
historyCurrentProtoItem = proto;
UpdateControlsState(hwndDlg);
}
@@ -306,23 +272,22 @@ static void UpdateHistoryProtoInfo(HWND hwndDlg, ProtocolSettings *proto) static void RefreshProtoIcons()
{
- if (hProtocolImageList != nullptr)
- ImageList_RemoveAll(hProtocolImageList);
- else
- hProtocolImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR32, 0, 0);
+ hProtocolImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR32, 0, 0);
- ProtocolSettings *proto = Options::getProtocolSettings();
- for (int i = 0; proto != nullptr; proto = proto->getNext(), i++) {
+ for (auto &it : arProtos) {
HICON hIcon = nullptr;
- if (i > 0) {
- hIcon = (HICON)CallProtoService(proto->getProtocolName(), PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
+
+ if (it->getProtocolName() != nullptr) {
+ hIcon = (HICON)CallProtoService(it->getProtocolName(), PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
if (hIcon == nullptr)
- hIcon = (HICON)CallProtoService(proto->getProtocolName(), PS_LOADICON, PLI_PROTOCOL, 0);
+ hIcon = (HICON)CallProtoService(it->getProtocolName(), PS_LOADICON, PLI_PROTOCOL, 0);
+ }
+ if (hIcon != nullptr) {
ImageList_AddIcon(hProtocolImageList, hIcon);
DestroyIcon(hIcon);
}
- if (hIcon == nullptr) {
+ else {
hIcon = (HICON)Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
ImageList_AddIcon(hProtocolImageList, hIcon);
IcoLib_ReleaseIcon(hIcon);
@@ -332,11 +297,7 @@ static void RefreshProtoIcons() static void RefreshIcons()
{
- if (hImageList != nullptr)
- ImageList_RemoveAll(hImageList);
- else
- hImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR32, 0, 0);
-
+ hImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR32, 0, 0);
ImageList_AddIcon(hImageList, IcoLib_GetIconByHandle(iconList[3].hIcolib));
ImageList_AddIcon(hImageList, IcoLib_GetIconByHandle(iconList[2].hIcolib));
ImageList_AddIcon(hImageList, IcoLib_GetIconByHandle(iconList[1].hIcolib));
@@ -349,36 +310,35 @@ static void RefreshProtoList(HWND hwndDlg, int mode, bool protoTemplates) HWND hProtoList = GetDlgItem(hwndDlg, IDC_PROTOLIST);
TreeView_DeleteAllItems(hProtoList);
TreeView_SetImageList(hProtoList, hProtocolImageList, TVSIL_NORMAL);
- ProtocolSettings *proto = Options::getProtocolSettings();
- for (int i = 0; proto != nullptr; proto = proto->getNext(), i++) {
+
+ for (auto &it : arTemp) {
char protoName[128];
TVINSERTSTRUCT tvi = {};
tvi.hParent = TVI_ROOT;
tvi.hInsertAfter = TVI_LAST;
tvi.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_STATE | TVIF_SELECTEDIMAGE;
tvi.item.stateMask = TVIS_SELECTED | TVIS_STATEIMAGEMASK;
- if (i == 0)
+ if (it->getProtocolName() == nullptr)
strncpy_s(protoName, Translate("Default"), _TRUNCATE);
else
- CallProtoService(proto->getProtocolName(), PS_GETNAME, sizeof(protoName), (LPARAM)protoName);
+ CallProtoService(it->getProtocolName(), PS_GETNAME, sizeof(protoName), (LPARAM)protoName);
tvi.item.pszText = mir_a2u(protoName);
- tvi.item.lParam = (LPARAM)proto;
- tvi.item.iImage = i;
- tvi.item.iSelectedImage = i;
+ tvi.item.lParam = (LPARAM)it;
+ tvi.item.iImage = tvi.item.iSelectedImage = arTemp.indexOf(&it);
switch (mode) {
case 0:
- tvi.item.state = INDEXTOSTATEIMAGEMASK(proto->isSRMMEnableTemp() ? 2 : 1);
+ tvi.item.state = INDEXTOSTATEIMAGEMASK(it->isSRMMEnable() ? 2 : 1);
break;
case 1:
- tvi.item.state = INDEXTOSTATEIMAGEMASK(proto->isChatEnableTemp() ? 2 : 1);
+ tvi.item.state = INDEXTOSTATEIMAGEMASK(it->isChatEnable() ? 2 : 1);
break;
case 2:
- tvi.item.state = INDEXTOSTATEIMAGEMASK(proto->isHistoryEnableTemp() ? 2 : 1);
+ tvi.item.state = INDEXTOSTATEIMAGEMASK(it->isHistoryEnable() ? 2 : 1);
break;
}
- if (i == 0)
+ if (it->getProtocolName() == nullptr)
hItem = TreeView_InsertItem(hProtoList, &tvi);
else
TreeView_InsertItem(hProtoList, &tvi);
@@ -386,7 +346,7 @@ static void RefreshProtoList(HWND hwndDlg, int mode, bool protoTemplates) if (!protoTemplates)
break;
}
- // UpdateSRMMProtoInfo(hwndDlg, Options::getProtocolSettings());
+
TreeView_SelectItem(hProtoList, hItem);
}
@@ -416,7 +376,9 @@ static int changed = 0; static void MarkInitialized(int i)
{
if (initialized == 0) {
- Options::resetProtocolSettings();
+ for (auto &it : arProtos)
+ arTemp.insert(new ProtocolSettings(*it));
+
RefreshProtoIcons();
RefreshIcons();
}
@@ -433,6 +395,17 @@ static void ApplyChanges(int i) }
}
+static void CleanDialog(int i)
+{
+ initialized &= ~i;
+ if (initialized == 0) {
+ arTemp.destroy();
+
+ ImageList_Destroy(hImageList); hImageList = nullptr;
+ ImageList_Destroy(hProtocolImageList); hProtocolImageList = nullptr;
+ }
+}
+
static void MarkChanges(int i, HWND hWnd)
{
SendMessage(GetParent(hWnd), PSM_CHANGED, 0, 0);
@@ -445,22 +418,22 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w case WM_INITDIALOG:
MarkInitialized(1);
TranslateDialogDefault(hwndDlg);
- if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_BBCODES) {
+ if (Options::generalFlags & Options::GENERAL_ENABLE_BBCODES)
CheckDlgButton(hwndDlg, IDC_ENABLE_BBCODES, BST_CHECKED);
- }
- if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_FLASH) {
+
+ if (Options::generalFlags & Options::GENERAL_ENABLE_FLASH)
CheckDlgButton(hwndDlg, IDC_ENABLE_FLASH, BST_CHECKED);
- }
- if (Options::getGeneralFlags() & Options::GENERAL_SMILEYINNAMES) {
+
+ if (Options::generalFlags & Options::GENERAL_SMILEYINNAMES)
CheckDlgButton(hwndDlg, IDC_SMILEYS_IN_NAMES, BST_CHECKED);
- }
- if (Options::getGeneralFlags() & Options::GENERAL_NO_BORDER) {
+
+ if (Options::generalFlags & Options::GENERAL_NO_BORDER)
CheckDlgButton(hwndDlg, IDC_NO_BORDER, BST_CHECKED);
- }
- if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_EMBED) {
+
+ if (Options::generalFlags & Options::GENERAL_ENABLE_EMBED)
CheckDlgButton(hwndDlg, IDC_ENABLE_EMBED, BST_CHECKED);
- }
- EnableWindow(GetDlgItem(hwndDlg, IDC_SMILEYS_IN_NAMES), Options::isSmileyAdd());
+
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SMILEYS_IN_NAMES), Options::bHasSmileyAdd);
EnableWindow(GetDlgItem(hwndDlg, IDC_EMBED_SIZE), IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED));
{
wchar_t* size[] = { L"320 x 205", L"480 x 385", L"560 x 349", L"640 x 390" };
@@ -468,10 +441,14 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w int item = SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_ADDSTRING, 0, (LPARAM)TranslateW(it));
SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_SETITEMDATA, item, 0);
}
- SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_SETCURSEL, Options::getEmbedsize(), 0);
+ SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_SETCURSEL, Options::getEmbedSize(), 0);
}
return TRUE;
+ case WM_DESTROY:
+ CleanDialog(1);
+ break;
+
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_ENABLE_BBCODES:
@@ -491,25 +468,27 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- int i = 0;
- if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_BBCODES)) {
+ DWORD i = 0;
+ if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_BBCODES))
i |= Options::GENERAL_ENABLE_BBCODES;
- }
- if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_FLASH)) {
+
+ if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_FLASH))
i |= Options::GENERAL_ENABLE_FLASH;
- }
- if (IsDlgButtonChecked(hwndDlg, IDC_SMILEYS_IN_NAMES)) {
+
+ if (IsDlgButtonChecked(hwndDlg, IDC_SMILEYS_IN_NAMES))
i |= Options::GENERAL_SMILEYINNAMES;
- }
- if (IsDlgButtonChecked(hwndDlg, IDC_NO_BORDER)) {
+
+ if (IsDlgButtonChecked(hwndDlg, IDC_NO_BORDER))
i |= Options::GENERAL_NO_BORDER;
- }
- if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED)) {
+
+ if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED))
i |= Options::GENERAL_ENABLE_EMBED;
- }
- Options::setGeneralFlags(i);
+
+ Options::generalFlags = i;
+ db_set_dw(NULL, ieviewModuleName, DBS_BASICFLAGS, i);
+
ApplyChanges(1);
- Options::setEmbedsize(SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_GETCURSEL, 0, 0));
+ Options::setEmbedSize(SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_GETCURSEL, 0, 0));
return TRUE;
}
break;
@@ -530,6 +509,10 @@ static INT_PTR CALLBACK IEViewSRMMOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar RefreshProtoList(hwndDlg, 0, true);
return TRUE;
+ case WM_DESTROY:
+ CleanDialog(2);
+ break;
+
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_BACKGROUND_IMAGE_FILENAME:
@@ -601,8 +584,8 @@ static INT_PTR CALLBACK IEViewSRMMOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar {
ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM)lParam);
if (proto != nullptr)
- if (strcmpi(proto->getProtocolName(), "_default_"))
- proto->setSRMMEnableTemp(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM)lParam));
+ if (proto->getProtocolName() != nullptr)
+ proto->setSRMMEnable(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM)lParam));
if ((HTREEITEM)lParam != TreeView_GetSelection((HWND)wParam))
TreeView_SelectItem((HWND)wParam, (HTREEITEM)lParam);
@@ -667,6 +650,10 @@ static INT_PTR CALLBACK IEViewHistoryOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w RefreshProtoList(hwndDlg, 2, true);
return TRUE;
+ case WM_DESTROY:
+ CleanDialog(4);
+ break;
+
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_BACKGROUND_IMAGE_FILENAME:
@@ -735,8 +722,8 @@ static INT_PTR CALLBACK IEViewHistoryOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w {
ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM)lParam);
if (proto != nullptr)
- if (strcmpi(proto->getProtocolName(), "_default_"))
- proto->setHistoryEnableTemp(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM)lParam));
+ if (proto->getProtocolName() != nullptr)
+ proto->setHistoryEnable(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM)lParam));
if ((HTREEITEM)lParam != TreeView_GetSelection((HWND)wParam))
TreeView_SelectItem((HWND)wParam, (HTREEITEM)lParam);
@@ -800,6 +787,10 @@ static INT_PTR CALLBACK IEViewGroupChatsOptDlgProc(HWND hwndDlg, UINT msg, WPARA RefreshProtoList(hwndDlg, 1, true);
return TRUE;
+ case WM_DESTROY:
+ CleanDialog(8);
+ break;
+
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_BACKGROUND_IMAGE_FILENAME:
@@ -868,8 +859,8 @@ static INT_PTR CALLBACK IEViewGroupChatsOptDlgProc(HWND hwndDlg, UINT msg, WPARA {
ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM)lParam);
if (proto != nullptr)
- if (strcmpi(proto->getProtocolName(), "_default_"))
- proto->setChatEnableTemp(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM)lParam));
+ if (proto->getProtocolName() != nullptr)
+ proto->setChatEnable(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM)lParam));
if ((HTREEITEM)lParam != TreeView_GetSelection((HWND)wParam)) {
TreeView_SelectItem((HWND)wParam, (HTREEITEM)lParam);
@@ -962,140 +953,40 @@ int IEViewOptInit(WPARAM wParam, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
bool Options::isInited = false;
-bool Options::bSmileyAdd = false;
-int Options::avatarServiceFlags = 0;
+bool Options::bHasAvs = false;
+bool Options::bHasSmileyAdd = false;
int Options::generalFlags;
-ProtocolSettings* Options::protocolList = nullptr;
-
ProtocolSettings::ProtocolSettings(const char *protocolName)
{
this->protocolName = mir_strdup(protocolName);
- next = nullptr;
- srmmEnable = false;
- srmmMode = Options::MODE_COMPATIBLE;
- srmmFlags = 0;
- srmmBackgroundFilename = mir_strdup("");
- srmmCssFilename = mir_strdup("");
- srmmTemplateFilename = mir_strdup("");
- srmmBackgroundFilenameTemp = mir_strdup("");
- srmmCssFilenameTemp = mir_strdup("");
- srmmTemplateFilenameTemp = mir_strdup("");
-
- chatEnable = false;
+ srmmMode = Options::MODE_COMPATIBLE;
chatMode = Options::MODE_COMPATIBLE;
- chatFlags = 0;
- chatBackgroundFilename = mir_strdup("");
- chatCssFilename = mir_strdup("");
- chatTemplateFilename = mir_strdup("");
-
- chatBackgroundFilenameTemp = mir_strdup("");
- chatCssFilenameTemp = mir_strdup("");
- chatTemplateFilenameTemp = mir_strdup("");
-
- historyEnable = false;
historyMode = Options::MODE_COMPATIBLE;
- historyFlags = 0;
- historyBackgroundFilename = mir_strdup("");
- historyCssFilename = mir_strdup("");
- historyTemplateFilename = mir_strdup("");
-
- historyBackgroundFilenameTemp = mir_strdup("");
- historyCssFilenameTemp = mir_strdup("");
- historyTemplateFilenameTemp = mir_strdup("");
-
}
ProtocolSettings::~ProtocolSettings()
{
- mir_free(protocolName);
- mir_free(srmmBackgroundFilename);
- mir_free(srmmBackgroundFilenameTemp);
- mir_free(srmmCssFilename);
- mir_free(srmmCssFilenameTemp);
- mir_free(srmmTemplateFilename);
- mir_free(srmmTemplateFilenameTemp);
- mir_free(chatBackgroundFilename);
- mir_free(chatBackgroundFilenameTemp);
- mir_free(chatCssFilename);
- mir_free(chatCssFilenameTemp);
- mir_free(chatTemplateFilename);
- mir_free(chatTemplateFilenameTemp);
-
- mir_free(historyBackgroundFilename);
- mir_free(historyBackgroundFilenameTemp);
- mir_free(historyCssFilename);
- mir_free(historyCssFilenameTemp);
- mir_free(historyTemplateFilename);
- mir_free(historyTemplateFilenameTemp);
-}
-
-void ProtocolSettings::copyToTemp()
-{
- setSRMMModeTemp(getSRMMMode());
- setSRMMFlagsTemp(getSRMMFlags());
- setSRMMBackgroundFilenameTemp(getSRMMBackgroundFilename());
- setSRMMCssFilenameTemp(getSRMMCssFilename());
- setSRMMTemplateFilenameTemp(getSRMMTemplateFilename());
- setSRMMEnableTemp(isSRMMEnable());
-
- setChatModeTemp(getChatMode());
- setChatFlagsTemp(getChatFlags());
- setChatBackgroundFilenameTemp(getChatBackgroundFilename());
- setChatCssFilenameTemp(getChatCssFilename());
- setChatTemplateFilenameTemp(getChatTemplateFilename());
- setChatEnableTemp(isChatEnable());
-
- setHistoryModeTemp(getHistoryMode());
- setHistoryFlagsTemp(getHistoryFlags());
- setHistoryBackgroundFilenameTemp(getHistoryBackgroundFilename());
- setHistoryCssFilenameTemp(getHistoryCssFilename());
- setHistoryTemplateFilenameTemp(getHistoryTemplateFilename());
- setHistoryEnableTemp(isHistoryEnable());
-}
-
-void ProtocolSettings::copyFromTemp()
-{
- setSRMMMode(getSRMMModeTemp());
- setSRMMFlags(getSRMMFlagsTemp());
- setSRMMBackgroundFilename(getSRMMBackgroundFilenameTemp());
- setSRMMCssFilename(getSRMMCssFilenameTemp());
- setSRMMTemplateFilename(getSRMMTemplateFilenameTemp());
- setSRMMEnable(isSRMMEnableTemp());
-
- setChatMode(getChatModeTemp());
- setChatFlags(getChatFlagsTemp());
- setChatBackgroundFilename(getChatBackgroundFilenameTemp());
- setChatCssFilename(getChatCssFilenameTemp());
- setChatTemplateFilename(getChatTemplateFilenameTemp());
- setChatEnable(isChatEnableTemp());
-
- setHistoryMode(getHistoryModeTemp());
- setHistoryFlags(getHistoryFlagsTemp());
- setHistoryBackgroundFilename(getHistoryBackgroundFilenameTemp());
- setHistoryCssFilename(getHistoryCssFilenameTemp());
- setHistoryTemplateFilename(getHistoryTemplateFilenameTemp());
- setHistoryEnable(isHistoryEnableTemp());
}
/////////////////////////////////////////////////////////////////////////////////////////
void ProtocolSettings::setSRMMTemplateFilename(const char *filename)
{
- replaceStr(srmmTemplateFilename, filename);
+ srmmTemplateFilename = filename;
TemplateMap::loadTemplates(getSRMMTemplateFilename(), getSRMMTemplateFilename(), false);
}
void ProtocolSettings::setChatTemplateFilename(const char *filename)
{
- replaceStr(chatTemplateFilename, filename);
+ chatTemplateFilename = filename;
TemplateMap::loadTemplates(getChatTemplateFilename(), getChatTemplateFilename(), false);
}
void ProtocolSettings::setHistoryTemplateFilename(const char *filename)
{
- replaceStr(historyTemplateFilename, filename);
+ historyTemplateFilename = filename;
TemplateMap::loadTemplates(getHistoryTemplateFilename(), getHistoryTemplateFilename(), false);
}
@@ -1112,14 +1003,14 @@ void Options::init() /* TODO: move to buildProtocolList method */
int protoCount;
PROTOACCOUNT **pProtos;
- ProtocolSettings *lastProto = nullptr;
Proto_EnumAccounts(&protoCount, &pProtos);
+
for (int i = 0; i < protoCount + 1; i++) {
ProtocolSettings *proto;
char tmpPath[MAX_PATH];
char dbsName[256];
if (i == 0) {
- proto = new ProtocolSettings("_default_");
+ proto = new ProtocolSettings(nullptr);
proto->setSRMMEnable(true);
}
else if (mir_strcmp(pProtos[i - 1]->szModuleName, META_PROTO)) {
@@ -1131,13 +1022,17 @@ void Options::init() else continue;
/* SRMM settings */
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_ENABLE);
+ const char *szProto = proto->getProtocolName();
+ if (szProto == nullptr)
+ szProto = "_default_";
+
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_ENABLE);
proto->setSRMMEnable(i == 0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_MODE);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_MODE);
proto->setSRMMMode(db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_FLAGS);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_FLAGS);
proto->setSRMMFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_BACKGROUND);
if (!db_get_s(NULL, ieviewModuleName, dbsName, &dbv)) {
strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
@@ -1146,7 +1041,7 @@ void Options::init() proto->setSRMMBackgroundFilename(tmpPath);
db_free(&dbv);
}
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_CSS);
if (!db_get_s(NULL, ieviewModuleName, dbsName, &dbv)) {
strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
@@ -1155,7 +1050,7 @@ void Options::init() proto->setSRMMCssFilename(tmpPath);
db_free(&dbv);
}
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_TEMPLATE);
if (!db_get_s(NULL, ieviewModuleName, dbsName, &dbv)) {
strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1164,13 +1059,13 @@ void Options::init() }
/* Group chat settings */
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_ENABLE);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_ENABLE);
proto->setChatEnable(i == 0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_MODE);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_MODE);
proto->setChatMode(db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_FLAGS);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_FLAGS);
proto->setChatFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_BACKGROUND);
if (!db_get_s(NULL, ieviewModuleName, dbsName, &dbv)) {
strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
@@ -1179,7 +1074,7 @@ void Options::init() proto->setChatBackgroundFilename(tmpPath);
db_free(&dbv);
}
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_CSS);
if (!db_get_s(NULL, ieviewModuleName, dbsName, &dbv)) {
strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
@@ -1188,7 +1083,7 @@ void Options::init() proto->setChatCssFilename(tmpPath);
db_free(&dbv);
}
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_TEMPLATE);
if (!db_get_s(NULL, ieviewModuleName, dbsName, &dbv)) {
strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
PathToAbsolute(dbv.pszVal, tmpPath);
@@ -1197,13 +1092,13 @@ void Options::init() }
/* History settings */
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_ENABLE);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_ENABLE);
proto->setHistoryEnable(i == 0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_MODE);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_MODE);
proto->setHistoryMode(db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_FLAGS);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_FLAGS);
proto->setHistoryFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_BACKGROUND);
if (!db_get_s(NULL, ieviewModuleName, dbsName, &dbv)) {
strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
@@ -1212,7 +1107,7 @@ void Options::init() proto->setHistoryBackgroundFilename(tmpPath);
db_free(&dbv);
}
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_CSS);
if (!db_get_s(NULL, ieviewModuleName, dbsName, &dbv)) {
strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
if (strncmp(tmpPath, "http://", 7))
@@ -1221,176 +1116,133 @@ void Options::init() proto->setHistoryCssFilename(tmpPath);
db_free(&dbv);
}
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_TEMPLATE);
if (!db_get_s(NULL, ieviewModuleName, dbsName, &dbv)) {
strncpy_s(tmpPath, dbv.pszVal, _TRUNCATE);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryTemplateFilename(tmpPath);
db_free(&dbv);
}
- proto->copyToTemp();
- if (lastProto != nullptr) {
- lastProto->setNext(proto);
- }
- else {
- protocolList = proto;
- }
- lastProto = proto;
+
+ arProtos.insert(proto);
}
- bSmileyAdd = 0 != ServiceExists(MS_SMILEYADD_BATCHPARSE);
- avatarServiceFlags = 0;
- if (ServiceExists(MS_AV_GETAVATARBITMAP))
- avatarServiceFlags = AVATARSERVICE_PRESENT;
+ bHasAvs = ServiceExists(MS_AV_GETAVATARBITMAP) != 0;
+ bHasSmileyAdd = ServiceExists(MS_SMILEYADD_BATCHPARSE) != 0;
}
void Options::uninit()
{
- ProtocolSettings *p, *p1;
- for (p = protocolList; p != nullptr; p = p1) {
- p1 = p->getNext();
- delete p;
- }
- TemplateMap::dropTemplates();
- if (hImageList != nullptr)
- ImageList_Destroy(hImageList);
- if (hProtocolImageList != nullptr)
- ImageList_Destroy(hProtocolImageList);
-}
-
-void Options::setGeneralFlags(int flags)
-{
- generalFlags = flags;
- db_set_dw(NULL, ieviewModuleName, DBS_BASICFLAGS, (DWORD)flags);
-}
+ arProtos.destroy();
-int Options::getGeneralFlags()
-{
- return generalFlags;
+ TemplateMap::dropTemplates();
}
-void Options::setEmbedsize(int size)
+void Options::setEmbedSize(int size)
{
db_set_dw(NULL, ieviewModuleName, "Embedsize", (DWORD)size);
}
-int Options::getEmbedsize()
+int Options::getEmbedSize()
{
return db_get_dw(NULL, ieviewModuleName, "Embedsize", 0);
}
-bool Options::isSmileyAdd()
-{
- return bSmileyAdd;
-}
-
-int Options::getAvatarServiceFlags()
+ProtocolSettings* Options::getDefaultSettings()
{
- return avatarServiceFlags;
-}
-
-ProtocolSettings* Options::getProtocolSettings()
-{
- return protocolList;
+ return &arProtos[0];
}
ProtocolSettings* Options::getProtocolSettings(const char *protocolName)
{
- for (ProtocolSettings *proto = protocolList; proto != nullptr; proto = proto->getNext())
- if (!strcmpi(proto->getProtocolName(), protocolName))
- return proto;
+ for (auto &it : arProtos)
+ if (!mir_strcmpi(it->getProtocolName(), protocolName))
+ return it;
return nullptr;
}
-void Options::resetProtocolSettings()
-{
- for (ProtocolSettings *proto = Options::getProtocolSettings(); proto != nullptr; proto = proto->getNext())
- proto->copyToTemp();
-}
-
void Options::saveProtocolSettings()
{
- ProtocolSettings *proto = Options::getProtocolSettings();
- for (int i = 0; proto != nullptr; proto = proto->getNext(), i++) {
- char dbsName[256];
- char tmpPath[MAX_PATH];
- proto->copyFromTemp();
+ for (auto &it : arTemp) {
+ const char *szProto = it->getProtocolName();
+ if (szProto == nullptr)
+ szProto = "_default_";
+
/* SRMM settings */
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_ENABLE);
- db_set_b(NULL, ieviewModuleName, dbsName, proto->isSRMMEnable());
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_MODE);
- db_set_b(NULL, ieviewModuleName, dbsName, proto->getSRMMMode());
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_FLAGS);
- db_set_dw(NULL, ieviewModuleName, dbsName, proto->getSRMMFlags());
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
- strncpy_s(tmpPath, proto->getSRMMBackgroundFilename(), _TRUNCATE);
- PathToRelative(proto->getSRMMBackgroundFilename(), tmpPath);
+ char dbsName[256], tmpPath[MAX_PATH];
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_ENABLE);
+ db_set_b(NULL, ieviewModuleName, dbsName, it->isSRMMEnable());
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_MODE);
+ db_set_b(NULL, ieviewModuleName, dbsName, it->getSRMMMode());
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_FLAGS);
+ db_set_dw(NULL, ieviewModuleName, dbsName, it->getSRMMFlags());
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_BACKGROUND);
+ strncpy_s(tmpPath, it->getSRMMBackgroundFilename(), _TRUNCATE);
+ PathToRelative(it->getSRMMBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
- strncpy_s(tmpPath, proto->getSRMMCssFilename(), _TRUNCATE);
- PathToRelative(proto->getSRMMCssFilename(), tmpPath);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_CSS);
+ strncpy_s(tmpPath, it->getSRMMCssFilename(), _TRUNCATE);
+ PathToRelative(it->getSRMMCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
- strncpy_s(tmpPath, proto->getSRMMTemplateFilename(), _TRUNCATE);
- PathToRelative(proto->getSRMMTemplateFilename(), tmpPath);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_SRMM_TEMPLATE);
+ strncpy_s(tmpPath, it->getSRMMTemplateFilename(), _TRUNCATE);
+ PathToRelative(it->getSRMMTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
/* Group Chat settings */
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_ENABLE);
- db_set_b(NULL, ieviewModuleName, dbsName, proto->isChatEnable());
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_MODE);
- db_set_b(NULL, ieviewModuleName, dbsName, proto->getChatMode());
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_FLAGS);
- db_set_dw(NULL, ieviewModuleName, dbsName, proto->getChatFlags());
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
- strncpy_s(tmpPath, proto->getChatBackgroundFilename(), _TRUNCATE);
- PathToRelative(proto->getChatBackgroundFilename(), tmpPath);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_ENABLE);
+ db_set_b(NULL, ieviewModuleName, dbsName, it->isChatEnable());
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_MODE);
+ db_set_b(NULL, ieviewModuleName, dbsName, it->getChatMode());
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_FLAGS);
+ db_set_dw(NULL, ieviewModuleName, dbsName, it->getChatFlags());
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_BACKGROUND);
+ strncpy_s(tmpPath, it->getChatBackgroundFilename(), _TRUNCATE);
+ PathToRelative(it->getChatBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
- strncpy_s(tmpPath, proto->getChatCssFilename(), _TRUNCATE);
- PathToRelative(proto->getChatCssFilename(), tmpPath);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_CSS);
+ strncpy_s(tmpPath, it->getChatCssFilename(), _TRUNCATE);
+ PathToRelative(it->getChatCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
- strncpy_s(tmpPath, proto->getChatTemplateFilename(), _TRUNCATE);
- PathToRelative(proto->getChatTemplateFilename(), tmpPath);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_CHAT_TEMPLATE);
+ strncpy_s(tmpPath, it->getChatTemplateFilename(), _TRUNCATE);
+ PathToRelative(it->getChatTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
/* History settings */
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_ENABLE);
- db_set_b(NULL, ieviewModuleName, dbsName, proto->isHistoryEnable());
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_MODE);
- db_set_b(NULL, ieviewModuleName, dbsName, proto->getHistoryMode());
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_FLAGS);
- db_set_dw(NULL, ieviewModuleName, dbsName, proto->getHistoryFlags());
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
- strncpy_s(tmpPath, proto->getHistoryBackgroundFilename(), _TRUNCATE);
- PathToRelative(proto->getHistoryBackgroundFilename(), tmpPath);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_ENABLE);
+ db_set_b(NULL, ieviewModuleName, dbsName, it->isHistoryEnable());
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_MODE);
+ db_set_b(NULL, ieviewModuleName, dbsName, it->getHistoryMode());
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_FLAGS);
+ db_set_dw(NULL, ieviewModuleName, dbsName, it->getHistoryFlags());
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_BACKGROUND);
+ strncpy_s(tmpPath, it->getHistoryBackgroundFilename(), _TRUNCATE);
+ PathToRelative(it->getHistoryBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
- strncpy_s(tmpPath, proto->getHistoryCssFilename(), _TRUNCATE);
- PathToRelative(proto->getHistoryCssFilename(), tmpPath);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_CSS);
+ strncpy_s(tmpPath, it->getHistoryCssFilename(), _TRUNCATE);
+ PathToRelative(it->getHistoryCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
- mir_snprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
- strncpy_s(tmpPath, proto->getHistoryTemplateFilename(), _TRUNCATE);
- PathToRelative(proto->getHistoryTemplateFilename(), tmpPath);
+ mir_snprintf(dbsName, "%s.%s", szProto, DBS_HISTORY_TEMPLATE);
+ strncpy_s(tmpPath, it->getHistoryTemplateFilename(), _TRUNCATE);
+ PathToRelative(it->getHistoryTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
}
+
+ reload();
}
-void Options::Reload()
+void Options::reload()
{
- ProtocolSettings *p, *p1;
- for (p = Options::protocolList; p != nullptr; p = p1) {
- p1 = p->getNext();
- delete p;
- }
+ arProtos.destroy();
isInited = false;
init();
}
diff --git a/plugins/IEView/src/Options.h b/plugins/IEView/src/Options.h index 9e82daaac4..f791aa553f 100644 --- a/plugins/IEView/src/Options.h +++ b/plugins/IEView/src/Options.h @@ -18,87 +18,60 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-class ProtocolSettings;
-class Options;
+
#ifndef OPTIONS_INCLUDED
#define OPTIONS_INCLUDED
-//#include "FontList.h"
-#include "stdafx.h"
-
-#define DBS_BASICFLAGS "GeneralFlags"
-
-#define DBS_SRMM_ENABLE "SRMMEnable"
-#define DBS_SRMM_MODE "SRMMMode"
-#define DBS_SRMM_FLAGS "SRMMFlags"
-#define DBS_SRMM_BACKGROUND "SRMMBackgroundFile"
-#define DBS_SRMM_CSS "SRMMCSSFile"
-#define DBS_SRMM_TEMPLATE "SRMMTemplateFile"
-
-#define DBS_CHAT_ENABLE "ChatEnable"
-#define DBS_CHAT_MODE "ChatMode"
-#define DBS_CHAT_FLAGS "ChatFlags"
-#define DBS_CHAT_BACKGROUND "ChatBackgroundFile"
-#define DBS_CHAT_CSS "ChatCSSFile"
-#define DBS_CHAT_TEMPLATE "ChatTemplateFile"
-
-#define DBS_HISTORY_ENABLE "HistoryEnable"
-#define DBS_HISTORY_MODE "HistoryMode"
-#define DBS_HISTORY_FLAGS "HistoryFlags"
-#define DBS_HISTORY_BACKGROUND "HistoryBackgroundFile"
-#define DBS_HISTORY_CSS "HistoryCSSFile"
-#define DBS_HISTORY_TEMPLATE "HistoryTemplateFile"
+
+#define DBS_BASICFLAGS "GeneralFlags"
+
+#define DBS_SRMM_ENABLE "SRMMEnable"
+#define DBS_SRMM_MODE "SRMMMode"
+#define DBS_SRMM_FLAGS "SRMMFlags"
+#define DBS_SRMM_BACKGROUND "SRMMBackgroundFile"
+#define DBS_SRMM_CSS "SRMMCSSFile"
+#define DBS_SRMM_TEMPLATE "SRMMTemplateFile"
+
+#define DBS_CHAT_ENABLE "ChatEnable"
+#define DBS_CHAT_MODE "ChatMode"
+#define DBS_CHAT_FLAGS "ChatFlags"
+#define DBS_CHAT_BACKGROUND "ChatBackgroundFile"
+#define DBS_CHAT_CSS "ChatCSSFile"
+#define DBS_CHAT_TEMPLATE "ChatTemplateFile"
+
+#define DBS_HISTORY_ENABLE "HistoryEnable"
+#define DBS_HISTORY_MODE "HistoryMode"
+#define DBS_HISTORY_FLAGS "HistoryFlags"
+#define DBS_HISTORY_BACKGROUND "HistoryBackgroundFile"
+#define DBS_HISTORY_CSS "HistoryCSSFile"
+#define DBS_HISTORY_TEMPLATE "HistoryTemplateFile"
extern int IEViewOptInit(WPARAM wParam, LPARAM lParam);
class ProtocolSettings
{
char *protocolName;
- ProtocolSettings *next;
bool srmmEnable;
- int srmmMode;
- int srmmFlags;
- char *srmmBackgroundFilename;
- char *srmmCssFilename;
- char *srmmTemplateFilename;
-
- bool srmmEnableTemp;
- int srmmModeTemp;
- int srmmFlagsTemp;
- char *srmmBackgroundFilenameTemp;
- char *srmmCssFilenameTemp;
- char *srmmTemplateFilenameTemp;
+ int srmmMode;
+ int srmmFlags;
+ CMStringA srmmBackgroundFilename;
+ CMStringA srmmCssFilename;
+ CMStringA srmmTemplateFilename;
bool chatEnable;
- int chatMode;
- int chatFlags;
- char *chatBackgroundFilename;
- char *chatCssFilename;
- char *chatTemplateFilename;
-
- bool chatEnableTemp;
- int chatModeTemp;
- int chatFlagsTemp;
- char *chatBackgroundFilenameTemp;
- char *chatCssFilenameTemp;
- char *chatCssFilenameRtlTemp;
- char *chatTemplateFilenameTemp;
+ int chatMode;
+ int chatFlags;
+ CMStringA chatBackgroundFilename;
+ CMStringA chatCssFilename;
+ CMStringA chatTemplateFilename;
bool historyEnable;
int historyMode;
int historyFlags;
- char *historyBackgroundFilename;
- char *historyCssFilename;
- char *historyCssFilenameRtl;
- char *historyTemplateFilename;
-
- bool historyEnableTemp;
- int historyModeTemp;
- int historyFlagsTemp;
- char *historyBackgroundFilenameTemp;
- char *historyCssFilenameTemp;
- char *historyCssFilenameRtlTemp;
- char *historyTemplateFilenameTemp;
+ CMStringA historyBackgroundFilename;
+ CMStringA historyCssFilename;
+ CMStringA historyCssFilenameRtl;
+ CMStringA historyTemplateFilename;
public:
ProtocolSettings(const char *protocolName);
@@ -106,9 +79,6 @@ public: __forceinline const char* getProtocolName() { return protocolName; }
- __forceinline void setNext(ProtocolSettings *_next) { next = _next; }
- __forceinline ProtocolSettings* getNext() { return next; }
-
__forceinline void setSRMMEnable(bool enable) { this->srmmEnable = enable; }
__forceinline bool isSRMMEnable() { return srmmEnable; }
@@ -118,33 +88,15 @@ public: __forceinline void setSRMMFlags(int flags) { this->srmmFlags = flags; }
__forceinline int getSRMMFlags() { return srmmFlags; }
- __forceinline void setSRMMBackgroundFilename(const char *filename) { replaceStr(srmmBackgroundFilename, filename); }
+ __forceinline void setSRMMBackgroundFilename(const char *filename) { srmmBackgroundFilename = filename; }
__forceinline const char* getSRMMBackgroundFilename() { return srmmBackgroundFilename; }
- __forceinline void setSRMMCssFilename(const char *filename) { replaceStr(srmmCssFilename, filename); }
+ __forceinline void setSRMMCssFilename(const char *filename) { srmmCssFilename = filename; }
__forceinline const char* getSRMMCssFilename() { return srmmCssFilename; }
void setSRMMTemplateFilename(const char *filename);
__forceinline const char* getSRMMTemplateFilename() { return srmmTemplateFilename; }
- __forceinline void setSRMMEnableTemp(bool enable) { this->srmmEnableTemp = enable; }
- __forceinline bool isSRMMEnableTemp() { return srmmEnableTemp; }
-
- __forceinline void setSRMMModeTemp(int mode) { this->srmmModeTemp = mode; }
- __forceinline int getSRMMModeTemp() { return srmmModeTemp; }
-
- __forceinline void setSRMMFlagsTemp(int flags) { this->srmmFlagsTemp = flags; }
- __forceinline int getSRMMFlagsTemp() { return srmmFlagsTemp; }
-
- __forceinline void setSRMMBackgroundFilenameTemp(const char *filename) { replaceStr(srmmBackgroundFilenameTemp, filename); }
- __forceinline const char* getSRMMBackgroundFilenameTemp() { return srmmBackgroundFilenameTemp; }
-
- __forceinline void setSRMMCssFilenameTemp(const char *filename) { replaceStr(srmmCssFilenameTemp, filename); }
- __forceinline const char* getSRMMCssFilenameTemp() { return srmmCssFilenameTemp; }
-
- __forceinline void setSRMMTemplateFilenameTemp(const char *filename) { replaceStr(srmmTemplateFilenameTemp, filename); }
- __forceinline const char* getSRMMTemplateFilenameTemp() { return srmmTemplateFilenameTemp; }
-
__forceinline void setChatEnable(bool enable) { this->chatEnable = enable; }
__forceinline bool isChatEnable() { return chatEnable; }
@@ -154,33 +106,15 @@ public: __forceinline void setChatFlags(int flags) { this->chatFlags = flags; }
__forceinline int getChatFlags() { return chatFlags; }
- __forceinline void setChatBackgroundFilename(const char *filename) { replaceStr(chatBackgroundFilename, filename); }
+ __forceinline void setChatBackgroundFilename(const char *filename) { chatBackgroundFilename = filename; }
__forceinline const char* getChatBackgroundFilename() { return chatBackgroundFilename; }
- __forceinline void setChatCssFilename(const char *filename) { replaceStr(chatCssFilename, filename); }
+ __forceinline void setChatCssFilename(const char *filename) { chatCssFilename = filename; }
__forceinline const char* getChatCssFilename() { return chatCssFilename; }
void setChatTemplateFilename(const char *filename);
__forceinline const char* getChatTemplateFilename() { return chatTemplateFilename; }
- __forceinline void setChatEnableTemp(bool enable) { this->chatEnableTemp = enable; }
- __forceinline bool isChatEnableTemp() { return chatEnableTemp; }
-
- __forceinline void setChatModeTemp(int mode) { this->chatModeTemp = mode; }
- __forceinline int getChatModeTemp() { return chatModeTemp; }
-
- __forceinline void setChatFlagsTemp(int flags) { this->chatFlagsTemp = flags; }
- __forceinline int getChatFlagsTemp() { return chatFlagsTemp; }
-
- __forceinline void setChatBackgroundFilenameTemp(const char *filename) { replaceStr(chatBackgroundFilenameTemp, filename); }
- __forceinline const char* getChatBackgroundFilenameTemp() { return chatBackgroundFilenameTemp; }
-
- __forceinline void setChatCssFilenameTemp(const char *filename) { replaceStr(chatCssFilenameTemp, filename); }
- __forceinline const char* getChatCssFilenameTemp() { return chatCssFilenameTemp; }
-
- __forceinline void setChatTemplateFilenameTemp(const char *filename) { replaceStr(chatTemplateFilenameTemp, filename); }
- __forceinline const char* getChatTemplateFilenameTemp() { return chatTemplateFilenameTemp; }
-
__forceinline void setHistoryEnable(bool enable) { this->historyEnable = enable; }
__forceinline bool isHistoryEnable() { return historyEnable; }
@@ -190,51 +124,27 @@ public: __forceinline void setHistoryFlags(int flags) { this->historyFlags = flags; }
__forceinline int getHistoryFlags() { return historyFlags; }
- __forceinline void setHistoryBackgroundFilename(const char *filename) { replaceStr(historyBackgroundFilename, filename); }
+ __forceinline void setHistoryBackgroundFilename(const char *filename) { historyBackgroundFilename = filename; }
__forceinline const char* getHistoryBackgroundFilename() { return historyBackgroundFilename; }
- __forceinline void setHistoryCssFilename(const char *filename) { replaceStr(historyCssFilename, filename); }
+ __forceinline void setHistoryCssFilename(const char *filename) { historyCssFilename = filename; }
__forceinline const char* getHistoryCssFilename() { return historyCssFilename; }
void setHistoryTemplateFilename(const char *filename);
__forceinline const char* getHistoryTemplateFilename() { return historyTemplateFilename; }
-
- __forceinline void setHistoryEnableTemp(bool enable) { this->historyEnableTemp = enable; }
- __forceinline bool isHistoryEnableTemp() { return historyEnableTemp; }
-
- __forceinline void setHistoryModeTemp(int mode) { this->historyModeTemp = mode; }
- __forceinline int getHistoryModeTemp() { return historyModeTemp; }
-
- __forceinline void setHistoryFlagsTemp(int flags) { this->historyFlagsTemp = flags; }
- __forceinline int getHistoryFlagsTemp() { return historyFlagsTemp; }
-
- __forceinline void setHistoryBackgroundFilenameTemp(const char *filename) { replaceStr(historyBackgroundFilenameTemp, filename); }
- __forceinline const char* getHistoryBackgroundFilenameTemp() { return historyBackgroundFilenameTemp; }
-
- __forceinline void setHistoryCssFilenameTemp(const char *filename) { replaceStr(historyCssFilenameTemp, filename); }
- __forceinline const char* getHistoryCssFilenameTemp() { return historyCssFilenameTemp; }
-
- __forceinline void setHistoryTemplateFilenameTemp(const char *filename) { replaceStr(historyTemplateFilenameTemp, filename); }
- __forceinline const char* getHistoryTemplateFilenameTemp() { return historyTemplateFilenameTemp; }
-
- void copyToTemp();
- void copyFromTemp();
};
-class Options {
-private:
- static int generalFlags;
- static bool isInited;
- static bool bSmileyAdd;
- static int avatarServiceFlags;
- static ProtocolSettings* protocolList;
-public:
- enum MODES {
+namespace Options
+{
+ enum
+ {
MODE_COMPATIBLE = 0,
MODE_CSS = 1,
MODE_TEMPLATE = 2
};
- enum OPTIONS {
+
+ enum OPTIONS
+ {
GENERAL_ENABLE_BBCODES = 0x000001,
GENERAL_ENABLE_FLASH = 0x000004,
GENERAL_SMILEYINNAMES = 0x000010,
@@ -253,24 +163,20 @@ public: LOG_IMAGE_SCROLL = 0x020000
};
- enum AVATARSERVICEFLAGS {
- AVATARSERVICE_PRESENT = 0x0001,
- };
+
+ extern int generalFlags;
+ extern bool isInited, bHasSmileyAdd, bHasAvs;
+
+ int getEmbedSize();
+ void setEmbedSize(int);
+
+ ProtocolSettings* getProtocolSettings(const char *protocolName);
+ ProtocolSettings* getDefaultSettings();
- static void setGeneralFlags(int flags);
- static int getGeneralFlags();
- static void setEmbedsize(int size);
- static int getEmbedsize();
-
- static bool isSmileyAdd();
- static int getAvatarServiceFlags();
- static void init();
- static void uninit();
- static void saveProtocolSettings();
- static void resetProtocolSettings();
- static ProtocolSettings*getProtocolSettings();
- static ProtocolSettings*getProtocolSettings(const char *protocolName);
- static void Reload();
+ void init();
+ void uninit();
+ void saveProtocolSettings();
+ void reload();
};
#endif
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 1440221bc8..84086986c6 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -38,7 +38,7 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto) wchar_t tmpPath[MAX_PATH];
wchar_t *result = nullptr;
- if (Options::getAvatarServiceFlags() == Options::AVATARSERVICE_PRESENT) {
+ if (Options::bHasAvs) {
AVATARCACHEENTRY *ace;
if (hContact == NULL)
ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)szProto);
diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp index 68d47269aa..aebc99d09f 100644 --- a/plugins/IEView/src/TextToken.cpp +++ b/plugins/IEView/src/TextToken.cpp @@ -296,7 +296,7 @@ TextToken* TextToken::tokenizeSmileys(MCONTACT hContact, const char *proto, cons {
TextToken *firstToken = nullptr, *lastToken = nullptr;
int l = (int)mir_wstrlen(text);
- if (!Options::isSmileyAdd())
+ if (!Options::bHasSmileyAdd)
return new TextToken(TEXT, text, l);
SMADD_BATCHPARSE2 sp;
@@ -514,7 +514,7 @@ void TextToken::toString(CMStringW &str) eLink = htmlEncode(wlink);
{
const wchar_t *linkPrefix = type == WWWLINK ? L"http://" : L"";
- if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_EMBED)) {
+ if ((Options::generalFlags & Options::GENERAL_ENABLE_EMBED)) {
wchar_t *match = wcsstr(wlink, L"youtube.com");
if (match != nullptr) {
match = wcsstr(match + 11, L"v=");
@@ -524,10 +524,8 @@ void TextToken::toString(CMStringW &str) int len = match2 != nullptr ? match2 - match : (int)mir_wstrlen(match);
match = mir_wstrdup(match);
match[len] = 0;
- int width = 0;
- int height = 0;
- int Embedsize = Options::getEmbedsize();
- switch (Embedsize) {
+ int width, height;
+ switch (Options::getEmbedSize()) {
case 0:
width = 320;
height = 205;
@@ -544,7 +542,9 @@ void TextToken::toString(CMStringW &str) width = 640;
height = 390;
break;
-
+ default:
+ width = height = 0;
+ break;
};
str.AppendFormat(L"<div><object width=\"%d\" height=\"%d\">\
@@ -563,7 +563,7 @@ void TextToken::toString(CMStringW &str) break;
case SMILEY:
eText = htmlEncode(wtext);
- if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_FLASH) && (wcsstr(wlink, L".swf") != nullptr)) {
+ if ((Options::generalFlags & Options::GENERAL_ENABLE_FLASH) && (wcsstr(wlink, L".swf") != nullptr)) {
str.AppendFormat(L"<span title=\"%s\" class=\"img\"><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" \
codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\" >\
<param NAME=\"movie\" VALUE=\"%s\"><param NAME=\"quality\" VALUE=\"high\"><PARAM NAME=\"loop\" VALUE=\"true\"></object></span>",
@@ -595,7 +595,7 @@ void TextToken::toString(CMStringW &str) break;
case BB_IMG:
eText = htmlEncode(wtext);
- if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_FLASH) && eText != nullptr && (wcsstr(eText, L".swf") != nullptr)) {
+ if ((Options::generalFlags & Options::GENERAL_ENABLE_FLASH) && eText != nullptr && (wcsstr(eText, L".swf") != nullptr)) {
str.AppendFormat(L"<div style=\"width: 100%%; border: 0; overflow: hidden;\"><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" \
codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\" width=\"100%%\" >\
<param NAME=\"movie\" VALUE=\"%s\"><param NAME=\"quality\" VALUE=\"high\"><PARAM NAME=\"loop\" VALUE=\"true\"></object></div>",
@@ -611,7 +611,7 @@ void TextToken::toString(CMStringW &str) case BB_BIMG:
eText = htmlEncode(mir_ptr<wchar_t>(Utils::toAbsolute(wtext)));
- if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_FLASH) && (wcsstr(eText, L".swf") != nullptr)) {
+ if ((Options::generalFlags & Options::GENERAL_ENABLE_FLASH) && (wcsstr(eText, L".swf") != nullptr)) {
str.AppendFormat(L"<div style=\"width: 100%%; border: 0; overflow: hidden;\"><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" \
codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\" width=\"100%%\" >\
<param NAME=\"movie\" VALUE=\"%s\"><param NAME=\"quality\" VALUE=\"high\"><PARAM NAME=\"loop\" VALUE=\"true\"></object></div>",
diff --git a/plugins/IEView/src/ieview_services.cpp b/plugins/IEView/src/ieview_services.cpp index 0681854e12..1a14332b91 100644 --- a/plugins/IEView/src/ieview_services.cpp +++ b/plugins/IEView/src/ieview_services.cpp @@ -108,6 +108,6 @@ INT_PTR HandleIENavigate(WPARAM, LPARAM lParam) INT_PTR ReloadOptions(WPARAM, LPARAM)
{
- Options::Reload();
+ Options::reload();
return 0;
}
\ No newline at end of file diff --git a/plugins/IEView/src/version.h b/plugins/IEView/src/version.h index e617e9f5a1..a677900d4f 100644 --- a/plugins/IEView/src/version.h +++ b/plugins/IEView/src/version.h @@ -1,5 +1,5 @@ #define __MAJOR_VERSION 1 -#define __MINOR_VERSION 5 +#define __MINOR_VERSION 6 #define __RELEASE_NUM 0 #define __BUILD_NUM 1 |