From 9d9403324aa8f9db857953fc1d4f25af35d70911 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 4 Oct 2019 18:54:45 +0300 Subject: IEView: unused builders removed --- plugins/ExternalAPI/m_ieview.h | 2 - plugins/IEView/src/ChatHTMLBuilder.cpp | 266 ------------------------------ plugins/IEView/src/ChatHTMLBuilder.h | 41 ----- plugins/IEView/src/HistoryHTMLBuilder.h | 6 +- plugins/IEView/src/MUCCHTMLBuilder.cpp | 280 -------------------------------- plugins/IEView/src/MUCCHTMLBuilder.h | 41 ----- plugins/IEView/src/ieview_services.cpp | 8 +- plugins/IEView/src/stdafx.h | 2 - plugins/Popup/src/history.cpp | 2 +- 9 files changed, 5 insertions(+), 643 deletions(-) delete mode 100644 plugins/IEView/src/ChatHTMLBuilder.cpp delete mode 100644 plugins/IEView/src/ChatHTMLBuilder.h delete mode 100644 plugins/IEView/src/MUCCHTMLBuilder.cpp delete mode 100644 plugins/IEView/src/MUCCHTMLBuilder.h diff --git a/plugins/ExternalAPI/m_ieview.h b/plugins/ExternalAPI/m_ieview.h index 7b5b866634..d02d3cdccc 100644 --- a/plugins/ExternalAPI/m_ieview.h +++ b/plugins/ExternalAPI/m_ieview.h @@ -31,8 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* IEView window type/mode */ #define IEWM_TABSRMM 1 // TabSRMM-compatible HTML builder #define IEWM_SCRIVER 3 // Scriver-compatible HTML builder -#define IEWM_MUCC 4 // MUCC group chats GUI -#define IEWM_CHAT 5 // chat.dll group chats GUI #define IEWM_HISTORY 6 // history viewer #define IEWM_BROWSER 256 // empty browser window diff --git a/plugins/IEView/src/ChatHTMLBuilder.cpp b/plugins/IEView/src/ChatHTMLBuilder.cpp deleted file mode 100644 index 0a108fb138..0000000000 --- a/plugins/IEView/src/ChatHTMLBuilder.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/* - -IEView Plugin for Miranda IM -Copyright (C) 2005-2010 Piotr Piastucki - -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; either version 2 -of the License, or (at your option) any later version. - -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, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "stdafx.h" - -#define CHATMOD "Chat" -#define CHATFONTMOD "ChatFonts" -#define CHAT_ICON_FLAGS "IconFlags" - -#define FONTF_BOLD 1 -#define FONTF_ITALIC 2 -#define FONTF_UNDERLINE 4 - -#define FONT_NUM 17 - -static const char *classNames[] = { - ".timestamp", ".nameIn", ".nameOut", ".userJoined", ".userLeft", ".userDisconnected", - ".userKicked", ".nickChange", ".notice", - ".messageIn", ".messageOut", ".topicChange", ".information", ".statusEnable", ".statusDisable", - ".action", ".highlight" -}; - -ChatHTMLBuilder::ChatHTMLBuilder() -{ - setLastEventType(-1); - setLastEventTime(time(0)); -} - -void ChatHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) -{ - char str[32]; - int style; - DBVARIANT dbv; - if (colour) { - mir_snprintf(str, "Font%dCol", i); - *colour = db_get_dw(0, CHATFONTMOD, str, 0x000000); - } - if (lf) { - mir_snprintf(str, "Font%dSize", i); - lf->lfHeight = (char)db_get_b(0, CHATFONTMOD, str, 10); - lf->lfHeight = abs(lf->lfHeight); - lf->lfWidth = 0; - lf->lfEscapement = 0; - lf->lfOrientation = 0; - mir_snprintf(str, "Font%dSty", i); - style = db_get_b(0, CHATFONTMOD, str, 0); - lf->lfWeight = style & FONTF_BOLD ? FW_BOLD : FW_NORMAL; - lf->lfItalic = style & FONTF_ITALIC ? 1 : 0; - lf->lfUnderline = style & FONTF_UNDERLINE ? 1 : 0; - lf->lfStrikeOut = 0; - mir_snprintf(str, "Font%dSet", i); - lf->lfCharSet = db_get_b(0, CHATFONTMOD, str, DEFAULT_CHARSET); - lf->lfOutPrecision = OUT_DEFAULT_PRECIS; - lf->lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf->lfQuality = DEFAULT_QUALITY; - lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; - mir_snprintf(str, "Font%d", i); - if (db_get_s(0, CHATFONTMOD, str, &dbv)) - strncpy_s(lf->lfFaceName, "Verdana", _TRUNCATE); - else { - strncpy_s(lf->lfFaceName, dbv.pszVal, _TRUNCATE); - db_free(&dbv); - } - } -} - -char* ChatHTMLBuilder::timestampToString(time_t time) -{ - static char szResult[512]; - static char str[80]; - char *pszStamp = "[%H:%M]"; - strftime(str, 79, pszStamp, localtime(&time)); - mir_strncpy(szResult, ptrA(mir_utf8encode(str)), 500); - return szResult; -} - -void ChatHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) -{ - LOGFONTA lf; - COLORREF color; - - ProtocolSettings *protoSettings = getChatProtocolSettings(event->hContact); - if (protoSettings == nullptr) - return; - - if (protoSettings->getChatMode() == Options::MODE_TEMPLATE) - return; - - CMStringA str; - if (protoSettings->getChatMode() == Options::MODE_CSS) { - const char *externalCSS = protoSettings->getChatCssFilename(); - str.AppendFormat("\n", externalCSS); - } - else { - HDC hdc = GetDC(nullptr); - int logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY); - ReleaseDC(nullptr, hdc); - str.Append(""); - str.Append("\n"); - } - - if (!str.IsEmpty()) - view->write(str); - - setLastEventType(-1); -} - -/* WORK IN PROGRESS: - * The following method is going to be completely rewritten soon. Do not modify or complain for the time being... - */ - -void ChatHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) -{ - DWORD iconFlags = db_get_dw(0, CHATMOD, CHAT_ICON_FLAGS, 0); - IEVIEWEVENTDATA* eventData = event->eventData; - for (int eventIdx = 0; eventData != nullptr && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) { - const char *iconFile = ""; - DWORD dwData = eventData->dwData; - bool isSent = eventData->bIsMe != 0; - const char *className = ""; - bool showIcon = false; - - ptrA szName, szText; - if (eventData->dwFlags & IEEDF_UNICODE_TEXT) - szText = encodeUTF8(NULL, eventData->szText.w, ENF_ALL | ENF_CHAT_FORMATTING, isSent); - else - szText = encodeUTF8(NULL, eventData->szText.a, ENF_ALL | ENF_CHAT_FORMATTING, isSent); - - if (eventData->dwFlags & IEEDF_UNICODE_NICK) - szName = encodeUTF8(NULL, eventData->szNick.w, ENF_NAMESMILEYS, true); - else - szName = encodeUTF8(NULL, eventData->szNick.a, ENF_NAMESMILEYS, true); - - if (eventData->iType == IEED_GC_EVENT_MESSAGE) { - iconFile = isSent ? "message_out_chat.gif" : "message_in_chat.gif"; - showIcon = (iconFlags & (isSent ? GC_EVENT_MESSAGE : GC_EVENT_MESSAGE)) != 0; - className = isSent ? "messageOut" : "messageIn"; - } - else { - if (eventData->iType == IEED_GC_EVENT_ACTION) { - iconFile = "action.gif"; - className = "action"; - } - else if (eventData->iType == IEED_GC_EVENT_JOIN) { - iconFile = "join.gif"; - className = "userJoined"; - } - else if (eventData->iType == IEED_GC_EVENT_PART) { - iconFile = "part.gif"; - className = "userLeft"; - } - else if (eventData->iType == IEED_GC_EVENT_QUIT) { - iconFile = "quit.gif"; - className = "userDisconnected"; - } - else if (eventData->iType == IEED_GC_EVENT_NICK) { - iconFile = "nick.gif"; - className = "nickChange"; - } - else if (eventData->iType == IEED_GC_EVENT_KICK) { - iconFile = "kick.gif"; - className = "userKicked"; - } - else if (eventData->iType == IEED_GC_EVENT_NOTICE) { - iconFile = "notice.gif"; - className = "notice"; - } - else if (eventData->iType == IEED_GC_EVENT_TOPIC) { - iconFile = "topic.gif"; - className = "topicChange"; - } - else if (eventData->iType == IEED_GC_EVENT_ADDSTATUS) { - iconFile = "addstatus.gif"; - className = "statusEnable"; - } - else if (eventData->iType == IEED_GC_EVENT_REMOVESTATUS) { - iconFile = "removestatus.gif"; - className = "statusDisable"; - } - else if (eventData->iType == IEED_GC_EVENT_INFORMATION) { - iconFile = "info.gif"; - className = "information"; - } - } - - CMStringA str(FORMAT, "
", isSent ? "divOut" : "divIn"); - if (dwData & IEEDD_GC_SHOW_ICON) - Utils::appendIcon(str, iconFile); - - if (dwData & IEEDD_GC_SHOW_TIME) - str.AppendFormat("%s ", timestampToString(eventData->time)); - - if ((dwData & IEEDD_GC_SHOW_NICK) && eventData->iType == IEED_GC_EVENT_MESSAGE) - str.AppendFormat("%s: ", isSent ? "nameOut" : "nameIn", szName.get()); - - if (dwData & IEEDD_GC_MSG_ON_NEW_LINE) - str.Append("
"); - - str.AppendFormat("", className); - str.Append(szText); - str.Append("
\n"); - - if (!str.IsEmpty()) - view->write(str); - } -} - -void ChatHTMLBuilder::appendEvent(IEView *view, IEVIEWEVENT *event) -{ - ProtocolSettings *protoSettings = getChatProtocolSettings(event->hContact); - if (protoSettings != nullptr) - appendEventNonTemplate(view, event); -} - -bool ChatHTMLBuilder::isDbEventShown(DBEVENTINFO*) -{ - return true; -} diff --git a/plugins/IEView/src/ChatHTMLBuilder.h b/plugins/IEView/src/ChatHTMLBuilder.h deleted file mode 100644 index 445912251b..0000000000 --- a/plugins/IEView/src/ChatHTMLBuilder.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - -IEView Plugin for Miranda IM -Copyright (C) 2005-2010 Piotr Piastucki - -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; either version 2 -of the License, or (at your option) any later version. - -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, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -class ChatHTMLBuilder; - -#ifndef CHATTMLBUILDER_INCLUDED -#define CHATHTMLBUILDER_INCLUDED - -#include "HTMLBuilder.h" - -class ChatHTMLBuilder :public HTMLBuilder -{ -protected: - void loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour); - char *timestampToString(time_t time); - void appendEventNonTemplate(IEView *, IEVIEWEVENT *event); - bool isDbEventShown(DBEVENTINFO * dbei); -public: - ChatHTMLBuilder(); - void buildHead(IEView *, IEVIEWEVENT *event); - void appendEvent(IEView *, IEVIEWEVENT *event); -}; - -#endif diff --git a/plugins/IEView/src/HistoryHTMLBuilder.h b/plugins/IEView/src/HistoryHTMLBuilder.h index 0a7b5386b0..f5023d7884 100644 --- a/plugins/IEView/src/HistoryHTMLBuilder.h +++ b/plugins/IEView/src/HistoryHTMLBuilder.h @@ -28,13 +28,13 @@ class HistoryHTMLBuilder; class HistoryHTMLBuilder :public TemplateHTMLBuilder { protected: - void loadMsgDlgFont(const char *, LOGFONTA * lf, COLORREF * colour, COLORREF * bkgColour); + void loadMsgDlgFont(const char *, LOGFONTA *lf, COLORREF *colour, COLORREF *bkgColour); char *timestampToString(time_t check); - bool isDbEventShown(DBEVENTINFO * dbei); + bool isDbEventShown(DBEVENTINFO *dbei); void appendEventNonTemplate(IEView *, IEVIEWEVENT *event); const char *getTemplateFilename(ProtocolSettings *); - const char *getTemplateFilenameRtl(ProtocolSettings *); int getFlags(ProtocolSettings *); + public: HistoryHTMLBuilder(); void buildHead(IEView *, IEVIEWEVENT *event); diff --git a/plugins/IEView/src/MUCCHTMLBuilder.cpp b/plugins/IEView/src/MUCCHTMLBuilder.cpp deleted file mode 100644 index 2fae53459e..0000000000 --- a/plugins/IEView/src/MUCCHTMLBuilder.cpp +++ /dev/null @@ -1,280 +0,0 @@ -/* - -IEView Plugin for Miranda IM -Copyright (C) 2005-2010 Piotr Piastucki - -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; either version 2 -of the License, or (at your option) any later version. - -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, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ - -#include "stdafx.h" - -#define MUCCMOD "MUCC" - -#define FONTF_BOLD 1 -#define FONTF_ITALIC 2 -#define FONTF_UNDERLINE 4 - -#define FONT_NUM 9 - -static const char *classNames[] = { - ".timestamp", ".nameIn", ".nameOut", ".messageIn", ".messageOut", ".userJoined", ".userLeft", ".topicChange", - ".error" -}; - -MUCCHTMLBuilder::MUCCHTMLBuilder() -{ - setLastEventType(-1); - setLastEventTime(time(0)); -} - -void MUCCHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) -{ - char str[32]; - int style; - DBVARIANT dbv; - if (colour) { - mir_snprintf(str, "Font%dCol", i); - *colour = db_get_dw(0, MUCCMOD, str, 0x000000); - } - if (lf) { - mir_snprintf(str, "Font%dSize", i); - lf->lfHeight = (char)db_get_b(0, MUCCMOD, str, 10); - lf->lfHeight = abs(lf->lfHeight); - lf->lfWidth = 0; - lf->lfEscapement = 0; - lf->lfOrientation = 0; - mir_snprintf(str, "Font%dStyle", i); - style = db_get_b(0, MUCCMOD, str, 0); - lf->lfWeight = style & FONTF_BOLD ? FW_BOLD : FW_NORMAL; - lf->lfItalic = style & FONTF_ITALIC ? 1 : 0; - lf->lfUnderline = style & FONTF_UNDERLINE ? 1 : 0; - lf->lfStrikeOut = 0; - mir_snprintf(str, "Font%dSet", i); - lf->lfCharSet = db_get_b(0, MUCCMOD, str, DEFAULT_CHARSET); - lf->lfOutPrecision = OUT_DEFAULT_PRECIS; - lf->lfClipPrecision = CLIP_DEFAULT_PRECIS; - lf->lfQuality = DEFAULT_QUALITY; - lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE; - mir_snprintf(str, "Font%dFace", i); - if (db_get_s(0, MUCCMOD, str, &dbv)) - strncpy_s(lf->lfFaceName, "Verdana", _TRUNCATE); - else { - strncpy_s(lf->lfFaceName, dbv.pszVal, _TRUNCATE); - db_free(&dbv); - } - } -} - -char *MUCCHTMLBuilder::timestampToString(DWORD dwData, time_t check) -{ - static char szResult[512]; - char str[80]; - const char *szFormat; - - szResult[0] = '\0'; - struct tm tm_now, tm_today; - time_t now = time(0); - time_t today; - tm_now = *localtime(&now); - tm_today = tm_now; - tm_today.tm_hour = tm_today.tm_min = tm_today.tm_sec = 0; - today = mktime(&tm_today); - if (dwData & IEEDD_MUCC_SHOW_DATE && dwData & IEEDD_MUCC_SHOW_TIME) { - if (dwData & IEEDD_MUCC_LONG_DATE) - szFormat = (dwData & IEEDD_MUCC_SECONDS) ? "D s" : "D t"; - else - szFormat = (dwData & IEEDD_MUCC_SECONDS) ? "d s" : "d t"; - } - else if (dwData & IEEDD_MUCC_SHOW_DATE) - szFormat = dwData & IEEDD_MUCC_LONG_DATE ? "D" : "d"; - else if (dwData & IEEDD_MUCC_SHOW_TIME) - szFormat = dwData & IEEDD_MUCC_SECONDS ? "s" : "t"; - else - szFormat = (char *)""; - - TimeZone_ToString(check, szFormat, str, _countof(str)); - mir_strncat(szResult, str, _countof(szResult) - mir_strlen(szResult)); - mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500); - return szResult; -} - -void MUCCHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) -{ - LOGFONTA lf; - COLORREF color; - ProtocolSettings *protoSettings = getChatProtocolSettings(event->hContact); - if (protoSettings == nullptr) - return; - - if (protoSettings->getChatMode() == Options::MODE_TEMPLATE) - return; - - CMStringA str; - if (protoSettings->getChatMode() == Options::MODE_CSS) { - const char *externalCSS = protoSettings->getChatCssFilename(); - str.AppendFormat("\n", externalCSS); - } - else { - HDC hdc = GetDC(nullptr); - int logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY); - ReleaseDC(nullptr, hdc); - str.Append(""); - str.Append("\n"); - } - - if (!str.IsEmpty()) - view->write(str); - - setLastEventType(-1); -} - -void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) -{ - IEVIEWEVENTDATA* eventData = event->eventData; - for (int eventIdx = 0; eventData != nullptr && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) { - DWORD dwData = eventData->dwData; - bool isSent = eventData->bIsMe != 0; - CMStringA str, style; - ptrA szName, szText; - if (eventData->iType == IEED_MUCC_EVENT_MESSAGE) { - if (eventData->dwFlags & IEEDF_UNICODE_TEXT) - szText = encodeUTF8(NULL, eventData->szText.w, ENF_ALL, isSent); - else - szText = encodeUTF8(NULL, eventData->szText.a, ENF_ALL, isSent); - - if (eventData->dwFlags & IEEDF_UNICODE_NICK) - szName = encodeUTF8(NULL, eventData->szNick.w, ENF_NAMESMILEYS, true); - else - szName = encodeUTF8(NULL, eventData->szNick.a, ENF_NAMESMILEYS, true); - - str.AppendFormat("
", isSent ? "divOut" : "divIn"); - if (dwData & IEEDD_MUCC_SHOW_TIME || dwData & IEEDD_MUCC_SHOW_DATE) - str.AppendFormat("%s ", "timestamp", timestampToString(dwData, eventData->time)); - - if (dwData & IEEDD_MUCC_SHOW_NICK) - str.AppendFormat("%s: ", isSent ? "nameOut" : "nameIn", szName.get()); - - if (dwData & IEEDD_MUCC_MSG_ON_NEW_LINE) - str.Append("
"); - - const char *className = isSent ? "messageOut" : "messageIn"; - if (eventData->dwFlags & IEEDF_FORMAT_SIZE && eventData->fontSize > 0) - style.AppendFormat("font-size:%dpt;", eventData->fontSize); - - if (eventData->dwFlags & IEEDF_FORMAT_COLOR && eventData->color != 0xFFFFFFFF) - style.AppendFormat("color:#%06X;", ((eventData->color & 0xFF) << 16) | (eventData->color & 0xFF00) | ((eventData->color & 0xFF0000) >> 16)); - - if (eventData->dwFlags & IEEDF_FORMAT_FONT) - style.AppendFormat("font-family:%s;", eventData->fontName); - - if (eventData->dwFlags & IEEDF_FORMAT_STYLE) { - style.AppendFormat("font-weight: %s;", eventData->fontStyle & IE_FONT_BOLD ? "bold" : "normal"); - style.AppendFormat("font-style: %s;", eventData->fontStyle & IE_FONT_ITALIC ? "italic" : "normal"); - style.AppendFormat("text-decoration: %s;", eventData->fontStyle & IE_FONT_UNDERLINE ? "underline" : "none"); - } - str.AppendFormat("%s", className, style.c_str(), szText.get()); - str.Append("
\n"); - } - else if (eventData->iType == IEED_MUCC_EVENT_JOINED || eventData->iType == IEED_MUCC_EVENT_LEFT || eventData->iType == IEED_MUCC_EVENT_TOPIC) { - const char *className, *divName, *eventText; - if (eventData->iType == IEED_MUCC_EVENT_JOINED) { - className = "userJoined"; - divName = "divUserJoined"; - eventText = LPGEN("%s has joined."); - szText = encodeUTF8(NULL, eventData->szNick.a, ENF_NONE, isSent); - } - else if (eventData->iType == IEED_MUCC_EVENT_LEFT) { - className = "userLeft"; - divName = "divUserJoined"; - eventText = LPGEN("%s has left."); - szText = encodeUTF8(NULL, eventData->szNick.a, ENF_NONE, isSent); - } - else { - className = "topicChange"; - divName = "divTopicChange"; - eventText = LPGEN("The topic is %s."); - szText = encodeUTF8(NULL, eventData->szText.a, ENF_ALL, isSent); - } - str.AppendFormat("
", divName); - if (dwData & IEEDD_MUCC_SHOW_TIME || dwData & IEEDD_MUCC_SHOW_DATE) - str.AppendFormat("%s ", "timestamp", timestampToString(dwData, eventData->time)); - - str.AppendFormat("", className); - str.AppendFormat(Translate(eventText), szText.get()); - str.Append(""); - str.Append("
\n"); - } - else if (eventData->iType == IEED_MUCC_EVENT_ERROR) { - const char *className = "error"; - szText = encodeUTF8(NULL, eventData->szText.a, ENF_NONE, isSent); - str.AppendFormat("
", "divError"); - str.AppendFormat(" %s: %s", className, Translate("Error"), szText.get()); - str.Append("
\n"); - } - - if (!str.IsEmpty()) - view->write(str); - } -} - -void MUCCHTMLBuilder::appendEvent(IEView *view, IEVIEWEVENT *event) -{ - ProtocolSettings *protoSettings = getChatProtocolSettings(event->hContact); - if (protoSettings != nullptr) - appendEventNonTemplate(view, event); -} - -bool MUCCHTMLBuilder::isDbEventShown(DBEVENTINFO *) -{ - return true; -} diff --git a/plugins/IEView/src/MUCCHTMLBuilder.h b/plugins/IEView/src/MUCCHTMLBuilder.h deleted file mode 100644 index 0837c2d4fe..0000000000 --- a/plugins/IEView/src/MUCCHTMLBuilder.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - -IEView Plugin for Miranda IM -Copyright (C) 2005-2010 Piotr Piastucki - -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; either version 2 -of the License, or (at your option) any later version. - -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, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -class MUCCHTMLBuilder; - -#ifndef MUCCHTMLBUILDER_INCLUDED -#define MUCCHTMLBUILDER_INCLUDED - -#include "HTMLBuilder.h" - -class MUCCHTMLBuilder :public HTMLBuilder -{ -protected: - void loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour); - char *timestampToString(DWORD dwFlags, time_t check); - void appendEventNonTemplate(IEView *, IEVIEWEVENT *event); - bool isDbEventShown(DBEVENTINFO * dbei); -public: - MUCCHTMLBuilder(); - void buildHead(IEView *, IEVIEWEVENT *event); - void appendEvent(IEView *, IEVIEWEVENT *event); -}; - -#endif diff --git a/plugins/IEView/src/ieview_services.cpp b/plugins/IEView/src/ieview_services.cpp index 1a14332b91..2db0aa73de 100644 --- a/plugins/IEView/src/ieview_services.cpp +++ b/plugins/IEView/src/ieview_services.cpp @@ -26,14 +26,8 @@ INT_PTR HandleIEWindow(WPARAM, LPARAM lParam) IEVIEWWINDOW *window = (IEVIEWWINDOW *)lParam; Options::init(); if (window->iType == IEW_CREATE) { - HTMLBuilder *builder = nullptr; + HTMLBuilder *builder; switch (window->dwMode) { - case IEWM_MUCC: - builder = new MUCCHTMLBuilder(); - break; - case IEWM_CHAT: - builder = new ChatHTMLBuilder(); - break; case IEWM_TABSRMM: builder = new TabSRMMHTMLBuilder(); break; diff --git a/plugins/IEView/src/stdafx.h b/plugins/IEView/src/stdafx.h index a6c9a689f1..3e72669271 100644 --- a/plugins/IEView/src/stdafx.h +++ b/plugins/IEView/src/stdafx.h @@ -61,14 +61,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "ieview_services.h" #include "Options.h" #include "version.h" -#include "ChatHTMLBuilder.h" #include "HistoryHTMLBuilder.h" #include "HTMLBuilder.h" #include "resource.h" #include "ScriverHTMLBuilder.h" #include "TabSRMMHTMLBuilder.h" #include "TemplateHTMLBuilder.h" -#include "MUCCHTMLBuilder.h" #include "Template.h" #include "TextToken.h" #include "external_funcs.h" diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp index e0460aafab..d079bc1ac4 100644 --- a/plugins/Popup/src/history.cpp +++ b/plugins/Popup/src/history.cpp @@ -140,7 +140,7 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara IEVIEWWINDOW ieWindow = {}; ieWindow.iType = IEW_CREATE; - ieWindow.dwMode = IEWM_MUCC; + ieWindow.dwMode = IEWM_HISTORY; ieWindow.parent = hwnd; ieWindow.cx = 100; ieWindow.cy = 100; -- cgit v1.2.3