diff options
Diffstat (limited to 'plugins')
26 files changed, 1220 insertions, 1159 deletions
diff --git a/plugins/IEView/ieview_12.vcxproj b/plugins/IEView/ieview_12.vcxproj index e2acf331cf..2fe1b68d71 100644 --- a/plugins/IEView/ieview_12.vcxproj +++ b/plugins/IEView/ieview_12.vcxproj @@ -81,7 +81,7 @@ <MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <WarningLevel>Level3</WarningLevel>
+ <WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<ExceptionHandling>false</ExceptionHandling>
<PrecompiledHeader>Use</PrecompiledHeader>
@@ -108,7 +108,7 @@ <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <WarningLevel>Level3</WarningLevel>
+ <WarningLevel>Level4</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>ieview_common.h</PrecompiledHeaderFile>
@@ -132,7 +132,7 @@ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level3</WarningLevel>
+ <WarningLevel>Level4</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>ieview_common.h</PrecompiledHeaderFile>
@@ -158,7 +158,7 @@ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level3</WarningLevel>
+ <WarningLevel>Level4</WarningLevel>
<ExceptionHandling>false</ExceptionHandling>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>ieview_common.h</PrecompiledHeaderFile>
diff --git a/plugins/IEView/src/ChatHTMLBuilder.cpp b/plugins/IEView/src/ChatHTMLBuilder.cpp index c5b65d489c..d29d519a23 100644 --- a/plugins/IEView/src/ChatHTMLBuilder.cpp +++ b/plugins/IEView/src/ChatHTMLBuilder.cpp @@ -55,7 +55,7 @@ void ChatHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) }
if (lf) {
mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
- lf->lfHeight = (char) db_get_b(NULL, CHATFONTMOD, str, 10);
+ lf->lfHeight = (char)db_get_b(NULL, CHATFONTMOD, str, 10);
lf->lfHeight = abs(lf->lfHeight);
lf->lfWidth = 0;
lf->lfEscapement = 0;
@@ -104,13 +104,14 @@ void ChatHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) return;
}
if (protoSettings->getChatMode() == Options::MODE_TEMPLATE) {
-// buildHeadTemplate(view, event);
+ // buildHeadTemplate(view, event);
return;
}
if (protoSettings->getChatMode() == Options::MODE_CSS) {
const char *externalCSS = protoSettings->getChatCssFilename();
Utils::appendText(&output, &outputSize, "<html><head><link rel=\"stylesheet\" href=\"%s\"/></head><body class=\"body\">\n", externalCSS);
- } else {
+ }
+ else {
HDC hdc = GetDC(NULL);
int logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(NULL, hdc);
@@ -118,33 +119,35 @@ void ChatHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) Utils::appendText(&output, &outputSize, "<style type=\"text/css\">\n");
COLORREF bkgColor = db_get_dw(NULL, CHATMOD, "BackgroundLog", 0xFFFFFF);
COLORREF inColor, outColor;
- bkgColor= (((bkgColor & 0xFF) << 16) | (bkgColor & 0xFF00) | ((bkgColor & 0xFF0000) >> 16));
+ bkgColor = (((bkgColor & 0xFF) << 16) | (bkgColor & 0xFF00) | ((bkgColor & 0xFF0000) >> 16));
inColor = outColor = bkgColor;
if (protoSettings->getChatFlags() & Options::LOG_IMAGE_ENABLED) {
Utils::appendText(&output, &outputSize, ".body {padding: 2px; text-align: left; background-attachment: %s; background-color: #%06X; background-image: url('%s'); overflow: auto;}\n",
- protoSettings->getChatFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int) bkgColor, protoSettings->getChatBackgroundFilename());
- } else {
+ protoSettings->getChatFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int)bkgColor, protoSettings->getChatBackgroundFilename());
+ }
+ else {
Utils::appendText(&output, &outputSize, ".body {margin: 0px; text-align: left; background-color: #%06X; overflow: auto;}\n",
- (int) bkgColor);
+ (int)bkgColor);
}
Utils::appendText(&output, &outputSize, ".link {color: #0000FF; text-decoration: underline;}\n");
Utils::appendText(&output, &outputSize, ".img {vertical-align: middle;}\n");
if (protoSettings->getChatFlags() & Options::LOG_IMAGE_ENABLED) {
Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
- } else {
- Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) inColor);
- Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) outColor);
}
- for(int i = 0; i < FONT_NUM; i++) {
+ else {
+ Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)inColor);
+ Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)outColor);
+ }
+ for (int i = 0; i < FONT_NUM; i++) {
loadMsgDlgFont(i, &lf, &color);
Utils::appendText(&output, &outputSize, "%s {font-family: %s; font-size: %dpt; font-weight: %s; color: #%06X; %s }\n",
- classNames[i],
- lf.lfFaceName,
- abs((signed char)lf.lfHeight) * 74 /logPixelSY ,
- lf.lfWeight >= FW_BOLD ? "bold" : "normal",
- (int)(((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16)),
- lf.lfItalic ? "font-style: italic;" : "");
+ classNames[i],
+ lf.lfFaceName,
+ abs((signed char)lf.lfHeight) * 74 / logPixelSY,
+ lf.lfWeight >= FW_BOLD ? "bold" : "normal",
+ (int)(((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16)),
+ lf.lfItalic ? "font-style: italic;" : "");
}
Utils::appendText(&output, &outputSize, "</style></head><body class=\"body\">\n");
}
@@ -163,7 +166,7 @@ void ChatHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) {
DWORD iconFlags = db_get_dw(NULL, CHATMOD, CHAT_ICON_FLAGS, 0);
IEVIEWEVENTDATA* eventData = event->eventData;
- for (int eventIdx = 0; eventData!=NULL && (eventIdx < event->count || event->count==-1); eventData = eventData->next, eventIdx++) {
+ for (int eventIdx = 0; eventData != NULL && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) {
//DWORD dwFlags = eventData->dwFlags;
const char *iconFile = "";
DWORD dwData = eventData->dwData;
@@ -182,7 +185,7 @@ void ChatHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) if (eventData->dwFlags & IEEDF_UNICODE_NICK)
szName = encodeUTF8(NULL, event->pszProto, eventData->pszNickW, ENF_NAMESMILEYS, true);
else
- szName = encodeUTF8(NULL, event->pszProto, (char *) eventData->pszNick, ENF_NAMESMILEYS, true);
+ szName = encodeUTF8(NULL, event->pszProto, (char *)eventData->pszNick, ENF_NAMESMILEYS, true);
if (eventData->iType == IEED_GC_EVENT_MESSAGE) {
iconFile = isSent ? "message_out_chat.gif" : "message_in_chat.gif";
@@ -193,34 +196,44 @@ void ChatHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) if (eventData->iType == IEED_GC_EVENT_ACTION) {
iconFile = "action.gif";
className = "action";
- } else if (eventData->iType == IEED_GC_EVENT_JOIN) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_JOIN) {
iconFile = "join.gif";
className = "userJoined";
- } else if (eventData->iType == IEED_GC_EVENT_PART) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_PART) {
iconFile = "part.gif";
className = "userLeft";
- } else if (eventData->iType == IEED_GC_EVENT_QUIT) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_QUIT) {
iconFile = "quit.gif";
className = "userDisconnected";
- } else if (eventData->iType == IEED_GC_EVENT_NICK) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_NICK) {
iconFile = "nick.gif";
className = "nickChange";
- } else if (eventData->iType == IEED_GC_EVENT_KICK) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_KICK) {
iconFile = "kick.gif";
className = "userKicked";
- } else if (eventData->iType == IEED_GC_EVENT_NOTICE) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_NOTICE) {
iconFile = "notice.gif";
className = "notice";
- } else if (eventData->iType == IEED_GC_EVENT_TOPIC) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_TOPIC) {
iconFile = "topic.gif";
className = "topicChange";
- } else if (eventData->iType == IEED_GC_EVENT_ADDSTATUS) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_ADDSTATUS) {
iconFile = "addstatus.gif";
className = "statusEnable";
- } else if (eventData->iType == IEED_GC_EVENT_REMOVESTATUS) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_REMOVESTATUS) {
iconFile = "removestatus.gif";
className = "statusDisable";
- } else if (eventData->iType == IEED_GC_EVENT_INFORMATION) {
+ }
+ else if (eventData->iType == IEED_GC_EVENT_INFORMATION) {
iconFile = "info.gif";
className = "information";
}
@@ -231,11 +244,11 @@ void ChatHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) }
if (dwData & IEEDD_GC_SHOW_TIME) {
Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s </span>",
- isSent ? "timestamp" : "timestamp", timestampToString(eventData->time));
+ isSent ? "timestamp" : "timestamp", timestampToString(eventData->time));
}
if ((dwData & IEEDD_GC_SHOW_NICK) && eventData->iType == IEED_GC_EVENT_MESSAGE) {
Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s: </span>",
- isSent ? "nameOut" : "nameIn", szName);
+ isSent ? "nameOut" : "nameIn", szName);
}
if (dwData & IEEDD_GC_MSG_ON_NEW_LINE) {
Utils::appendText(&output, &outputSize, "<br>");
@@ -256,14 +269,14 @@ void ChatHTMLBuilder::appendEvent(IEView *view, IEVIEWEVENT *event) if (protoSettings == NULL) {
return;
}
-// if (protoSettings->getSRMMMode() == Options::MODE_TEMPLATE) {
+ // if (protoSettings->getSRMMMode() == Options::MODE_TEMPLATE) {
// appendEventTemplate(view, event);
-// } else {
- appendEventNonTemplate(view, event);
-// }
+ // } else {
+ appendEventNonTemplate(view, event);
+ // }
}
-bool ChatHTMLBuilder::isDbEventShown(DBEVENTINFO * dbei)
+bool ChatHTMLBuilder::isDbEventShown(DBEVENTINFO *)
{
return true;
}
diff --git a/plugins/IEView/src/ChatHTMLBuilder.h b/plugins/IEView/src/ChatHTMLBuilder.h index 94f02bf77f..445912251b 100644 --- a/plugins/IEView/src/ChatHTMLBuilder.h +++ b/plugins/IEView/src/ChatHTMLBuilder.h @@ -25,7 +25,7 @@ class ChatHTMLBuilder; #include "HTMLBuilder.h"
-class ChatHTMLBuilder:public HTMLBuilder
+class ChatHTMLBuilder :public HTMLBuilder
{
protected:
void loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour);
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index 08d7f0ac50..de6b85d0d2 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -25,7 +25,7 @@ int HTMLBuilder::mimFlags = 0; HTMLBuilder::HTMLBuilder()
{
- lastIEViewEvent.cbSize = sizeof (IEVIEWEVENT);
+ lastIEViewEvent.cbSize = sizeof(IEVIEWEVENT);
lastIEViewEvent.iType = IEE_LOG_MEM_EVENTS;
lastIEViewEvent.codepage = CP_ACP;
lastIEViewEvent.pszProto = NULL;
@@ -42,7 +42,7 @@ HTMLBuilder::~HTMLBuilder() mir_free((void*)lastIEViewEvent.pszProto);
}
-bool HTMLBuilder::encode(MCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent)
+bool HTMLBuilder::encode(MCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent)
{
TextToken *token = NULL, *token2;
switch (level) {
@@ -62,16 +62,16 @@ 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::getGeneralFlags() & Options::GENERAL_SMILEYINNAMES) && (flags & ENF_NAMESMILEYS)))
token = TextToken::tokenizeSmileys(hContact, proto, text, isSent);
break;
}
- if (token!=NULL) {
+ if (token != NULL) {
for (token2 = token; token != NULL; token = token2) {
bool skip = false;
token2 = token->getNext();
if (token->getType() == TextToken::TEXT)
- skip = encode(hContact, proto, token->getTextW(), output, outputSize, level+1, flags, isSent);
+ skip = encode(hContact, proto, token->getTextW(), output, outputSize, level + 1, flags, isSent);
if (!skip)
token->toString(output, outputSize);
delete token;
@@ -216,7 +216,7 @@ void HTMLBuilder::getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut) ci.szProto = szProto;
ci.dwFlag = CNF_UNIQUEID;
buf[0] = 0;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) & ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)& ci)) {
switch (ci.type) {
case CNFT_ASCIIZ:
strncpy_s(buf, (char*)ci.pszVal, _TRUNCATE);
@@ -230,7 +230,7 @@ void HTMLBuilder::getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut) uinIn = mir_utf8encode(buf);
ci.hContact = NULL;
buf[0] = 0;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) & ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)& ci)) {
switch (ci.type) {
case CNFT_ASCIIZ:
strncpy_s(buf, (char*)ci.pszVal, _TRUNCATE);
@@ -247,14 +247,14 @@ void HTMLBuilder::getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut) wchar_t *HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto)
{
- CONTACTINFO ci = {0};
+ CONTACTINFO ci = { 0 };
wchar_t *szName = NULL;
ci.cbSize = sizeof(ci);
ci.hContact = hContact;
ci.szProto = (char *)szProto;
ci.dwFlag = CNF_DISPLAY | CNF_UNICODE;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) &ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci)) {
if (ci.type == CNFT_ASCIIZ) {
if (ci.pszVal) {
szName = mir_tstrdup(ci.pszVal);
@@ -265,7 +265,7 @@ wchar_t *HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto) if (szName != NULL) return szName;
ci.dwFlag = CNF_UNIQUEID;
- if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) &ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci)) {
if (ci.type == CNFT_ASCIIZ) {
if (ci.pszVal) {
szName = mir_tstrdup(ci.pszVal);
@@ -313,7 +313,7 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) else
szProto = getProto(event->hContact);
- IEVIEWEVENT newEvent = { sizeof (IEVIEWEVENT) };
+ IEVIEWEVENT newEvent = { sizeof(IEVIEWEVENT) };
newEvent.iType = IEE_LOG_MEM_EVENTS;
newEvent.codepage = CP_ACP;
if (event->cbSize >= IEVIEWEVENT_SIZE_V2)
@@ -324,15 +324,15 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) newEvent.hContact = event->hContact;
newEvent.hwnd = event->hwnd;
newEvent.eventData = NULL;
- for (int eventIdx = 0; hDbEvent!=NULL && (eventIdx < event->count || event->count==-1); eventIdx++) {
+ for (int eventIdx = 0; hDbEvent != NULL && (eventIdx < event->count || event->count == -1); eventIdx++) {
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.cbBlob = db_event_getBlobSize(hDbEvent);
if (dbei.cbBlob == 0xFFFFFFFF) {
hDbEvent = db_event_next(event->hContact, hDbEvent);
continue;
}
- dbei.pBlob = (PBYTE) malloc(dbei.cbBlob);
- db_event_get( hDbEvent, &dbei);
+ dbei.pBlob = (PBYTE)malloc(dbei.cbBlob);
+ db_event_get(hDbEvent, &dbei);
if (!(dbei.flags & DBEF_SENT) && (dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_URL)) {
db_event_markRead(event->hContact, hDbEvent);
CallService(MS_CLIST_REMOVEEVENT, event->hContact, (LPARAM)hDbEvent);
@@ -346,7 +346,7 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) eventData = new IEVIEWEVENTDATA;
eventData->cbSize = sizeof(IEVIEWEVENTDATA);
eventData->dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK | IEEDF_UNICODE_TEXT2 |
- (dbei.flags & DBEF_READ ? IEEDF_READ : 0) | (dbei.flags & DBEF_SENT ? IEEDF_SENT : 0) | (dbei.flags & DBEF_RTL ? IEEDF_RTL : 0);
+ (dbei.flags & DBEF_READ ? IEEDF_READ : 0) | (dbei.flags & DBEF_SENT ? IEEDF_SENT : 0) | (dbei.flags & DBEF_RTL ? IEEDF_RTL : 0);
if (event->dwFlags & IEEF_RTL)
eventData->dwFlags |= IEEDF_RTL;
@@ -402,14 +402,14 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) prevEventData->next = eventData;
else
newEvent.eventData = eventData;
-
+
prevEventData = eventData;
newEvent.count++;
event->hDbEventFirst = hDbEvent;
hDbEvent = db_event_next(event->hContact, hDbEvent);
}
appendEventNew(view, &newEvent);
- for ( IEVIEWEVENTDATA* eventData2 = newEvent.eventData; eventData2 != NULL; eventData2 = eventData) {
+ for (IEVIEWEVENTDATA* eventData2 = newEvent.eventData; eventData2 != NULL; eventData2 = eventData) {
eventData = eventData2->next;
mir_free((void*)eventData2->pszTextW);
mir_free((void*)eventData2->pszText2W);
@@ -420,7 +420,7 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(const char *protocolName)
{
- ProtocolSettings *protoSettings = Options::getProtocolSettings(protocolName);
+ ProtocolSettings *protoSettings = Options::getProtocolSettings(protocolName);
if (protoSettings == NULL || !protoSettings->isSRMMEnable())
protoSettings = Options::getProtocolSettings();
@@ -429,12 +429,12 @@ ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(const char *protocolName) ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(MCONTACT hContact)
{
- return getSRMMProtocolSettings( ptrA(getRealProto(hContact)));
+ return getSRMMProtocolSettings(ptrA(getRealProto(hContact)));
}
ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(const char *protocolName)
{
- ProtocolSettings *protoSettings = Options::getProtocolSettings(protocolName);
+ ProtocolSettings *protoSettings = Options::getProtocolSettings(protocolName);
if (protoSettings == NULL || !protoSettings->isHistoryEnable())
protoSettings = Options::getProtocolSettings();
@@ -444,14 +444,14 @@ ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(const char *protocolNa ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(MCONTACT hContact)
{
if (hContact != NULL)
- return getHistoryProtocolSettings( ptrA(getRealProto(hContact)));
+ return getHistoryProtocolSettings(ptrA(getRealProto(hContact)));
return Options::getProtocolSettings();
}
ProtocolSettings* HTMLBuilder::getChatProtocolSettings(const char *protocolName)
{
- ProtocolSettings *protoSettings = Options::getProtocolSettings(protocolName);
+ ProtocolSettings *protoSettings = Options::getProtocolSettings(protocolName);
if (protoSettings == NULL || !protoSettings->isChatEnable())
protoSettings = Options::getProtocolSettings();
@@ -460,12 +460,12 @@ ProtocolSettings* HTMLBuilder::getChatProtocolSettings(const char *protocolName) ProtocolSettings* HTMLBuilder::getChatProtocolSettings(MCONTACT hContact)
{
- return getChatProtocolSettings( ptrA(getRealProto(hContact)));
+ return getChatProtocolSettings(ptrA(getRealProto(hContact)));
}
void HTMLBuilder::setLastIEViewEvent(IEVIEWEVENT *event)
{
- lastIEViewEvent.cbSize = sizeof (IEVIEWEVENT);
+ lastIEViewEvent.cbSize = sizeof(IEVIEWEVENT);
lastIEViewEvent.iType = event->iType;
lastIEViewEvent.codepage = CP_ACP;
if (event->cbSize >= IEVIEWEVENT_SIZE_V2)
diff --git a/plugins/IEView/src/HTMLBuilder.h b/plugins/IEView/src/HTMLBuilder.h index 38152fa163..9e2f2e3939 100644 --- a/plugins/IEView/src/HTMLBuilder.h +++ b/plugins/IEView/src/HTMLBuilder.h @@ -49,12 +49,12 @@ protected: ENF_ALL = 255,
ENF_CHAT_FORMATTING = 256
};
-// virtual char *encode(const char *text, const char *proto, bool replaceSmiley);
+ // virtual char *encode(const char *text, const char *proto, bool replaceSmiley);
virtual char *encodeUTF8(MCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
virtual char *encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int flags, bool isSent);
virtual char *encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int cp, int flags, bool isSent);
virtual wchar_t *encode(MCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
- virtual bool encode(MCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent);
+ virtual bool encode(MCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent);
virtual char* getProto(MCONTACT hContact);
virtual char* getProto(const char *proto, MCONTACT hContact);
virtual char* getRealProto(MCONTACT hContact);
@@ -68,7 +68,7 @@ protected: virtual int getLastEventType();
virtual void setLastEventType(int);
virtual bool isSameDate(time_t time1, time_t time2);
- virtual bool isDbEventShown(DBEVENTINFO * dbei)=0;
+ virtual bool isDbEventShown(DBEVENTINFO * dbei) = 0;
virtual ProtocolSettings *getSRMMProtocolSettings(const char *protocolName);
virtual ProtocolSettings *getSRMMProtocolSettings(MCONTACT hContact);
virtual ProtocolSettings *getHistoryProtocolSettings(const char *protocolName);
@@ -76,14 +76,14 @@ protected: virtual ProtocolSettings *getChatProtocolSettings(const char *protocolName);
virtual ProtocolSettings *getChatProtocolSettings(MCONTACT hContact);
void setLastIEViewEvent(IEVIEWEVENT *event);
- virtual void buildHead(IEView *, IEVIEWEVENT *event)=0;
+ virtual void buildHead(IEView *, IEVIEWEVENT *event) = 0;
public:
HTMLBuilder();
virtual ~HTMLBuilder();
void appendEventOld(IEView *, IEVIEWEVENT *event);
void appendEventNew(IEView *, IEVIEWEVENT *event);
void clear(IEView *, IEVIEWEVENT *event);
- virtual void appendEvent(IEView *, IEVIEWEVENT *event)=0;
+ virtual void appendEvent(IEView *, IEVIEWEVENT *event) = 0;
};
#endif
diff --git a/plugins/IEView/src/HistoryHTMLBuilder.cpp b/plugins/IEView/src/HistoryHTMLBuilder.cpp index 812b3b5b3d..1672002100 100644 --- a/plugins/IEView/src/HistoryHTMLBuilder.cpp +++ b/plugins/IEView/src/HistoryHTMLBuilder.cpp @@ -79,7 +79,7 @@ bool HistoryHTMLBuilder::isDbEventShown(DBEVENTINFO * dbei) }
}
-char *HistoryHTMLBuilder::timestampToString(DWORD dwFlags, time_t check)
+char *HistoryHTMLBuilder::timestampToString(time_t check)
{
static char szResult[512];
char str[80];
@@ -88,7 +88,7 @@ char *HistoryHTMLBuilder::timestampToString(DWORD dwFlags, time_t check) dbtts.szDest = str;
szResult[0] = '\0';
dbtts.szFormat = (char *)"d t";
- CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM) & dbtts);
+ CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM)& dbtts);
strncat(szResult, str, 500);
mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500);
return szResult;
@@ -109,7 +109,7 @@ void HistoryHTMLBuilder::loadMsgDlgFont(const char *dbSetting, LOGFONTA * lf, CO }
if (lf) {
mir_snprintf(str, SIZEOF(str), "Font.%s.Size", dbSetting);
- lf->lfHeight = (char) db_get_b(NULL, HPPMOD, str, 10);
+ lf->lfHeight = (char)db_get_b(NULL, HPPMOD, str, 10);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
@@ -158,43 +158,46 @@ void HistoryHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) if (protoSettings == NULL) {
return;
}
- if (protoSettings->getHistoryMode() == Options::MODE_TEMPLATE) {
+ if (protoSettings->getHistoryMode() == Options::MODE_TEMPLATE) {
buildHeadTemplate(view, event, protoSettings);
return;
}
- if (protoSettings->getHistoryMode() == Options::MODE_CSS) {
+ if (protoSettings->getHistoryMode() == Options::MODE_CSS) {
const char *externalCSS = protoSettings->getHistoryCssFilename();
Utils::appendText(&output, &outputSize, "<html><head><link rel=\"stylesheet\" href=\"%s\"/></head><body class=\"body\">\n", externalCSS);
- } else {
+ }
+ else {
Utils::appendText(&output, &outputSize, "<html><head>");
Utils::appendText(&output, &outputSize, "<style type=\"text/css\">\n");
COLORREF lineColor = db_get_dw(NULL, HPPMOD, "LineColour", 0xFFFFFF);
- lineColor= 0;//(((lineColor & 0xFF) << 16) | (lineColor & 0xFF00) | ((lineColor & 0xFF0000) >> 16));
+ lineColor = 0;//(((lineColor & 0xFF) << 16) | (lineColor & 0xFF00) | ((lineColor & 0xFF0000) >> 16));
bkgColor = 0xFFFFFF;
if (protoSettings->getHistoryFlags() & Options::LOG_IMAGE_ENABLED) {
Utils::appendText(&output, &outputSize, ".body {padding: 2px; text-align: left; background-attachment: %s; background-color: #%06X; background-image: url('%s'); overflow: auto;}\n",
- protoSettings->getHistoryFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int) bkgColor, protoSettings->getHistoryBackgroundFilename());
- } else {
+ protoSettings->getHistoryFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int)bkgColor, protoSettings->getHistoryBackgroundFilename());
+ }
+ else {
Utils::appendText(&output, &outputSize, ".body {margin: 0px; text-align: left; background-color: #%06X; overflow: auto;}\n",
- (int) bkgColor);
+ (int)bkgColor);
}
Utils::appendText(&output, &outputSize, ".link {color: #0000FF; text-decoration: underline;}\n");
Utils::appendText(&output, &outputSize, ".img {float: left; vertical-align: middle;}\n");
- for(i = 0; i < DIV_FONT_NUM; i++) {
+ for (i = 0; i < DIV_FONT_NUM; i++) {
loadMsgDlgFont(dbDivSettingNames[i], &lf, &color, &bkgColor);
if (protoSettings->getHistoryFlags() & Options::LOG_IMAGE_ENABLED) {
Utils::appendText(&output, &outputSize, "%s {float: left; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; font-family: %s; font-size: %dpt; font-weight: %s; color: #%06X; %s}\n",
divClassNames[i],
- (int) lineColor,
+ (int)lineColor,
lf.lfFaceName,
lf.lfHeight,
lf.lfWeight >= FW_BOLD ? "bold" : "normal",
(int)(((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16)),
lf.lfItalic ? "font-style: italic;" : "");
- } else {
+ }
+ else {
Utils::appendText(&output, &outputSize, "%s {float: left; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; background-color: #%06X; font-family: %s; font-size: %dpt; font-weight: %s; color: #%06X; %s}\n",
divClassNames[i],
- (int) lineColor,
+ (int)lineColor,
(int)(((bkgColor & 0xFF) << 16) | (bkgColor & 0xFF00) | ((bkgColor & 0xFF0000) >> 16)),
lf.lfFaceName,
lf.lfHeight,
@@ -203,16 +206,16 @@ void HistoryHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) lf.lfItalic ? "font-style: italic;" : "");
}
}
- for(i = 0; i < SPAN_FONT_NUM; i++) {
+ for (i = 0; i < SPAN_FONT_NUM; i++) {
loadMsgDlgFont(dbSpanSettingNames[i], &lf, &color, NULL);
Utils::appendText(&output, &outputSize, "%s {float: %s; font-family: %s; font-size: %dpt; font-weight: %s; color: #%06X; %s }\n",
- spanClassNames[i],
- i < 2 ? "left" : "right; clear: right;",
- lf.lfFaceName,
- lf.lfHeight,
- lf.lfWeight >= FW_BOLD ? "bold" : "normal",
- (int)(((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16)),
- lf.lfItalic ? "font-style: italic;" : "");
+ spanClassNames[i],
+ i < 2 ? "left" : "right; clear: right;",
+ lf.lfFaceName,
+ lf.lfHeight,
+ lf.lfWeight >= FW_BOLD ? "bold" : "normal",
+ (int)(((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16)),
+ lf.lfItalic ? "font-style: italic;" : "");
}
Utils::appendText(&output, &outputSize, "</style></head><body class=\"body\">\n");
}
@@ -226,15 +229,14 @@ void HistoryHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) void HistoryHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
{
DWORD dwFlags = db_get_b(NULL, HPPMOD, SRMSGSET_SHOWICONS, 0) ? SMF_LOG_SHOWICONS : 0;
- ptrA szRealProto( getRealProto(event->hContact));
+ ptrA szRealProto(getRealProto(event->hContact));
IEVIEWEVENTDATA* eventData = event->eventData;
- for (int eventIdx = 0; eventData!=NULL && (eventIdx < event->count || event->count==-1); eventData = eventData->next, eventIdx++) {
+ for (int eventIdx = 0; eventData != NULL && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) {
int outputSize;
char *output = NULL;
bool isSent = (eventData->dwFlags & IEEDF_SENT) != 0;
- bool isRTL = (eventData->dwFlags & IEEDF_RTL) != 0;
if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_STATUSCHANGE ||
- eventData->iType == IEED_EVENT_URL || eventData->iType == IEED_EVENT_FILE)
+ eventData->iType == IEED_EVENT_URL || eventData->iType == IEED_EVENT_FILE)
{
ptrA szName, szText;
if (eventData->dwFlags & IEEDF_UNICODE_NICK)
@@ -248,7 +250,6 @@ void HistoryHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event szText = encodeUTF8(event->hContact, szRealProto, eventData->pszText, event->codepage, eventData->iType == IEED_EVENT_MESSAGE ? ENF_ALL : 0, isSent);
/* History++-specific formatting */
- const char *className = NULL;
const char *iconFile = NULL;
switch (eventData->iType) {
case IEED_EVENT_SYSTEM:
@@ -272,7 +273,7 @@ void HistoryHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event Utils::appendText(&output, &outputSize, " ");
Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s:</span>", isSent ? "nameOut" : "nameIn", szName);
- Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s</span><br>", isSent ? "timeOut" : "timeIn", timestampToString(dwFlags, eventData->time));
+ Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s</span><br>", isSent ? "timeOut" : "timeIn", timestampToString(eventData->time));
if (eventData->iType == IEED_EVENT_FILE)
Utils::appendText(&output, &outputSize, "%s:<br> %s", isSent ? Translate("Outgoing File Transfer") : Translate("Incoming File Transfer"), szText);
else if (eventData->iType == IEED_EVENT_URL)
@@ -300,7 +301,8 @@ void HistoryHTMLBuilder::appendEvent(IEView *view, IEVIEWEVENT *event) }
if (protoSettings->getHistoryMode() & Options::MODE_TEMPLATE) {
appendEventTemplate(view, event, protoSettings);
- } else{
+ }
+ else{
appendEventNonTemplate(view, event);
}
}
diff --git a/plugins/IEView/src/HistoryHTMLBuilder.h b/plugins/IEView/src/HistoryHTMLBuilder.h index d5806e4c3a..df00dc7094 100644 --- a/plugins/IEView/src/HistoryHTMLBuilder.h +++ b/plugins/IEView/src/HistoryHTMLBuilder.h @@ -25,11 +25,11 @@ class HistoryHTMLBuilder; #include "TemplateHTMLBuilder.h"
-class HistoryHTMLBuilder:public TemplateHTMLBuilder
+class HistoryHTMLBuilder :public TemplateHTMLBuilder
{
protected:
void loadMsgDlgFont(const char *, LOGFONTA * lf, COLORREF * colour, COLORREF * bkgColour);
- char *timestampToString(DWORD dwFlags, time_t check);
+ char *timestampToString(time_t check);
DWORD startedTime;
bool isDbEventShown(DBEVENTINFO * dbei);
void appendEventNonTemplate(IEView *, IEVIEWEVENT *event);
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp index 0916e68899..7a3555192a 100644 --- a/plugins/IEView/src/IEView.cpp +++ b/plugins/IEView/src/IEView.cpp @@ -33,40 +33,41 @@ bool IEView::isInited = false; -static LRESULT CALLBACK IEViewServerWindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+static LRESULT CALLBACK IEViewServerWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
IEView *view = IEView::get(GetParent(GetParent(hwnd)));
if (view != NULL) {
switch (message) {
case WM_KEYUP:
if (LOWORD(wParam) == VK_ESCAPE && !(GetKeyState(VK_SHIFT) & 0x8000)
- && !(GetKeyState(VK_CONTROL) & 0x8000) && !(GetKeyState(VK_MENU) & 0x8000)) {
+ && !(GetKeyState(VK_CONTROL) & 0x8000) && !(GetKeyState(VK_MENU) & 0x8000)) {
//if (view->getBuilder() != NULL) {
- SendMessage(GetParent(GetParent(GetParent(hwnd))), WM_COMMAND, IDCANCEL, 0);
-// } else {
+ SendMessage(GetParent(GetParent(GetParent(hwnd))), WM_COMMAND, IDCANCEL, 0);
+ // } else {
- // }
+ // }
}
break;
case WM_KEYDOWN:
view->translateAccelerator(message, wParam, lParam);
break;
case WM_SETFOCUS:
- {
- RECT rcWindow;
- POINT cursor;
- GetWindowRect(hwnd, &rcWindow);
- GetCursorPos(&cursor);
- if (cursor.y > rcWindow.bottom || cursor.y < rcWindow.top ||
- cursor.x > rcWindow.right || cursor.x < rcWindow.left) {
- } else {
- view->mouseActivate();
- }
- if (view->setFocus((HWND)wParam)) {
- return TRUE;
- }
+ {
+ RECT rcWindow;
+ POINT cursor;
+ GetWindowRect(hwnd, &rcWindow);
+ GetCursorPos(&cursor);
+ if (cursor.y > rcWindow.bottom || cursor.y < rcWindow.top ||
+ cursor.x > rcWindow.right || cursor.x < rcWindow.left) {
}
- break;
+ else {
+ view->mouseActivate();
+ }
+ if (view->setFocus((HWND)wParam)) {
+ return TRUE;
+ }
+ }
+ break;
case WM_LBUTTONDOWN:
POINT pt;
pt.x = LOWORD(lParam);
@@ -78,35 +79,35 @@ static LRESULT CALLBACK IEViewServerWindowProcedure (HWND hwnd, UINT message, WP }
return CallWindowProc(view->getServerWndProc(), hwnd, message, wParam, lParam);
}
- return DefWindowProc (hwnd, message, wParam, lParam);
+ return DefWindowProc(hwnd, message, wParam, lParam);
}
-static LRESULT CALLBACK IEViewDocWindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+static LRESULT CALLBACK IEViewDocWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
IEView *view = IEView::get(GetParent(hwnd));
- if (view!=NULL) {
+ if (view != NULL) {
WNDPROC oldWndProc = view->getDocWndProc();
if (message == WM_PARENTNOTIFY && wParam == WM_CREATE) {
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) oldWndProc);
- view->setServerWndProc((WNDPROC) SetWindowLongPtr((HWND)lParam, GWLP_WNDPROC, (LONG_PTR) IEViewServerWindowProcedure));
+ SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)oldWndProc);
+ view->setServerWndProc((WNDPROC)SetWindowLongPtr((HWND)lParam, GWLP_WNDPROC, (LONG_PTR)IEViewServerWindowProcedure));
}
return CallWindowProc(oldWndProc, hwnd, message, wParam, lParam);
}
- return DefWindowProc (hwnd, message, wParam, lParam);
+ return DefWindowProc(hwnd, message, wParam, lParam);
}
-static LRESULT CALLBACK IEViewWindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+static LRESULT CALLBACK IEViewWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
IEView *view = IEView::get(hwnd);
- if (view!=NULL) {
+ if (view != NULL) {
WNDPROC oldWndProc = view->getMainWndProc();
if (message == WM_PARENTNOTIFY && wParam == WM_CREATE) {
- SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) oldWndProc);
- view->setDocWndProc((WNDPROC) SetWindowLongPtr((HWND)lParam, GWLP_WNDPROC, (LONG_PTR) IEViewDocWindowProcedure));
+ SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)oldWndProc);
+ view->setDocWndProc((WNDPROC)SetWindowLongPtr((HWND)lParam, GWLP_WNDPROC, (LONG_PTR)IEViewDocWindowProcedure));
}
return CallWindowProc(oldWndProc, hwnd, message, wParam, lParam);
}
- return DefWindowProc (hwnd, message, wParam, lParam);
+ return DefWindowProc(hwnd, message, wParam, lParam);
}
IEViewSink::IEViewSink(IEView *smptr)
@@ -118,17 +119,17 @@ IEViewSink::~IEViewSink() {} STDMETHODIMP IEViewSink::QueryInterface(REFIID riid, PVOID *ppv)
{
- *ppv=NULL;
- if (IID_IUnknown==riid) {
- *ppv=(IUnknown *)this;
+ *ppv = NULL;
+ if (IID_IUnknown == riid) {
+ *ppv = (IUnknown *)this;
}
- if (IID_IDispatch==riid) {
- *ppv=(IDispatch *)this;
+ if (IID_IDispatch == riid) {
+ *ppv = (IDispatch *)this;
}
- if (DIID_DWebBrowserEvents2==riid) {
- *ppv=(DWebBrowserEvents2*)this;
+ if (DIID_DWebBrowserEvents2 == riid) {
+ *ppv = (DWebBrowserEvents2*)this;
}
- if (NULL!=*ppv) {
+ if (NULL != *ppv) {
((LPUNKNOWN)*ppv)->AddRef();
return NOERROR;
}
@@ -147,65 +148,65 @@ STDMETHODIMP_(ULONG) IEViewSink::Release(void) return m_cRef;
}
-STDMETHODIMP IEViewSink::GetTypeInfoCount(UINT *ptr) { return E_NOTIMPL; }
-STDMETHODIMP IEViewSink::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { return S_OK; }
-STDMETHODIMP IEViewSink::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId) { return S_OK; }
+STDMETHODIMP IEViewSink::GetTypeInfoCount(UINT *) { return E_NOTIMPL; }
+STDMETHODIMP IEViewSink::GetTypeInfo(UINT, LCID, LPTYPEINFO*) { return S_OK; }
+STDMETHODIMP IEViewSink::GetIDsOfNames(REFIID, LPOLESTR*, UINT, LCID, DISPID*) { return S_OK; }
-STDMETHODIMP IEViewSink::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid , WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO*pExcepInfo, UINT*puArgErr)
+STDMETHODIMP IEViewSink::Invoke(DISPID dispIdMember, REFIID, LCID, WORD, DISPPARAMS* pDispParams, VARIANT*, EXCEPINFO*, UINT*)
{
if (!pDispParams) return E_INVALIDARG;
- switch (dispIdMember) {
- case DISPID_BEFORENAVIGATE2:
- BeforeNavigate2(pDispParams->rgvarg[6].pdispVal,
- pDispParams->rgvarg[5].pvarVal,
- pDispParams->rgvarg[4].pvarVal,
- pDispParams->rgvarg[3].pvarVal,
- pDispParams->rgvarg[2].pvarVal,
- pDispParams->rgvarg[1].pvarVal,
- pDispParams->rgvarg[0].pboolVal);
- return S_OK;
+ switch (dispIdMember) {
+ case DISPID_BEFORENAVIGATE2:
+ BeforeNavigate2(pDispParams->rgvarg[6].pdispVal,
+ pDispParams->rgvarg[5].pvarVal,
+ pDispParams->rgvarg[4].pvarVal,
+ pDispParams->rgvarg[3].pvarVal,
+ pDispParams->rgvarg[2].pvarVal,
+ pDispParams->rgvarg[1].pvarVal,
+ pDispParams->rgvarg[0].pboolVal);
+ return S_OK;
}
return DISP_E_MEMBERNOTFOUND;
}
// DWebBrowserEvents2
-void IEViewSink::StatusTextChange(BSTR text) {}
-void IEViewSink::ProgressChange(long progress, long progressMax) {}
-void IEViewSink::CommandStateChange(long command, VARIANT_BOOL enable) {}
+void IEViewSink::StatusTextChange(BSTR) {}
+void IEViewSink::ProgressChange(long, long) {}
+void IEViewSink::CommandStateChange(long, VARIANT_BOOL) {}
void IEViewSink::DownloadBegin() {}
void IEViewSink::DownloadComplete() {}
-void IEViewSink::TitleChange(BSTR text) {}
-void IEViewSink::PropertyChange(BSTR text) {}
-void IEViewSink::BeforeNavigate2(IDispatch* pDisp,VARIANT* url,VARIANT* flags, VARIANT* targetFrameName, VARIANT* postData, VARIANT* headers, VARIANT_BOOL* cancel)
+void IEViewSink::TitleChange(BSTR) {}
+void IEViewSink::PropertyChange(BSTR) {}
+void IEViewSink::BeforeNavigate2(IDispatch*, VARIANT* url, VARIANT*, VARIANT*, VARIANT*, VARIANT*, VARIANT_BOOL* cancel)
{
#ifndef GECKO
if (_tcscmp(url->bstrVal, _T("about:blank")))
{
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW|OUF_TCHAR, (LPARAM) url->bstrVal);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)url->bstrVal);
*cancel = VARIANT_TRUE;
}
#endif
}
-void IEViewSink::NewWindow2(IDispatch** ppDisp, VARIANT_BOOL* cancel) {}
-void IEViewSink::NavigateComplete(IDispatch* pDisp, VARIANT* url) {}
-void IEViewSink::DocumentComplete(IDispatch* pDisp, VARIANT* url) {}
+void IEViewSink::NewWindow2(IDispatch**, VARIANT_BOOL*) {}
+void IEViewSink::NavigateComplete(IDispatch*, VARIANT*) {}
+void IEViewSink::DocumentComplete(IDispatch*, VARIANT*) {}
void IEViewSink::OnQuit() {}
-void IEViewSink::OnVisible(VARIANT_BOOL visible) {}
-void IEViewSink::OnToolBar(VARIANT_BOOL visible) {}
-void IEViewSink::OnMenuBar(VARIANT_BOOL visible) {}
-void IEViewSink::OnStatusBar(VARIANT_BOOL visible) {}
-void IEViewSink::OnFullScreen(VARIANT_BOOL visible) {}
-void IEViewSink::OnTheaterMode(VARIANT_BOOL visible) {}
-void IEViewSink::WindowSetResizable(VARIANT_BOOL visible) {}
-void IEViewSink::WindowSetLeft(long val) {}
-void IEViewSink::WindowSetTop(long val) {}
-void IEViewSink::WindowSetWidth(long val) {}
-void IEViewSink::WindowSetHeight(long val) {}
-void IEViewSink::WindowClosing(VARIANT_BOOL isChildWindow, VARIANT_BOOL* cancel) {}
-void IEViewSink::ClientToHostWindow(long *cx, long *cy) {}
-void IEViewSink::SetSecureLockIcon(long val) {}
-void IEViewSink::FileDownload(VARIANT_BOOL* cancel) {}
+void IEViewSink::OnVisible(VARIANT_BOOL) {}
+void IEViewSink::OnToolBar(VARIANT_BOOL) {}
+void IEViewSink::OnMenuBar(VARIANT_BOOL) {}
+void IEViewSink::OnStatusBar(VARIANT_BOOL) {}
+void IEViewSink::OnFullScreen(VARIANT_BOOL) {}
+void IEViewSink::OnTheaterMode(VARIANT_BOOL) {}
+void IEViewSink::WindowSetResizable(VARIANT_BOOL) {}
+void IEViewSink::WindowSetLeft(long) {}
+void IEViewSink::WindowSetTop(long) {}
+void IEViewSink::WindowSetWidth(long) {}
+void IEViewSink::WindowSetHeight(long) {}
+void IEViewSink::WindowClosing(VARIANT_BOOL, VARIANT_BOOL*) {}
+void IEViewSink::ClientToHostWindow(long *, long *) {}
+void IEViewSink::SetSecureLockIcon(long) {}
+void IEViewSink::FileDownload(VARIANT_BOOL*) {}
#ifdef GECKO
@@ -237,14 +238,15 @@ void IEView::setBorder() #ifndef GECKO
style &= ~(WS_EX_STATICEDGE);
#endif
- } else {
+ }
+ else {
style |= (WS_EX_STATICEDGE);
}
if (oldStyle != style) {
- SetWindowLongPtr(hwnd,GWL_EXSTYLE,style);
+ SetWindowLongPtr(hwnd, GWL_EXSTYLE, style);
SetWindowPos(getHWND(), NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
}
-// RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_UPDATENOW);
+ // RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_FRAME | RDW_UPDATENOW);
}
IEView::IEView(HWND parent, HTMLBuilder* builder, int x, int y, int cx, int cy)
@@ -272,14 +274,16 @@ IEView::IEView(HWND parent, HTMLBuilder* builder, int x, int y, int cx, int cy) pOleObject->SetClientSite(this);
pOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, &msg, this, 0, this->parent, &rcClient);
pOleObject->Release();
- } else {
+ }
+ else {
MessageBox(NULL, TranslateT("IID_IOleObject failed."), TranslateT("RESULT"), MB_OK);
}
if (SUCCEEDED(pWebBrowser->QueryInterface(IID_IOleInPlaceObject, (void**)&pOleInPlace))) {
pOleInPlace->GetWindow(&hwnd);
pOleInPlace->Release();
- } else {
+ }
+ else {
MessageBox(NULL, TranslateT("IID_IOleInPlaceObject failed."), TranslateT("RESULT"), MB_OK);
}
@@ -287,21 +291,21 @@ IEView::IEView(HWND parent, HTMLBuilder* builder, int x, int y, int cx, int cy) IConnectionPointContainer* pCPContainer;
// Step 1: Get a pointer to the connection point container.
if (SUCCEEDED(pWebBrowser->QueryInterface(IID_IConnectionPointContainer,
- (void**)&pCPContainer))) {
- // m_pConnectionPoint is defined like this:
- // Step 2: Find the connection point.
+ (void**)&pCPContainer))) {
+ // m_pConnectionPoint is defined like this:
+ // Step 2: Find the connection point.
if (SUCCEEDED(pCPContainer->FindConnectionPoint(DIID_DWebBrowserEvents2,
- &m_pConnectionPoint))) {
- // Step 3: Advise the connection point that you
- // want to sink its events.
+ &m_pConnectionPoint))) {
+ // Step 3: Advise the connection point that you
+ // want to sink its events.
sink = new IEViewSink(this);
- if (FAILED(m_pConnectionPoint->Advise((IUnknown *)sink, &m_dwCookie))) {
+ if (FAILED(m_pConnectionPoint->Advise((IUnknown *)sink, &m_dwCookie))) {
MessageBox(NULL, TranslateT("Failed to Advise"), TranslateT("C++ Event Sink"), MB_OK);
- }
+ }
}
pCPContainer->Release();
}
- setMainWndProc((WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) IEViewWindowProcedure));
+ setMainWndProc((WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)IEViewWindowProcedure));
}
{
mir_cslock lck(mutex);
@@ -380,7 +384,7 @@ IEView* IEView::get(HWND hwnd) if (list == NULL) return NULL;
mir_cslock lock(mutex);
- for (IEView *ptr = list; ptr !=NULL; ptr=ptr->next)
+ for (IEView *ptr = list; ptr != NULL; ptr = ptr->next)
if (ptr->hwnd == hwnd)
return ptr;
@@ -420,21 +424,21 @@ WNDPROC IEView::getServerWndProc() // IUnknown
STDMETHODIMP IEView::QueryInterface(REFIID riid, PVOID *ppv)
{
- *ppv=NULL;
- if (IID_IUnknown==riid)
- *ppv=this;
- if (IID_IOleClientSite==riid)
- *ppv=(IOleClientSite*)this;//Unknown)m_pIOleClientSite;
- if (IID_IOleWindow==riid || IID_IOleInPlaceSite==riid)
- *ppv=(IOleInPlaceSite*)this;//m_pIOleIPSite;
- if (IID_IDocHostUIHandler==riid)
- *ppv=(IDocHostUIHandler*)this;//m_pIOleIPSite;
- if (IID_IInternetSecurityManager==riid)
- *ppv=(IInternetSecurityManager*)this;
- if (IID_IServiceProvider==riid)
- *ppv=(IServiceProvider*)this;
-
- if (NULL!=*ppv) {
+ *ppv = NULL;
+ if (IID_IUnknown == riid)
+ *ppv = this;
+ if (IID_IOleClientSite == riid)
+ *ppv = (IOleClientSite*)this;//Unknown)m_pIOleClientSite;
+ if (IID_IOleWindow == riid || IID_IOleInPlaceSite == riid)
+ *ppv = (IOleInPlaceSite*)this;//m_pIOleIPSite;
+ if (IID_IDocHostUIHandler == riid)
+ *ppv = (IDocHostUIHandler*)this;//m_pIOleIPSite;
+ if (IID_IInternetSecurityManager == riid)
+ *ppv = (IInternetSecurityManager*)this;
+ if (IID_IServiceProvider == riid)
+ *ppv = (IServiceProvider*)this;
+
+ if (NULL != *ppv) {
((LPUNKNOWN)*ppv)->AddRef();
return NOERROR;
}
@@ -454,15 +458,15 @@ STDMETHODIMP_(ULONG) IEView::Release(void) }
// IDispatch
-STDMETHODIMP IEView::GetTypeInfoCount(UINT *ptr) { return E_NOTIMPL; }
-STDMETHODIMP IEView::GetTypeInfo(UINT iTInfo, LCID lcid, LPTYPEINFO* ppTInfo) { return S_OK; }
-STDMETHODIMP IEView::GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId) { return S_OK; }
+STDMETHODIMP IEView::GetTypeInfoCount(UINT *) { return E_NOTIMPL; }
+STDMETHODIMP IEView::GetTypeInfo(UINT, LCID, LPTYPEINFO*) { return S_OK; }
+STDMETHODIMP IEView::GetIDsOfNames(REFIID, LPOLESTR*, UINT, LCID, DISPID*) { return S_OK; }
-STDMETHODIMP IEView::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid , WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarResult, EXCEPINFO*pExcepInfo, UINT*puArgErr)
+STDMETHODIMP IEView::Invoke(DISPID dispIdMember, REFIID, LCID, WORD, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*)
{
- switch (dispIdMember) {
- case DISPID_AMBIENT_DLCONTROL:
- break;
+ switch (dispIdMember) {
+ case DISPID_AMBIENT_DLCONTROL:
+ break;
}
return DISP_E_MEMBERNOTFOUND;
}
@@ -474,7 +478,7 @@ STDMETHODIMP IEView::GetWindow(HWND *phwnd) return S_OK;
}
-STDMETHODIMP IEView::ContextSensitiveHelp(BOOL fEnterMode)
+STDMETHODIMP IEView::ContextSensitiveHelp(BOOL)
{
return E_NOTIMPL;
}
@@ -496,7 +500,7 @@ STDMETHODIMP IEView::OnUIActivate(void) return E_NOTIMPL;
}
-STDMETHODIMP IEView::GetWindowContext(IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
+STDMETHODIMP IEView::GetWindowContext(IOleInPlaceFrame **, IOleInPlaceUIWindow **, LPRECT lprcPosRect, LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO)
{
lprcPosRect->left = rcClient.left;
lprcPosRect->top = rcClient.top;
@@ -509,12 +513,12 @@ STDMETHODIMP IEView::GetWindowContext(IOleInPlaceFrame **ppFrame, IOleInPlaceUIW return S_OK;
}
-STDMETHODIMP IEView::Scroll(SIZE scrollExtant)
+STDMETHODIMP IEView::Scroll(SIZE)
{
return E_NOTIMPL;
}
-STDMETHODIMP IEView::OnUIDeactivate(BOOL fUndoable)
+STDMETHODIMP IEView::OnUIDeactivate(BOOL)
{
return E_NOTIMPL;
}
@@ -535,7 +539,7 @@ STDMETHODIMP IEView::DeactivateAndUndo(void) return E_NOTIMPL;
}
-STDMETHODIMP IEView::OnPosRectChange(LPCRECT lprcPosRect)
+STDMETHODIMP IEView::OnPosRectChange(LPCRECT)
{
return E_NOTIMPL;
}
@@ -545,11 +549,11 @@ STDMETHODIMP IEView::SaveObject(void) {
return E_NOTIMPL;
}
-STDMETHODIMP IEView::GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmk)
+STDMETHODIMP IEView::GetMoniker(DWORD, DWORD, IMoniker **)
{
return E_NOTIMPL;
}
-STDMETHODIMP IEView::GetContainer(IOleContainer **ppContainer)
+STDMETHODIMP IEView::GetContainer(IOleContainer **)
{
return E_NOTIMPL;
}
@@ -557,7 +561,7 @@ STDMETHODIMP IEView::ShowObject(void) {
return E_NOTIMPL;
}
-STDMETHODIMP IEView::OnShowWindow(BOOL fShow)
+STDMETHODIMP IEView::OnShowWindow(BOOL)
{
return E_NOTIMPL;
}
@@ -566,73 +570,76 @@ STDMETHODIMP IEView::RequestNewObjectLayout(void) return E_NOTIMPL;
}
// IDocHostUIHandler
-STDMETHODIMP IEView::ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdTarget, IDispatch *pdispReserved)
+STDMETHODIMP IEView::ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdTarget, IDispatch *)
{
IOleCommandTarget * pOleCommandTarget;
IOleWindow * pOleWindow;
HWND hSPWnd;
if (builder == NULL) {
- // return S_OK;
+ // return S_OK;
}
#ifdef GECKO
{
return E_NOTIMPL;
-/*
- HMENU hMenu = GetSubMenu(LoadMenu(hInstance, MAKEINTRESOURCE(IDR_CONTEXTMENU)),0);
- TranslateMenu(hMenu);
- if (dwID == 6) { // anchor
- EnableMenuItem(hMenu, ID_MENU_COPYLINK, MF_BYCOMMAND | MF_ENABLED);
- } else if (dwID == 5) { // text select
- EnableMenuItem(hMenu, ID_MENU_COPY, MF_BYCOMMAND | MF_ENABLED);
- } else if (dwID == 1) { // control (image)
- EnableMenuItem(hMenu, ID_MENU_SAVEIMAGE, MF_BYCOMMAND | MF_ENABLED);
- }
- if (builder!=NULL) {
+ /*
+ HMENU hMenu = GetSubMenu(LoadMenu(hInstance, MAKEINTRESOURCE(IDR_CONTEXTMENU)),0);
+ TranslateMenu(hMenu);
+ if (dwID == 6) { // anchor
+ EnableMenuItem(hMenu, ID_MENU_COPYLINK, MF_BYCOMMAND | MF_ENABLED);
+ } else if (dwID == 5) { // text select
+ EnableMenuItem(hMenu, ID_MENU_COPY, MF_BYCOMMAND | MF_ENABLED);
+ } else if (dwID == 1) { // control (image)
+ EnableMenuItem(hMenu, ID_MENU_SAVEIMAGE, MF_BYCOMMAND | MF_ENABLED);
+ }
+ if (builder!=NULL) {
- }
- int iSelection = TrackPopupMenu(hMenu,
- TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD,
- ppt->x,
- ppt->y,
- 0,
- hwnd,
- (RECT*)NULL);
- DestroyMenu(hMenu);
- if (iSelection == ID_MENU_CLEARLOG) {
- clear(NULL);
- } else {
- SendMessage(hSPWnd, WM_COMMAND, iSelection, (LPARAM) NULL);
- }
-*/
+ }
+ int iSelection = TrackPopupMenu(hMenu,
+ TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD,
+ ppt->x,
+ ppt->y,
+ 0,
+ hwnd,
+ (RECT*)NULL);
+ DestroyMenu(hMenu);
+ if (iSelection == ID_MENU_CLEARLOG) {
+ clear(NULL);
+ } else {
+ SendMessage(hSPWnd, WM_COMMAND, iSelection, (LPARAM) NULL);
+ }
+ */
}
#else
if (SUCCEEDED(pcmdTarget->QueryInterface(IID_IOleCommandTarget, (void**)&pOleCommandTarget))) {
if (SUCCEEDED(pOleCommandTarget->QueryInterface(IID_IOleWindow, (void**)&pOleWindow))) {
pOleWindow->GetWindow(&hSPWnd);
- HMENU hMenu = GetSubMenu(LoadMenu(hInstance, MAKEINTRESOURCE(IDR_CONTEXTMENU)),0);
- TranslateMenu(hMenu);
+ HMENU hMenu = GetSubMenu(LoadMenu(hInstance, MAKEINTRESOURCE(IDR_CONTEXTMENU)), 0);
+ TranslateMenu(hMenu);
if (dwID == 5) { // anchor
EnableMenuItem(hMenu, ID_MENU_COPYLINK, MF_BYCOMMAND | MF_ENABLED);
- } else if (dwID == 4) { // text select
+ }
+ else if (dwID == 4) { // text select
EnableMenuItem(hMenu, ID_MENU_COPY, MF_BYCOMMAND | MF_ENABLED);
- } else if (dwID == 1) { // control (image)
+ }
+ else if (dwID == 1) { // control (image)
EnableMenuItem(hMenu, ID_MENU_SAVEIMAGE, MF_BYCOMMAND | MF_ENABLED);
}
- if (builder!=NULL) {
+ if (builder != NULL) {
}
- int iSelection = TrackPopupMenu(hMenu,
- TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD,
- ppt->x,
- ppt->y,
- 0,
- hwnd,
- (RECT*)NULL);
+ int iSelection = TrackPopupMenu(hMenu,
+ TPM_LEFTALIGN | TPM_RIGHTBUTTON | TPM_RETURNCMD,
+ ppt->x,
+ ppt->y,
+ 0,
+ hwnd,
+ (RECT*)NULL);
DestroyMenu(hMenu);
if (iSelection == ID_MENU_CLEARLOG) {
clear(NULL);
- } else {
- SendMessage(hSPWnd, WM_COMMAND, iSelection, (LPARAM) NULL);
+ }
+ else {
+ SendMessage(hSPWnd, WM_COMMAND, iSelection, (LPARAM)NULL);
}
pOleWindow->Release();
}
@@ -643,31 +650,31 @@ STDMETHODIMP IEView::ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdTarge }
STDMETHODIMP IEView::GetHostInfo(DOCHOSTUIINFO *pInfo)
{
- pInfo->dwFlags = DOCHOSTUIFLAG_NO3DBORDER;// | DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE;
+ pInfo->dwFlags = DOCHOSTUIFLAG_NO3DBORDER;// | DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE;
if (builder == NULL) {
pInfo->dwFlags |= DOCHOSTUIFLAG_DIALOG;
}
- return S_OK;
+ return S_OK;
}
-STDMETHODIMP IEView::ShowUI(DWORD dwID, IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget, IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc)
+STDMETHODIMP IEView::ShowUI(DWORD, IOleInPlaceActiveObject *, IOleCommandTarget *, IOleInPlaceFrame *, IOleInPlaceUIWindow *)
{
- return S_OK;
+ return S_OK;
}
-STDMETHODIMP IEView::HideUI(void) {return S_OK;}
-STDMETHODIMP IEView::UpdateUI(void) {return S_OK;}
-STDMETHODIMP IEView::EnableModeless(BOOL fEnable) { return E_NOTIMPL; }
-STDMETHODIMP IEView::OnDocWindowActivate(BOOL fEnable) { return E_NOTIMPL; }
-STDMETHODIMP IEView::OnFrameWindowActivate(BOOL fEnable) { return E_NOTIMPL; }
-STDMETHODIMP IEView::ResizeBorder(LPCRECT prcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fRameWindow) {return E_NOTIMPL;}
-STDMETHODIMP IEView::TranslateAccelerator(LPMSG lpMsg, const GUID *pguidCmdGroup, DWORD nCmdID) { return S_FALSE;}
-STDMETHODIMP IEView::GetOptionKeyPath(LPOLESTR *pchKey, DWORD dw) { return E_NOTIMPL; }
-STDMETHODIMP IEView::GetDropTarget(IDropTarget *pDropTarget, IDropTarget **ppDropTarget)
+STDMETHODIMP IEView::HideUI(void) { return S_OK; }
+STDMETHODIMP IEView::UpdateUI(void) { return S_OK; }
+STDMETHODIMP IEView::EnableModeless(BOOL) { return E_NOTIMPL; }
+STDMETHODIMP IEView::OnDocWindowActivate(BOOL) { return E_NOTIMPL; }
+STDMETHODIMP IEView::OnFrameWindowActivate(BOOL) { return E_NOTIMPL; }
+STDMETHODIMP IEView::ResizeBorder(LPCRECT, IOleInPlaceUIWindow *, BOOL) { return E_NOTIMPL; }
+STDMETHODIMP IEView::TranslateAccelerator(LPMSG, const GUID *, DWORD) { return S_FALSE; }
+STDMETHODIMP IEView::GetOptionKeyPath(LPOLESTR *, DWORD) { return E_NOTIMPL; }
+STDMETHODIMP IEView::GetDropTarget(IDropTarget *, IDropTarget **ppDropTarget)
{
*ppDropTarget = NULL;
return S_OK;
-// return E_NOTIMPL;
+ // return E_NOTIMPL;
}
STDMETHODIMP IEView::GetExternal(IDispatch **ppDispatch)
@@ -675,16 +682,17 @@ STDMETHODIMP IEView::GetExternal(IDispatch **ppDispatch) *ppDispatch = NULL;
return S_FALSE;
}
-STDMETHODIMP IEView::TranslateUrl(DWORD dwTranslate, OLECHAR *pchURLIn, OLECHAR **ppchURLOut) { return E_NOTIMPL; }
-STDMETHODIMP IEView::FilterDataObject(IDataObject *pDO, IDataObject **ppDORet) { return E_NOTIMPL; }
+STDMETHODIMP IEView::TranslateUrl(DWORD, OLECHAR *, OLECHAR **) { return E_NOTIMPL; }
+STDMETHODIMP IEView::FilterDataObject(IDataObject *, IDataObject **) { return E_NOTIMPL; }
/* IServiceProvider */
-STDMETHODIMP IEView::QueryService(REFGUID guidService, REFIID riid, void** ppvObject)
+STDMETHODIMP IEView::QueryService(REFGUID guidService, REFIID riid, void** ppvObject)
{
if (guidService == SID_SInternetSecurityManager && riid == IID_IInternetSecurityManager) {
return (HRESULT)this->QueryInterface(riid, ppvObject);
- } else {
+ }
+ else {
*ppvObject = NULL;
}
return E_NOINTERFACE;
@@ -692,70 +700,75 @@ STDMETHODIMP IEView::QueryService(REFGUID guidService, REFIID riid, void** ppvOb /* IInternetSecurityManager */
-STDMETHODIMP IEView::SetSecuritySite(IInternetSecurityMgrSite *pSite)
+STDMETHODIMP IEView::SetSecuritySite(IInternetSecurityMgrSite *)
{
return INET_E_DEFAULT_ACTION;
}
-STDMETHODIMP IEView::GetSecuritySite(IInternetSecurityMgrSite **ppSite)
+STDMETHODIMP IEView::GetSecuritySite(IInternetSecurityMgrSite **)
{
return INET_E_DEFAULT_ACTION;
}
-STDMETHODIMP IEView::MapUrlToZone(LPCWSTR pwszUrl, DWORD *pdwZone, DWORD dwFlags)
+STDMETHODIMP IEView::MapUrlToZone(LPCWSTR pwszUrl, DWORD *pdwZone, DWORD)
{
- if (pdwZone!=NULL && pwszUrl!=NULL && !wcscmp(pwszUrl, L"about:blank")) {
+ if (pdwZone != NULL && pwszUrl != NULL && !wcscmp(pwszUrl, L"about:blank")) {
*pdwZone = URLZONE_LOCAL_MACHINE;
return S_OK;
}
return INET_E_DEFAULT_ACTION;
}
-STDMETHODIMP IEView::GetSecurityId(LPCWSTR pwszUrl, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved)
+STDMETHODIMP IEView::GetSecurityId(LPCWSTR, BYTE *, DWORD *, DWORD_PTR)
{
return INET_E_DEFAULT_ACTION;
}
-STDMETHODIMP IEView::ProcessUrlAction(LPCWSTR pwszUrl, DWORD dwAction, BYTE *pPolicy, DWORD cbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwFlags, DWORD dwReserved)
+STDMETHODIMP IEView::ProcessUrlAction(LPCWSTR pwszUrl, DWORD dwAction, BYTE *pPolicy, DWORD cbPolicy, BYTE *, DWORD, DWORD, DWORD)
{
- DWORD dwPolicy=URLPOLICY_ALLOW;
- if (pwszUrl!=NULL && !wcscmp(pwszUrl, L"about:blank")) {
+ DWORD dwPolicy = URLPOLICY_ALLOW;
+ if (pwszUrl != NULL && !wcscmp(pwszUrl, L"about:blank")) {
if (dwAction <= URLACTION_ACTIVEX_MAX && dwAction >= URLACTION_ACTIVEX_MIN) {
//dwPolicy = URLPOLICY_DISALLOW;
//dwPolicy = URLPOLICY_ALLOW;
- } else if ((dwAction <= URLACTION_JAVA_MAX && dwAction >= URLACTION_JAVA_MIN) || URLACTION_HTML_JAVA_RUN == dwAction) {
+ }
+ else if ((dwAction <= URLACTION_JAVA_MAX && dwAction >= URLACTION_JAVA_MIN) || URLACTION_HTML_JAVA_RUN == dwAction) {
// dwPolicy = URLPOLICY_JAVA_PROHIBIT;
return INET_E_DEFAULT_ACTION;
- } else if (dwAction <= URLACTION_SCRIPT_MAX && dwAction >= URLACTION_SCRIPT_MIN) {
+ }
+ else if (dwAction <= URLACTION_SCRIPT_MAX && dwAction >= URLACTION_SCRIPT_MIN) {
//dwPolicy = URLPOLICY_DISALLOW;
//dwPolicy = URLPOLICY_ALLOW;
- } else if (dwAction <= URLACTION_HTML_MIN && dwAction >= URLACTION_HTML_MAX) {
+ }
+ else if (dwAction <= URLACTION_HTML_MIN && dwAction >= URLACTION_HTML_MAX) {
//dwPolicy = URLPOLICY_DISALLOW;
//dwPolicy = URLPOLICY_ALLOW;
- } else {
+ }
+ else {
return INET_E_DEFAULT_ACTION;
}
- if ( cbPolicy >= sizeof (DWORD)) {
- *(DWORD*) pPolicy = dwPolicy;
+ if (cbPolicy >= sizeof(DWORD)) {
+ *(DWORD*)pPolicy = dwPolicy;
return S_OK;
- } else {
+ }
+ else {
return S_FALSE;
}
}
return INET_E_DEFAULT_ACTION;
}
-STDMETHODIMP IEView::QueryCustomPolicy(LPCWSTR pwszUrl, REFGUID guidKey, BYTE **ppPolicy, DWORD *pcbPolicy, BYTE *pContext, DWORD cbContext, DWORD dwReserved)
+STDMETHODIMP IEView::QueryCustomPolicy(LPCWSTR, REFGUID, BYTE **, DWORD *, BYTE *, DWORD, DWORD)
{
return INET_E_DEFAULT_ACTION;
}
-STDMETHODIMP IEView::SetZoneMapping(DWORD dwZone, LPCWSTR lpszPattern, DWORD dwFlags)
+STDMETHODIMP IEView::SetZoneMapping(DWORD, LPCWSTR, DWORD)
{
return INET_E_DEFAULT_ACTION;
}
-STDMETHODIMP IEView::GetZoneMappings(DWORD dwZone, IEnumString **ppenumString, DWORD dwFlags)
+STDMETHODIMP IEView::GetZoneMappings(DWORD, IEnumString **, DWORD)
{
return INET_E_DEFAULT_ACTION;
}
@@ -779,23 +792,25 @@ void IEView::setWindowPos(int x, int y, int cx, int cy) rcClient.top = y;
rcClient.right = cx;
rcClient.bottom = cy;//y + cy;
- if (builder == NULL) {
+ if (builder == NULL) {
//scrollToTop();
- } else {
-// scrollToBottomSoft();
+ }
+ else {
+ // scrollToBottomSoft();
}
SetWindowPos(getHWND(), HWND_TOP, x, y, cx, cy, 0);
/*
IOleInPlaceObject * inPlaceObject;
if (SUCCEEDED(pWebBrowser->QueryInterface(IID_IOleInPlaceObject, (void **)&inPlaceObject))) {
- inPlaceObject->SetObjectRects(&rcClient, &rcClient);
- inPlaceObject->Release();
+ inPlaceObject->SetObjectRects(&rcClient, &rcClient);
+ inPlaceObject->Release();
}
*/
if (builder == NULL) {
//scrollToTop();
- } else {
-// scrollToBottomSoft();
+ }
+ else {
+ // scrollToBottomSoft();
}
}
@@ -804,8 +819,8 @@ void IEView::scrollToTop() IHTMLDocument2 *document = getDocument();
if (document != NULL) {
IHTMLWindow2* pWindow = NULL;
- if (SUCCEEDED(document->get_parentWindow( &pWindow )) && pWindow != NULL) {
- pWindow->scrollBy( -0x01FFFFFF, -0x01FFFFFF );
+ if (SUCCEEDED(document->get_parentWindow(&pWindow)) && pWindow != NULL) {
+ pWindow->scrollBy(-0x01FFFFFF, -0x01FFFFFF);
pWindow->Release();
}
document->Release();
@@ -817,8 +832,8 @@ void IEView::scrollToBottomSoft() IHTMLDocument2 *document = getDocument();
if (document != NULL) {
IHTMLWindow2* pWindow = NULL;
- if (SUCCEEDED(document->get_parentWindow( &pWindow )) && (pWindow != NULL)) {
- pWindow->scrollBy( -0x01FFFFFF, 0x01FFFFFF );
+ if (SUCCEEDED(document->get_parentWindow(&pWindow)) && (pWindow != NULL)) {
+ pWindow->scrollBy(-0x01FFFFFF, 0x01FFFFFF);
pWindow->Release();
}
document->Release();
@@ -829,23 +844,23 @@ void IEView::scrollToBottom() {/*
IHTMLDocument2 *document = getDocument();
if (document != NULL) {
- wchar_t *p = NULL;
- if (SUCCEEDED(document->get_readyState(&p))) {
- int licznik = 0;
- do {
- if (FAILED(document->get_readyState(&p))) {
- break;
- }
- licznik++;
- if (licznik == 1) break;
- Sleep(10);
- } while (!wcscmp(p, L"loading"));
- }
- IHTMLWindow2* pWindow = NULL;
- if (SUCCEEDED(document->get_parentWindow( &pWindow )) && pWindow != NULL) {
- pWindow->scrollBy( 0, 0x01FFFFFF );
- }
- document->Release();
+ wchar_t *p = NULL;
+ if (SUCCEEDED(document->get_readyState(&p))) {
+ int licznik = 0;
+ do {
+ if (FAILED(document->get_readyState(&p))) {
+ break;
+ }
+ licznik++;
+ if (licznik == 1) break;
+ Sleep(10);
+ } while (!wcscmp(p, L"loading"));
+ }
+ IHTMLWindow2* pWindow = NULL;
+ if (SUCCEEDED(document->get_parentWindow( &pWindow )) && pWindow != NULL) {
+ pWindow->scrollBy( 0, 0x01FFFFFF );
+ }
+ document->Release();
}*/
IHTMLDocument2 *document = getDocument();
@@ -858,13 +873,13 @@ void IEView::scrollToBottom() if (SUCCEEDED(collection->get_length(&len))) {
VARIANT variant;
variant.vt = VT_I4;
- variant.lVal = len-1;
+ variant.lVal = len - 1;
if (SUCCEEDED(collection->item(variant, variant, &dispatch)) && (dispatch != NULL)) {
- if (SUCCEEDED(dispatch->QueryInterface(IID_IHTMLElement,(void**)&element)) && (element != NULL)) {
- variant.vt = VT_BOOL;
+ if (SUCCEEDED(dispatch->QueryInterface(IID_IHTMLElement, (void**)&element)) && (element != NULL)) {
+ variant.vt = VT_BOOL;
variant.boolVal = VARIANT_FALSE;
if (SUCCEEDED(element->scrollIntoView(variant))) {
- }
+ }
element->Release();
}
dispatch->Release();
@@ -873,8 +888,8 @@ void IEView::scrollToBottom() collection->Release();
}
IHTMLWindow2* pWindow = NULL;
- if (SUCCEEDED(document->get_parentWindow( &pWindow )) && (pWindow != NULL)) {
- pWindow->scrollBy( -0x0000FFFF, 0x0000FFFF );
+ if (SUCCEEDED(document->get_parentWindow(&pWindow)) && (pWindow != NULL)) {
+ pWindow->scrollBy(-0x0000FFFF, 0x0000FFFF);
pWindow->Release();
}
document->Release();
@@ -885,11 +900,11 @@ void IEView::write(const wchar_t *text) {
IHTMLDocument2 *document = getDocument();
if (document != NULL) {
- SAFEARRAY *safe_array = SafeArrayCreateVector(VT_VARIANT,0,1);
+ SAFEARRAY *safe_array = SafeArrayCreateVector(VT_VARIANT, 0, 1);
if (safe_array != NULL) {
VARIANT *variant;
BSTR bstr;
- SafeArrayAccessData(safe_array,(LPVOID *)&variant);
+ SafeArrayAccessData(safe_array, (LPVOID *)&variant);
variant->vt = VT_BSTR;
variant->bstrVal = bstr = SysAllocString(text);
SafeArrayUnaccessData(safe_array);
@@ -907,7 +922,7 @@ void IEView::write(const char *text) wchar_t *wcsTemp = new wchar_t[textLen];
MultiByteToWideChar(CP_UTF8, 0, text, -1, wcsTemp, textLen);
write(wcsTemp);
- delete [] wcsTemp;
+ delete[] wcsTemp;
}
void IEView::writef(const char *fmt, ...)
@@ -916,9 +931,9 @@ void IEView::writef(const char *fmt, ...) va_list vararg;
int strsize;
va_start(vararg, fmt);
- str = (char *) malloc(strsize=2048);
+ str = (char *)malloc(strsize = 2048);
while (mir_vsnprintf(str, strsize, fmt, vararg) == -1)
- str = (char *) realloc(str, strsize+=2048);
+ str = (char *)realloc(str, strsize += 2048);
va_end(vararg);
write(str);
free(str);
@@ -945,9 +960,9 @@ void IEView::documentClose() /*
IHTMLDocument2 *document = getDocument();
if (document != NULL) {
- //write("</body></html>");
- document->close();
- document->Release();
+ //write("</body></html>");
+ document->close();
+ document->Release();
}
*/
#endif
@@ -958,7 +973,7 @@ void IEView::appendEventOld(IEVIEWEVENT *event) if (clearRequired) {
clear(event);
}
- if (builder!=NULL) {
+ if (builder != NULL) {
builder->appendEventOld(this, event);
}
getFocus = false;
@@ -969,9 +984,9 @@ void IEView::appendEvent(IEVIEWEVENT *event) if (clearRequired) {
clear(event);
}
- if (event->eventData == NULL) {return; }
+ if (event->eventData == NULL) { return; }
- if (builder!=NULL) {
+ if (builder != NULL) {
builder->appendEventNew(this, event);
}
getFocus = false;
@@ -1023,7 +1038,7 @@ void* IEView::getSelection(IEVIEWEVENT *event) {
mir_free(selectedText);
selectedText = getSelection();
- if (selectedText == NULL || wcslen(selectedText)== 0)
+ if (selectedText == NULL || wcslen(selectedText) == 0)
return NULL;
if (event->dwFlags & IEEF_NO_UNICODE) {
@@ -1071,9 +1086,9 @@ BSTR IEView::getSelection() IHTMLDocument2 *document = getDocument();
if (document != NULL) {
IHTMLSelectionObject *pSelection = NULL;
- if (SUCCEEDED(document->get_selection( &pSelection )) && pSelection != NULL) {
+ if (SUCCEEDED(document->get_selection(&pSelection)) && pSelection != NULL) {
IDispatch *pDisp = NULL;
- if (SUCCEEDED(pSelection->createRange( &pDisp )) && pDisp != NULL) {
+ if (SUCCEEDED(pSelection->createRange(&pDisp)) && pDisp != NULL) {
IHTMLTxtRange *pRange = NULL;
if (SUCCEEDED(pDisp->QueryInterface(IID_IHTMLTxtRange, (void**)&pRange))) {
if (SUCCEEDED(pRange->get_text(&text)))
@@ -1098,24 +1113,25 @@ BSTR IEView::getHrefFromAnchor(IHTMLElement *element) {
if (element != NULL) {
IHTMLAnchorElement * pAnchor;
- if (SUCCEEDED(element->QueryInterface(IID_IHTMLAnchorElement, (void**)&pAnchor)) && (pAnchor!=NULL)) {
+ if (SUCCEEDED(element->QueryInterface(IID_IHTMLAnchorElement, (void**)&pAnchor)) && (pAnchor != NULL)) {
VARIANT variant;
- BSTR url;
+ BSTR url = NULL;
if (SUCCEEDED(element->getAttribute(L"href", 2, &variant)) && (variant.vt == VT_BSTR)) {
url = mir_tstrdup(variant.bstrVal);
SysFreeString(variant.bstrVal);
}
//pAnchor->get_href( &url );
-// if (url!=NULL) {
-// url2 = Utils::dupString(url);
-// SysFreeString(url);
- // url = url2;
- // }
+ // if (url!=NULL) {
+ // url2 = Utils::dupString(url);
+ // SysFreeString(url);
+ // url = url2;
+ // }
pAnchor->Release();
return url;
- } else {
+ }
+ else {
IHTMLElement * parent;
- if (SUCCEEDED(element->get_parentElement(&parent)) && (parent!=NULL)) {
+ if (SUCCEEDED(element->get_parentElement(&parent)) && (parent != NULL)) {
BSTR url = getHrefFromAnchor(parent);
parent->Release();
return url;
@@ -1142,20 +1158,20 @@ bool IEView::mouseClick(POINT pt) IHTMLDocument2 *document = getDocument();
if (document != NULL) {
IHTMLElement *element;
- if (SUCCEEDED(document->elementFromPoint( pt.x, pt.y, &element ))&& element!=NULL) {
-// IHTMLAnchorElement * pAnchor;
-// if (SUCCEEDED(element->QueryInterface(IID_IHTMLAnchorElement, (void**)&pAnchor)) && (pAnchor!=NULL)) {
-// element->click();
-// result = true;
-// pAnchor->Release();
-// }
+ if (SUCCEEDED(document->elementFromPoint(pt.x, pt.y, &element)) && element != NULL) {
+ // IHTMLAnchorElement * pAnchor;
+ // if (SUCCEEDED(element->QueryInterface(IID_IHTMLAnchorElement, (void**)&pAnchor)) && (pAnchor!=NULL)) {
+ // element->click();
+ // result = true;
+ // pAnchor->Release();
+ // }
BSTR url = getHrefFromAnchor(element);
if (url != NULL) {
if ((GetKeyState(VK_SHIFT) & 0x8000) && !(GetKeyState(VK_CONTROL) & 0x8000)
- && !(GetKeyState(VK_MENU) & 0x8000)) {
+ && !(GetKeyState(VK_MENU) & 0x8000)) {
SendMessage(GetParent(hwnd), WM_COMMAND, IDCANCEL, 0);
}
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW|OUF_TCHAR, (LPARAM) url);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)url);
mir_free(url);
result = true;
}
@@ -1166,11 +1182,11 @@ bool IEView::mouseClick(POINT pt) return result;
}
-bool IEView::setFocus(HWND prevFocus)
+bool IEView::setFocus(HWND)
{
if (GetFocus() != hwnd && !getFocus) { // && IsChild(prevFocus, hwnd
SetFocus(GetParent(getHWND()));
-// SetFocus(prevFocus);
+ // SetFocus(prevFocus);
return true;
}
getFocus = false;
@@ -1196,7 +1212,8 @@ void IEView::navigate(IEVIEWNAVIGATE * nav) {
if (nav->dwFlags & IENF_UNICODE) {
navigate(nav->urlW);
- } else {
+ }
+ else {
navigate(nav->url);
}
}
diff --git a/plugins/IEView/src/IEView.h b/plugins/IEView/src/IEView.h index 1d26ac38c4..6d49975d7a 100644 --- a/plugins/IEView/src/IEView.h +++ b/plugins/IEView/src/IEView.h @@ -27,10 +27,10 @@ class IEView; #include "HTMLBuilder.h"
//#include "SmileyWindow.h"
-static const CLSID CLSID_MozillaBrowser=
+static const CLSID CLSID_MozillaBrowser =
{ 0x1339B54C, 0x3453, 0x11D2,
- { 0x93, 0xB9, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00 } };
+{ 0x93, 0xB9, 0x00, 0x00,
+0x00, 0x00, 0x00, 0x00 } };
#ifndef DISPID_AMBIENT_DLCONTROL
#define DISPID_AMBIENT_DLCONTROL (-5512)
@@ -40,116 +40,117 @@ static const CLSID CLSID_MozillaBrowser= #define __IDocHostUIHandler_INTERFACE_DEFINED__
typedef struct _DOCHOSTUIINFO
- {
+{
ULONG cbSize;
DWORD dwFlags;
DWORD dwDoubleClick;
OLECHAR *pchHostCss;
OLECHAR *pchHostNS;
- } DOCHOSTUIINFO;
+} DOCHOSTUIINFO;
-const IID IID_IDocHostUIHandler ={0xbd3f23c0,0xd43e,0x11CF,{0x89, 0x3b, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x1a}};
+const IID IID_IDocHostUIHandler = { 0xbd3f23c0, 0xd43e, 0x11CF, { 0x89, 0x3b, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x1a } };
- MIDL_INTERFACE("bd3f23c0-d43e-11cf-893b-00aa00bdce1a")
- IDocHostUIHandler : public IUnknown
- {
- public:
- virtual HRESULT STDMETHODCALLTYPE ShowContextMenu(
+MIDL_INTERFACE("bd3f23c0-d43e-11cf-893b-00aa00bdce1a")
+IDocHostUIHandler : public IUnknown
+{
+public:
+ virtual HRESULT STDMETHODCALLTYPE ShowContextMenu(
/* [in] */ DWORD dwID,
/* [in] */ POINT *ppt,
/* [in] */ IUnknown *pcmdtReserved,
/* [in] */ IDispatch *pdispReserved) = 0;
- virtual HRESULT STDMETHODCALLTYPE GetHostInfo(
+ virtual HRESULT STDMETHODCALLTYPE GetHostInfo(
/* [out][in] */ DOCHOSTUIINFO *pInfo) = 0;
- virtual HRESULT STDMETHODCALLTYPE ShowUI(
+ virtual HRESULT STDMETHODCALLTYPE ShowUI(
/* [in] */ DWORD dwID,
/* [in] */ IOleInPlaceActiveObject *pActiveObject,
/* [in] */ IOleCommandTarget *pCommandTarget,
/* [in] */ IOleInPlaceFrame *pFrame,
/* [in] */ IOleInPlaceUIWindow *pDoc) = 0;
- virtual HRESULT STDMETHODCALLTYPE HideUI( void) = 0;
+ virtual HRESULT STDMETHODCALLTYPE HideUI(void) = 0;
- virtual HRESULT STDMETHODCALLTYPE UpdateUI( void) = 0;
+ virtual HRESULT STDMETHODCALLTYPE UpdateUI(void) = 0;
- virtual HRESULT STDMETHODCALLTYPE EnableModeless(
+ virtual HRESULT STDMETHODCALLTYPE EnableModeless(
/* [in] */ BOOL fEnable) = 0;
- virtual HRESULT STDMETHODCALLTYPE OnDocWindowActivate(
+ virtual HRESULT STDMETHODCALLTYPE OnDocWindowActivate(
/* [in] */ BOOL fActivate) = 0;
- virtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivate(
+ virtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivate(
/* [in] */ BOOL fActivate) = 0;
- virtual HRESULT STDMETHODCALLTYPE ResizeBorder(
+ virtual HRESULT STDMETHODCALLTYPE ResizeBorder(
/* [in] */ LPCRECT prcBorder,
/* [in] */ IOleInPlaceUIWindow *pUIWindow,
/* [in] */ BOOL fRameWindow) = 0;
- virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(
+ virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(
/* [in] */ LPMSG lpMsg,
/* [in] */ const GUID *pguidCmdGroup,
/* [in] */ DWORD nCmdID) = 0;
- virtual HRESULT STDMETHODCALLTYPE GetOptionKeyPath(
- /* [annotation][out] */
+ virtual HRESULT STDMETHODCALLTYPE GetOptionKeyPath(
+ /* [annotation][out] */
LPOLESTR *pchKey,
/* [in] */ DWORD dw) = 0;
- virtual HRESULT STDMETHODCALLTYPE GetDropTarget(
+ virtual HRESULT STDMETHODCALLTYPE GetDropTarget(
/* [in] */ IDropTarget *pDropTarget,
/* [out] */ IDropTarget **ppDropTarget) = 0;
- virtual HRESULT STDMETHODCALLTYPE GetExternal(
+ virtual HRESULT STDMETHODCALLTYPE GetExternal(
/* [out] */ IDispatch **ppDispatch) = 0;
- virtual HRESULT STDMETHODCALLTYPE TranslateUrl(
+ virtual HRESULT STDMETHODCALLTYPE TranslateUrl(
/* [in] */ DWORD dwTranslate,
- /* [annotation][in] */
+ /* [annotation][in] */
OLECHAR *pchURLIn,
- /* [annotation][out] */
+ /* [annotation][out] */
OLECHAR **ppchURLOut) = 0;
- virtual HRESULT STDMETHODCALLTYPE FilterDataObject(
+ virtual HRESULT STDMETHODCALLTYPE FilterDataObject(
/* [in] */ IDataObject *pDO,
/* [out] */ IDataObject **ppDORet) = 0;
- };
+};
typedef enum tagDOCHOSTUIFLAG
- { DOCHOSTUIFLAG_DIALOG = 0x1,
- DOCHOSTUIFLAG_DISABLE_HELP_MENU = 0x2,
- DOCHOSTUIFLAG_NO3DBORDER = 0x4,
- DOCHOSTUIFLAG_SCROLL_NO = 0x8,
- DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE = 0x10,
- DOCHOSTUIFLAG_OPENNEWWIN = 0x20,
- DOCHOSTUIFLAG_DISABLE_OFFSCREEN = 0x40,
- DOCHOSTUIFLAG_FLAT_SCROLLBAR = 0x80,
- DOCHOSTUIFLAG_DIV_BLOCKDEFAULT = 0x100,
- DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY = 0x200,
- DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY = 0x400,
- DOCHOSTUIFLAG_CODEPAGELINKEDFONTS = 0x800,
- DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8 = 0x1000,
- DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8 = 0x2000,
- DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE = 0x4000,
- DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION = 0x10000,
- DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION = 0x20000,
- DOCHOSTUIFLAG_THEME = 0x40000,
- DOCHOSTUIFLAG_NOTHEME = 0x80000,
- DOCHOSTUIFLAG_NOPICS = 0x100000,
- DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x200000,
- DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x400000,
- DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK = 0x800000,
- DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x1000000,
- DOCHOSTUIFLAG_HOST_NAVIGATES = 0x2000000,
- DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION = 0x4000000,
- DOCHOSTUIFLAG_USE_WINDOWLESS_SELECTCONTROL = 0x8000000,
- DOCHOSTUIFLAG_USE_WINDOWED_SELECTCONTROL = 0x10000000,
- DOCHOSTUIFLAG_ENABLE_ACTIVEX_INACTIVATE_MODE = 0x20000000,
- DOCHOSTUIFLAG_DPI_AWARE = 0x40000000
- } DOCHOSTUIFLAG;
+{
+ DOCHOSTUIFLAG_DIALOG = 0x1,
+ DOCHOSTUIFLAG_DISABLE_HELP_MENU = 0x2,
+ DOCHOSTUIFLAG_NO3DBORDER = 0x4,
+ DOCHOSTUIFLAG_SCROLL_NO = 0x8,
+ DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE = 0x10,
+ DOCHOSTUIFLAG_OPENNEWWIN = 0x20,
+ DOCHOSTUIFLAG_DISABLE_OFFSCREEN = 0x40,
+ DOCHOSTUIFLAG_FLAT_SCROLLBAR = 0x80,
+ DOCHOSTUIFLAG_DIV_BLOCKDEFAULT = 0x100,
+ DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY = 0x200,
+ DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY = 0x400,
+ DOCHOSTUIFLAG_CODEPAGELINKEDFONTS = 0x800,
+ DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8 = 0x1000,
+ DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8 = 0x2000,
+ DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE = 0x4000,
+ DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION = 0x10000,
+ DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION = 0x20000,
+ DOCHOSTUIFLAG_THEME = 0x40000,
+ DOCHOSTUIFLAG_NOTHEME = 0x80000,
+ DOCHOSTUIFLAG_NOPICS = 0x100000,
+ DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x200000,
+ DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x400000,
+ DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK = 0x800000,
+ DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x1000000,
+ DOCHOSTUIFLAG_HOST_NAVIGATES = 0x2000000,
+ DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION = 0x4000000,
+ DOCHOSTUIFLAG_USE_WINDOWLESS_SELECTCONTROL = 0x8000000,
+ DOCHOSTUIFLAG_USE_WINDOWED_SELECTCONTROL = 0x10000000,
+ DOCHOSTUIFLAG_ENABLE_ACTIVEX_INACTIVATE_MODE = 0x20000000,
+ DOCHOSTUIFLAG_DPI_AWARE = 0x40000000
+} DOCHOSTUIFLAG;
#endif /* __IDocHostUIHandler_INTERFACE_DEFINED__ */
@@ -162,208 +163,208 @@ typedef enum tagDOCHOSTUIFLAG EXTERN_C const IID IID_IHTMLAnchorElement;
- MIDL_INTERFACE("3050f1da-98b5-11cf-bb82-00aa00bdce0b")
- IHTMLAnchorElement : public IDispatch
- {
- public:
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_href(
- /* [in] */ BSTR v) = 0;
+MIDL_INTERFACE("3050f1da-98b5-11cf-bb82-00aa00bdce0b")
+IHTMLAnchorElement : public IDispatch
+{
+public:
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_href(
+ /* [in] */ BSTR v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_href(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_href(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_target(
- /* [in] */ BSTR v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_target(
+ /* [in] */ BSTR v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_target(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_target(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_rel(
- /* [in] */ BSTR v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_rel(
+ /* [in] */ BSTR v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_rel(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_rel(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_rev(
- /* [in] */ BSTR v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_rev(
+ /* [in] */ BSTR v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_rev(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_rev(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_urn(
- /* [in] */ BSTR v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_urn(
+ /* [in] */ BSTR v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_urn(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_urn(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_Methods(
- /* [in] */ BSTR v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_Methods(
+ /* [in] */ BSTR v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_Methods(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_Methods(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_name(
- /* [in] */ BSTR v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_name(
+ /* [in] */ BSTR v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_name(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_name(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_host(
- /* [in] */ BSTR v) = 0;
+ virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_host(
+ /* [in] */ BSTR v) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_host(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_host(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_hostname(
- /* [in] */ BSTR v) = 0;
+ virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_hostname(
+ /* [in] */ BSTR v) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_hostname(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_hostname(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_pathname(
- /* [in] */ BSTR v) = 0;
+ virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_pathname(
+ /* [in] */ BSTR v) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_pathname(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_pathname(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_port(
- /* [in] */ BSTR v) = 0;
+ virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_port(
+ /* [in] */ BSTR v) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_port(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_port(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_protocol(
- /* [in] */ BSTR v) = 0;
+ virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_protocol(
+ /* [in] */ BSTR v) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_protocol(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_protocol(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_search(
- /* [in] */ BSTR v) = 0;
+ virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_search(
+ /* [in] */ BSTR v) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_search(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_search(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_hash(
- /* [in] */ BSTR v) = 0;
+ virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_hash(
+ /* [in] */ BSTR v) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_hash(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_hash(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_onblur(
- /* [in] */ VARIANT v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_onblur(
+ /* [in] */ VARIANT v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_onblur(
- /* [out][retval] */ VARIANT *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_onblur(
+ /* [out][retval] */ VARIANT *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_onfocus(
- /* [in] */ VARIANT v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_onfocus(
+ /* [in] */ VARIANT v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_onfocus(
- /* [out][retval] */ VARIANT *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_onfocus(
+ /* [out][retval] */ VARIANT *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_accessKey(
- /* [in] */ BSTR v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_accessKey(
+ /* [in] */ BSTR v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_accessKey(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_accessKey(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_protocolLong(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_protocolLong(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_mimeType(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_mimeType(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_nameProp(
- /* [out][retval] */ BSTR *p) = 0;
+ virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_nameProp(
+ /* [out][retval] */ BSTR *p) = 0;
- virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_tabIndex(
- /* [in] */ short v) = 0;
+ virtual /* [bindable][displaybind][id][propput] */ HRESULT STDMETHODCALLTYPE put_tabIndex(
+ /* [in] */ short v) = 0;
- virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_tabIndex(
- /* [out][retval] */ short *p) = 0;
+ virtual /* [bindable][displaybind][id][propget] */ HRESULT STDMETHODCALLTYPE get_tabIndex(
+ /* [out][retval] */ short *p) = 0;
- virtual /* [id] */ HRESULT STDMETHODCALLTYPE focus( void) = 0;
+ virtual /* [id] */ HRESULT STDMETHODCALLTYPE focus( void) = 0;
- virtual /* [id] */ HRESULT STDMETHODCALLTYPE blur( void) = 0;
+ virtual /* [id] */ HRESULT STDMETHODCALLTYPE blur( void) = 0;
- };
+};
#endif /* __IHTMLAnchorElement_INTERFACE_DEFINED__ */
#ifndef __IInternetSecurityManager_INTERFACE_DEFINED__
#define __IInternetSecurityManager_INTERFACE_DEFINED__
- typedef enum tagURLZONE {
- URLZONE_INVALID = -1,
- URLZONE_PREDEFINED_MIN = 0,
- URLZONE_LOCAL_MACHINE = 0,
- URLZONE_INTRANET,
- URLZONE_TRUSTED,
- URLZONE_INTERNET,
- URLZONE_UNTRUSTED,
- URLZONE_PREDEFINED_MAX = 999,
- URLZONE_USER_MIN = 1000,
- URLZONE_USER_MAX = 10000
- } URLZONE;
-
- #define URLACTION_ACTIVEX_MIN 0x00001200
- #define URLACTION_ACTIVEX_MAX 0x000013ff
- #define URLACTION_SCRIPT_MIN 0x00001400
- #define URLACTION_SCRIPT_MAX 0x000015ff
- #define URLACTION_HTML_MIN 0x00001600
- #define URLACTION_HTML_JAVA_RUN 0x00001605 // derive from Java custom policy
- #define URLACTION_HTML_MAX 0x000017ff
- #define URLACTION_JAVA_MIN 0x00001C00
- #define URLACTION_JAVA_MAX 0x00001Cff
-
- #define INET_E_USE_DEFAULT_PROTOCOLHANDLER 0x800C0011L
- #define INET_E_USE_DEFAULT_SETTING 0x800C0012L
- #define INET_E_DEFAULT_ACTION INET_E_USE_DEFAULT_PROTOCOLHANDLER
- #define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L
- #define INET_E_REDIRECTING 0x800C0014L
-
- // Permissions
- #define URLPOLICY_ALLOW 0x00
- #define URLPOLICY_QUERY 0x01
- #define URLPOLICY_DISALLOW 0x03
-
- static const CLSID IID_IInternetSecurityManager=
- { 0x79eac9ee, 0xbaf9, 0x11ce,
- { 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b } };
-
- #define SID_SInternetSecurityManager IID_IInternetSecurityManager
+typedef enum tagURLZONE {
+ URLZONE_INVALID = -1,
+ URLZONE_PREDEFINED_MIN = 0,
+ URLZONE_LOCAL_MACHINE = 0,
+ URLZONE_INTRANET,
+ URLZONE_TRUSTED,
+ URLZONE_INTERNET,
+ URLZONE_UNTRUSTED,
+ URLZONE_PREDEFINED_MAX = 999,
+ URLZONE_USER_MIN = 1000,
+ URLZONE_USER_MAX = 10000
+} URLZONE;
+
+#define URLACTION_ACTIVEX_MIN 0x00001200
+#define URLACTION_ACTIVEX_MAX 0x000013ff
+#define URLACTION_SCRIPT_MIN 0x00001400
+#define URLACTION_SCRIPT_MAX 0x000015ff
+#define URLACTION_HTML_MIN 0x00001600
+#define URLACTION_HTML_JAVA_RUN 0x00001605 // derive from Java custom policy
+#define URLACTION_HTML_MAX 0x000017ff
+#define URLACTION_JAVA_MIN 0x00001C00
+#define URLACTION_JAVA_MAX 0x00001Cff
+
+#define INET_E_USE_DEFAULT_PROTOCOLHANDLER 0x800C0011L
+#define INET_E_USE_DEFAULT_SETTING 0x800C0012L
+#define INET_E_DEFAULT_ACTION INET_E_USE_DEFAULT_PROTOCOLHANDLER
+#define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L
+#define INET_E_REDIRECTING 0x800C0014L
+
+// Permissions
+#define URLPOLICY_ALLOW 0x00
+#define URLPOLICY_QUERY 0x01
+#define URLPOLICY_DISALLOW 0x03
+
+static const CLSID IID_IInternetSecurityManager=
+{ 0x79eac9ee, 0xbaf9, 0x11ce,
+{ 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b } };
+
+#define SID_SInternetSecurityManager IID_IInternetSecurityManager
#ifdef __cplusplus
extern "C" {
#endif
#define INTERFACE IInternetSecurityMgrSite
-DECLARE_INTERFACE_(IInternetSecurityMgrSite,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
- STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
- STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
-};
+ DECLARE_INTERFACE_(IInternetSecurityMgrSite,IUnknown)
+ {
+ STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
+ STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
+ };
#undef INTERFACE
#define INTERFACE IInternetSecurityManager
-DECLARE_INTERFACE_(IInternetSecurityManager,IUnknown)
-{
- STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
- STDMETHOD_(ULONG,AddRef)(THIS) PURE;
- STDMETHOD_(ULONG,Release)(THIS) PURE;
-
- STDMETHOD(SetSecuritySite)(THIS_ IInternetSecurityMgrSite*) PURE;
- STDMETHOD(GetSecuritySite)(THIS_ IInternetSecurityMgrSite**) PURE;
- STDMETHOD(MapUrlToZone)(THIS_ LPCWSTR,DWORD*,DWORD) PURE;
- STDMETHOD(GetSecurityId)(THIS_ LPCWSTR,BYTE*,DWORD*,DWORD_PTR) PURE;
- STDMETHOD(ProcessUrlAction)(THIS_ LPCWSTR,DWORD,BYTE*,DWORD,BYTE*,DWORD,DWORD,DWORD) PURE;
- STDMETHOD(QueryCustomPolicy)(THIS_ LPCWSTR,REFGUID,BYTE**,DWORD*,BYTE*,DWORD,DWORD) PURE;
- STDMETHOD(SetZoneMapping)(THIS_ DWORD,LPCWSTR,DWORD) PURE;
- STDMETHOD(GetZoneMappings)(THIS_ DWORD,IEnumString**,DWORD) PURE;
-};
+ DECLARE_INTERFACE_(IInternetSecurityManager,IUnknown)
+ {
+ STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+
+ STDMETHOD(SetSecuritySite)(THIS_ IInternetSecurityMgrSite*) PURE;
+ STDMETHOD(GetSecuritySite)(THIS_ IInternetSecurityMgrSite**) PURE;
+ STDMETHOD(MapUrlToZone)(THIS_ LPCWSTR,DWORD*,DWORD) PURE;
+ STDMETHOD(GetSecurityId)(THIS_ LPCWSTR,BYTE*,DWORD*,DWORD_PTR) PURE;
+ STDMETHOD(ProcessUrlAction)(THIS_ LPCWSTR,DWORD,BYTE*,DWORD,BYTE*,DWORD,DWORD,DWORD) PURE;
+ STDMETHOD(QueryCustomPolicy)(THIS_ LPCWSTR,REFGUID,BYTE**,DWORD*,BYTE*,DWORD,DWORD) PURE;
+ STDMETHOD(SetZoneMapping)(THIS_ DWORD,LPCWSTR,DWORD) PURE;
+ STDMETHOD(GetZoneMappings)(THIS_ DWORD,IEnumString**,DWORD) PURE;
+ };
#undef INTERFACE
@@ -373,7 +374,7 @@ DECLARE_INTERFACE_(IInternetSecurityManager,IUnknown) #endif
-class IEViewSink:public DWebBrowserEvents2 {
+class IEViewSink :public DWebBrowserEvents2 {
private:
int m_cRef;
IEView *ieWindow;
@@ -387,8 +388,8 @@ public: STDMETHOD(GetTypeInfoCount)(UINT*);
STDMETHOD(GetTypeInfo)(UINT, LCID, LPTYPEINFO*);
- STDMETHOD(GetIDsOfNames)(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
- STDMETHOD(Invoke)(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
+ STDMETHOD(GetIDsOfNames)(REFIID, LPOLESTR*, UINT, LCID, DISPID*);
+ STDMETHOD(Invoke)(DISPID, REFIID, LCID, WORD, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*);
// DWebBrowserEvents2
STDMETHODIMP_(void)StatusTextChange(BSTR);
STDMETHODIMP_(void)ProgressChange(long, long);
@@ -397,7 +398,7 @@ public: STDMETHODIMP_(void)DownloadComplete();
STDMETHODIMP_(void)TitleChange(BSTR Text);
STDMETHODIMP_(void)PropertyChange(BSTR Text);
- STDMETHODIMP_(void)BeforeNavigate2(IDispatch*,VARIANT*,VARIANT*,VARIANT*,VARIANT*,VARIANT*,VARIANT_BOOL*);
+ STDMETHODIMP_(void)BeforeNavigate2(IDispatch*, VARIANT*, VARIANT*, VARIANT*, VARIANT*, VARIANT*, VARIANT_BOOL*);
STDMETHODIMP_(void)NewWindow2(IDispatch**, VARIANT_BOOL*);
STDMETHODIMP_(void)NavigateComplete(IDispatch*, VARIANT*);
STDMETHODIMP_(void)DocumentComplete(IDispatch*, VARIANT*);
@@ -414,12 +415,12 @@ public: STDMETHODIMP_(void)WindowSetWidth(long);
STDMETHODIMP_(void)WindowSetHeight(long);
STDMETHODIMP_(void)WindowClosing(VARIANT_BOOL, VARIANT_BOOL*);
- STDMETHODIMP_(void)ClientToHostWindow(long*,long*);
+ STDMETHODIMP_(void)ClientToHostWindow(long*, long*);
STDMETHODIMP_(void)SetSecureLockIcon(long);
STDMETHODIMP_(void)FileDownload(VARIANT_BOOL*);
};
-class IEView:public IDispatch, public IOleClientSite, public IOleInPlaceSite, public IDocHostUIHandler, public IInternetSecurityManager, public IServiceProvider {
+class IEView :public IDispatch, public IOleClientSite, public IOleInPlaceSite, public IDocHostUIHandler, public IInternetSecurityManager, public IServiceProvider {
private:
static IEView *list;
static CRITICAL_SECTION mutex;
@@ -451,8 +452,8 @@ private: // IDispatch
STDMETHOD(GetTypeInfoCount)(UINT*);
STDMETHOD(GetTypeInfo)(UINT, LCID, LPTYPEINFO*);
- STDMETHOD(GetIDsOfNames)(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
- STDMETHOD(Invoke)(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
+ STDMETHOD(GetIDsOfNames)(REFIID, LPOLESTR*, UINT, LCID, DISPID*);
+ STDMETHOD(Invoke)(DISPID, REFIID, LCID, WORD, DISPPARAMS*, VARIANT*, EXCEPINFO*, UINT*);
// IOleWindow
STDMETHOD(GetWindow)(HWND *phwnd);
STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode);
@@ -461,14 +462,14 @@ private: STDMETHOD(OnInPlaceActivate)(void);
STDMETHOD(OnUIActivate)(void);
STDMETHOD(GetWindowContext)(IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc,
- LPRECT lprcPosRect, LPRECT lprcClipRect,
- LPOLEINPLACEFRAMEINFO lpFrameInfo);
+ LPRECT lprcPosRect, LPRECT lprcClipRect,
+ LPOLEINPLACEFRAMEINFO lpFrameInfo);
STDMETHOD(Scroll)(SIZE scrollExtant);
STDMETHOD(OnUIDeactivate)(BOOL fUndoable);
- STDMETHOD(OnInPlaceDeactivate)( void);
- STDMETHOD(DiscardUndoState)( void);
- STDMETHOD(DeactivateAndUndo)( void);
+ STDMETHOD(OnInPlaceDeactivate)(void);
+ STDMETHOD(DiscardUndoState)(void);
+ STDMETHOD(DeactivateAndUndo)(void);
STDMETHOD(OnPosRectChange)(LPCRECT lprcPosRect);
// IOleClientSite
STDMETHOD(SaveObject)(void);
@@ -482,7 +483,7 @@ private: STDMETHOD(ShowContextMenu)(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved);
STDMETHOD(GetHostInfo)(DOCHOSTUIINFO *pInfo);
STDMETHOD(ShowUI)(DWORD dwID, IOleInPlaceActiveObject *pActiveObject, IOleCommandTarget *pCommandTarget,
- IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc);
+ IOleInPlaceFrame *pFrame, IOleInPlaceUIWindow *pDoc);
STDMETHOD(HideUI)(void);
STDMETHOD(UpdateUI)(void);
STDMETHOD(EnableModeless)(BOOL fEnable);
@@ -516,7 +517,7 @@ protected: void navigate(const wchar_t *);
public:
IEView(HWND parent, HTMLBuilder* builder, int x, int y, int cx, int cy);
-// IEView::IEView(HWND parent, SmileyWindow* smileyWindow, int x, int y, int cx, int cy);
+ // IEView::IEView(HWND parent, SmileyWindow* smileyWindow, int x, int y, int cx, int cy);
virtual ~IEView();
void waitWhileBusy();
diff --git a/plugins/IEView/src/MUCCHTMLBuilder.cpp b/plugins/IEView/src/MUCCHTMLBuilder.cpp index 0728738aac..de4e90fb00 100644 --- a/plugins/IEView/src/MUCCHTMLBuilder.cpp +++ b/plugins/IEView/src/MUCCHTMLBuilder.cpp @@ -51,7 +51,7 @@ void MUCCHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) }
if (lf) {
mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
- lf->lfHeight = (char) db_get_b(NULL, MUCCMOD, str, 10);
+ lf->lfHeight = (char)db_get_b(NULL, MUCCMOD, str, 10);
lf->lfHeight = abs(lf->lfHeight);
lf->lfWidth = 0;
lf->lfEscapement = 0;
@@ -99,17 +99,21 @@ char *MUCCHTMLBuilder::timestampToString(DWORD dwData, time_t check) if (dwData&IEEDD_MUCC_SHOW_DATE && dwData&IEEDD_MUCC_SHOW_TIME) {
if (dwData&IEEDD_MUCC_LONG_DATE) {
dbtts.szFormat = dwData&IEEDD_MUCC_SECONDS ? (char *)"D s" : (char *)"D t";
- } else {
+ }
+ else {
dbtts.szFormat = dwData&IEEDD_MUCC_SECONDS ? (char *)"d s" : (char *)"d t";
}
- } else if (dwData&IEEDD_MUCC_SHOW_DATE) {
+ }
+ else if (dwData&IEEDD_MUCC_SHOW_DATE) {
dbtts.szFormat = dwData&IEEDD_MUCC_LONG_DATE ? (char *)"D" : (char *)"d";
- } else if (dwData&IEEDD_MUCC_SHOW_TIME) {
+ }
+ else if (dwData&IEEDD_MUCC_SHOW_TIME) {
dbtts.szFormat = dwData&IEEDD_MUCC_SECONDS ? (char *)"s" : (char *)"t";
- } else {
+ }
+ else {
dbtts.szFormat = (char *)"";
}
- CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM) & dbtts);
+ CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM)& dbtts);
strncat(szResult, str, 500);
mir_strncpy(szResult, ptrA(mir_utf8encode(szResult)), 500);
return szResult;
@@ -125,14 +129,15 @@ void MUCCHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) if (protoSettings == NULL) {
return;
}
- if (protoSettings->getChatMode() == Options::MODE_TEMPLATE) {
-// buildHeadTemplate(view, event);
+ if (protoSettings->getChatMode() == Options::MODE_TEMPLATE) {
+ // buildHeadTemplate(view, event);
return;
}
- if (protoSettings->getChatMode() == Options::MODE_CSS) {
- const char *externalCSS = protoSettings->getChatCssFilename();
+ if (protoSettings->getChatMode() == Options::MODE_CSS) {
+ const char *externalCSS = protoSettings->getChatCssFilename();
Utils::appendText(&output, &outputSize, "<html><head><link rel=\"stylesheet\" href=\"%s\"/></head><body class=\"body\">\n", externalCSS);
- } else {
+ }
+ else {
HDC hdc = GetDC(NULL);
int logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(NULL, hdc);
@@ -140,14 +145,15 @@ void MUCCHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) Utils::appendText(&output, &outputSize, "<style type=\"text/css\">\n");
COLORREF bkgColor = db_get_dw(NULL, MUCCMOD, "BackgroundLog", 0xFFFFFF);
COLORREF inColor, outColor;
- bkgColor= (((bkgColor & 0xFF) << 16) | (bkgColor & 0xFF00) | ((bkgColor & 0xFF0000) >> 16));
+ bkgColor = (((bkgColor & 0xFF) << 16) | (bkgColor & 0xFF00) | ((bkgColor & 0xFF0000) >> 16));
inColor = outColor = bkgColor;
if (protoSettings->getChatFlags() & Options::LOG_IMAGE_ENABLED) {
Utils::appendText(&output, &outputSize, ".body {padding: 2px; text-align: left; background-attachment: %s; background-color: #%06X; background-image: url('%s'); overflow: auto;}\n",
- protoSettings->getChatFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int) bkgColor, protoSettings->getChatBackgroundFilename());
- } else {
+ protoSettings->getChatFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int)bkgColor, protoSettings->getChatBackgroundFilename());
+ }
+ else {
Utils::appendText(&output, &outputSize, ".body {margin: 0px; text-align: left; background-color: #%06X; overflow: auto;}\n",
- (int) bkgColor);
+ (int)bkgColor);
}
Utils::appendText(&output, &outputSize, ".link {color: #0000FF; text-decoration: underline;}\n");
Utils::appendText(&output, &outputSize, ".img {vertical-align: middle;}\n");
@@ -157,22 +163,23 @@ void MUCCHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) Utils::appendText(&output, &outputSize, ".divUserJoined {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
Utils::appendText(&output, &outputSize, ".divUserLeft {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
Utils::appendText(&output, &outputSize, ".divTopicChange {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
- } else {
- Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) inColor);
- Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) outColor);
- Utils::appendText(&output, &outputSize, ".divUserJoined {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) inColor);
- Utils::appendText(&output, &outputSize, ".divUserLeft {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) inColor);
- Utils::appendText(&output, &outputSize, ".divTopicChange {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) inColor);
}
- for (int i = 0; i < FONT_NUM; i++) {
+ else {
+ Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)inColor);
+ Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)outColor);
+ Utils::appendText(&output, &outputSize, ".divUserJoined {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)inColor);
+ Utils::appendText(&output, &outputSize, ".divUserLeft {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)inColor);
+ Utils::appendText(&output, &outputSize, ".divTopicChange {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)inColor);
+ }
+ for (int i = 0; i < FONT_NUM; i++) {
loadMsgDlgFont(i, &lf, &color);
Utils::appendText(&output, &outputSize, "%s {font-family: %s; font-size: %dpt; font-weight: %s; color: #%06X; %s }\n",
- classNames[i],
- lf.lfFaceName,
- abs((signed char)lf.lfHeight) * 74 /logPixelSY ,
- lf.lfWeight >= FW_BOLD ? "bold" : "normal",
- (int)(((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16)),
- lf.lfItalic ? "font-style: italic;" : "");
+ classNames[i],
+ lf.lfFaceName,
+ abs((signed char)lf.lfHeight) * 74 / logPixelSY,
+ lf.lfWeight >= FW_BOLD ? "bold" : "normal",
+ (int)(((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16)),
+ lf.lfItalic ? "font-style: italic;" : "");
}
Utils::appendText(&output, &outputSize, "</style></head><body class=\"body\">\n");
}
@@ -186,7 +193,7 @@ void MUCCHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
{
IEVIEWEVENTDATA* eventData = event->eventData;
- for (int eventIdx = 0; eventData!=NULL && (eventIdx < event->count || event->count==-1); eventData = eventData->next, eventIdx++) {
+ for (int eventIdx = 0; eventData != NULL && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) {
DWORD dwData = eventData->dwData;
char *style = NULL;
int styleSize;
@@ -208,11 +215,11 @@ void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) Utils::appendText(&output, &outputSize, "<div class=\"%s\">", isSent ? "divOut" : "divIn");
if (dwData & IEEDD_MUCC_SHOW_TIME || dwData & IEEDD_MUCC_SHOW_DATE)
Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s </span>",
- isSent ? "timestamp" : "timestamp", timestampToString(dwData, eventData->time));
+ isSent ? "timestamp" : "timestamp", timestampToString(dwData, eventData->time));
if (dwData & IEEDD_MUCC_SHOW_NICK)
Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s: </span>",
- isSent ? "nameOut" : "nameIn", szName);
+ isSent ? "nameOut" : "nameIn", szName);
if (dwData & IEEDD_MUCC_MSG_ON_NEW_LINE)
Utils::appendText(&output, &outputSize, "<br>");
@@ -221,9 +228,9 @@ void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) if (eventData->dwFlags & IEEDF_FORMAT_SIZE && eventData->fontSize > 0)
Utils::appendText(&style, &styleSize, "font-size:%dpt;", eventData->fontSize);
- if (eventData->dwFlags & IEEDF_FORMAT_COLOR && eventData->color!=0xFFFFFFFF)
+ if (eventData->dwFlags & IEEDF_FORMAT_COLOR && eventData->color != 0xFFFFFFFF)
Utils::appendText(&style, &styleSize, "color:#%06X;", ((eventData->color & 0xFF) << 16) | (eventData->color & 0xFF00) | ((eventData->color & 0xFF0000) >> 16));
-
+
if (eventData->dwFlags & IEEDF_FORMAT_FONT)
Utils::appendText(&style, &styleSize, "font-family:%s;", eventData->fontName);
@@ -232,7 +239,7 @@ void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) Utils::appendText(&style, &styleSize, "font-style: %s;", eventData->fontStyle & IE_FONT_ITALIC ? "italic" : "normal");
Utils::appendText(&style, &styleSize, "text-decoration: %s;", eventData->fontStyle & IE_FONT_UNDERLINE ? "underline" : "none");
}
- Utils::appendText(&output, &outputSize, "<span class=\"%s\"><span style=\"%s\">%s</span></span>", className, style!=NULL ? style : "", szText);
+ Utils::appendText(&output, &outputSize, "<span class=\"%s\"><span style=\"%s\">%s</span></span>", className, style != NULL ? style : "", szText);
Utils::appendText(&output, &outputSize, "</div>\n");
if (style != NULL)
free(style);
@@ -260,7 +267,7 @@ void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event) Utils::appendText(&output, &outputSize, "<div class=\"%s\">", divName);
if (dwData & IEEDD_MUCC_SHOW_TIME || dwData & IEEDD_MUCC_SHOW_DATE)
Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s </span>",
- isSent ? "timestamp" : "timestamp", timestampToString(dwData, eventData->time));
+ isSent ? "timestamp" : "timestamp", timestampToString(dwData, eventData->time));
Utils::appendText(&output, &outputSize, "<span class=\"%s\">", className);
Utils::appendText(&output, &outputSize, Translate(eventText), szText);
@@ -289,7 +296,7 @@ void MUCCHTMLBuilder::appendEvent(IEView *view, IEVIEWEVENT *event) appendEventNonTemplate(view, event);
}
-bool MUCCHTMLBuilder::isDbEventShown(DBEVENTINFO *dbei)
+bool MUCCHTMLBuilder::isDbEventShown(DBEVENTINFO *)
{
return true;
}
diff --git a/plugins/IEView/src/MUCCHTMLBuilder.h b/plugins/IEView/src/MUCCHTMLBuilder.h index d6c00df94b..0837c2d4fe 100644 --- a/plugins/IEView/src/MUCCHTMLBuilder.h +++ b/plugins/IEView/src/MUCCHTMLBuilder.h @@ -25,7 +25,7 @@ class MUCCHTMLBuilder; #include "HTMLBuilder.h"
-class MUCCHTMLBuilder:public HTMLBuilder
+class MUCCHTMLBuilder :public HTMLBuilder
{
protected:
void loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour);
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index d17638d8f7..ca000e8a33 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -42,15 +42,15 @@ struct }
static tabPages[] =
{
- { IEViewGeneralOptDlgProc, IDD_GENERAL_OPTIONS, LPGENT("General") },
- { IEViewSRMMOptDlgProc, IDD_SRMM_OPTIONS, LPGENT("Message Log") },
- { IEViewGroupChatsOptDlgProc, IDD_SRMM_OPTIONS, LPGENT("Group chats") },
- { IEViewHistoryOptDlgProc, IDD_SRMM_OPTIONS, LPGENT("History") }
+ { IEViewGeneralOptDlgProc, IDD_GENERAL_OPTIONS, LPGENT("General") },
+ { IEViewSRMMOptDlgProc, IDD_SRMM_OPTIONS, LPGENT("Message Log") },
+ { IEViewGroupChatsOptDlgProc, IDD_SRMM_OPTIONS, LPGENT("Group chats") },
+ { IEViewHistoryOptDlgProc, IDD_SRMM_OPTIONS, LPGENT("History") }
};
static LPARAM GetItemParam(HWND hwndTreeView, HTREEITEM hItem)
{
- TVITEM tvi = {0};
+ TVITEM tvi = { 0 };
tvi.mask = TVIF_PARAM;
tvi.hItem = hItem == NULL ? TreeView_GetSelection(hwndTreeView) : hItem;
TreeView_GetItem(hwndTreeView, &tvi);
@@ -176,11 +176,11 @@ static void SetIcon(HWND hwnd, DWORD id, int index, bool condition) {
HICON hIcon;
if (condition)
- hIcon = ImageList_GetIcon(hImageList,index + 1,ILD_NORMAL);
+ hIcon = ImageList_GetIcon(hImageList, index + 1, ILD_NORMAL);
else
- hIcon = ImageList_GetIcon(hImageList,index + 0,ILD_NORMAL);
+ hIcon = ImageList_GetIcon(hImageList, index + 0, ILD_NORMAL);
- hIcon = (HICON) SendDlgItemMessage(hwnd, id, STM_SETICON,(WPARAM)hIcon, 0);
+ hIcon = (HICON)SendDlgItemMessage(hwnd, id, STM_SETICON, (WPARAM)hIcon, 0);
if (hIcon != NULL)
DestroyIcon(hIcon);
}
@@ -218,17 +218,20 @@ static void UpdateSRMMProtoInfo(HWND hwndDlg, ProtocolSettings *proto) CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, proto->getSRMMFlagsTemp() & Options::LOG_GROUP_MESSAGES ? BST_CHECKED : BST_UNCHECKED);
if (proto->getSRMMBackgroundFilenameTemp() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, proto->getSRMMBackgroundFilenameTemp());
- } else {
+ }
+ else {
SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, "");
}
if (proto->getSRMMCssFilename() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, proto->getSRMMCssFilenameTemp());
- } else {
+ }
+ else {
SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, "");
}
if (proto->getSRMMTemplateFilenameTemp() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, proto->getSRMMTemplateFilenameTemp());
- } else {
+ }
+ else {
SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, "");
}
UpdateTemplateIcons(hwndDlg, proto->getSRMMTemplateFilenameTemp());
@@ -256,17 +259,20 @@ static void UpdateChatProtoInfo(HWND hwndDlg, ProtocolSettings *proto) CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, proto->getChatFlagsTemp() & Options::LOG_GROUP_MESSAGES ? BST_CHECKED : BST_UNCHECKED);
if (proto->getChatBackgroundFilenameTemp() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, proto->getChatBackgroundFilenameTemp());
- } else {
+ }
+ else {
SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, "");
}
if (proto->getChatCssFilename() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, proto->getChatCssFilenameTemp());
- } else {
+ }
+ else {
SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, "");
}
if (proto->getChatTemplateFilenameTemp() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, proto->getChatTemplateFilenameTemp());
- } else {
+ }
+ else {
SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, "");
}
UpdateTemplateIcons(hwndDlg, proto->getChatTemplateFilenameTemp());
@@ -294,17 +300,20 @@ static void UpdateHistoryProtoInfo(HWND hwndDlg, ProtocolSettings *proto) CheckDlgButton(hwndDlg, IDC_LOG_GROUP_MESSAGES, proto->getHistoryFlagsTemp() & Options::LOG_GROUP_MESSAGES ? BST_CHECKED : BST_UNCHECKED);
if (proto->getHistoryBackgroundFilenameTemp() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, proto->getHistoryBackgroundFilenameTemp());
- } else {
+ }
+ else {
SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, "");
}
if (proto->getHistoryCssFilename() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, proto->getHistoryCssFilenameTemp());
- } else {
+ }
+ else {
SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, "");
}
if (proto->getHistoryTemplateFilenameTemp() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, proto->getHistoryTemplateFilenameTemp());
- } else {
+ }
+ else {
SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, "");
}
UpdateTemplateIcons(hwndDlg, proto->getHistoryTemplateFilenameTemp());
@@ -319,23 +328,24 @@ static void RefreshProtoIcons() ProtocolSettings *proto;
if (hProtocolImageList != NULL) {
ImageList_RemoveAll(hProtocolImageList);
- } else {
- for (i=0,proto=Options::getProtocolSettings();proto!=NULL;proto=proto->getNext(),i++);
+ }
+ else {
+ for (i = 0, proto = Options::getProtocolSettings(); proto != NULL; proto = proto->getNext(), i++);
hProtocolImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
ILC_MASK | ILC_COLOR32, i, 0);
}
- for (i=0,proto=Options::getProtocolSettings();proto!=NULL;proto=proto->getNext(),i++) {
+ for (i = 0, proto = Options::getProtocolSettings(); proto != NULL; proto = proto->getNext(), i++) {
HICON hIcon = NULL;
- if (i > 0 ) {
- hIcon=(HICON)CallProtoService(proto->getProtocolName(), PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
+ if (i > 0) {
+ hIcon = (HICON)CallProtoService(proto->getProtocolName(), PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
if (hIcon == NULL) {
- hIcon=(HICON)CallProtoService(proto->getProtocolName(), PS_LOADICON, PLI_PROTOCOL, 0);
+ hIcon = (HICON)CallProtoService(proto->getProtocolName(), PS_LOADICON, PLI_PROTOCOL, 0);
}
ImageList_AddIcon(hProtocolImageList, hIcon);
DestroyIcon(hIcon);
}
if (hIcon == NULL) {
- hIcon=(HICON)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ hIcon = (HICON)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
ImageList_AddIcon(hProtocolImageList, hIcon);
Skin_ReleaseIcon(hIcon);
}
@@ -346,13 +356,14 @@ static void RefreshIcons() {
if (hImageList != NULL) {
ImageList_RemoveAll(hImageList);
- } else {
+ }
+ else {
hImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR32, 0, 0);
}
- ImageList_AddIcon(hImageList, (HICON) LoadImage(hInstance, MAKEINTRESOURCE(IDI_GROUP_OFF),IMAGE_ICON,0,0,0));
- ImageList_AddIcon(hImageList, (HICON) LoadImage(hInstance, MAKEINTRESOURCE(IDI_GROUP_ON),IMAGE_ICON,0,0,0));
- ImageList_AddIcon(hImageList, (HICON) LoadImage(hInstance, MAKEINTRESOURCE(IDI_RTL_OFF),IMAGE_ICON,0,0,0));
- ImageList_AddIcon(hImageList, (HICON) LoadImage(hInstance, MAKEINTRESOURCE(IDI_RTL_ON),IMAGE_ICON,0,0,0));
+ ImageList_AddIcon(hImageList, (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_GROUP_OFF), IMAGE_ICON, 0, 0, 0));
+ ImageList_AddIcon(hImageList, (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_GROUP_ON), IMAGE_ICON, 0, 0, 0));
+ ImageList_AddIcon(hImageList, (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_RTL_OFF), IMAGE_ICON, 0, 0, 0));
+ ImageList_AddIcon(hImageList, (HICON)LoadImage(hInstance, MAKEINTRESOURCE(IDI_RTL_ON), IMAGE_ICON, 0, 0, 0));
}
static void RefreshProtoList(HWND hwndDlg, int mode, bool protoTemplates)
@@ -363,49 +374,51 @@ static void RefreshProtoList(HWND hwndDlg, int mode, bool protoTemplates) TreeView_DeleteAllItems(hProtoList);
TreeView_SetImageList(hProtoList, hProtocolImageList, TVSIL_NORMAL);
ProtocolSettings *proto;
- for (i=0,proto=Options::getProtocolSettings();proto!=NULL;proto=proto->getNext(),i++) {
+ for (i = 0, proto = Options::getProtocolSettings(); proto != NULL; proto = proto->getNext(), i++) {
char protoName[128];
- TVINSERTSTRUCT tvi = {0};
+ TVINSERTSTRUCT tvi = { 0 };
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 (i == 0) {
strcpy(protoName, Translate("Default"));
- } else {
+ }
+ else {
CallProtoService(proto->getProtocolName(), PS_GETNAME, sizeof(protoName), (LPARAM)protoName);
-// strcat(protoName, " ");
- // strcat(protoName, Translate("protocol"));
+ // strcat(protoName, " ");
+ // strcat(protoName, Translate("protocol"));
}
tvi.item.pszText = mir_a2t(protoName);
tvi.item.lParam = (LPARAM)proto;
tvi.item.iImage = i;
tvi.item.iSelectedImage = i;
switch (mode) {
- case 0:
- tvi.item.state = INDEXTOSTATEIMAGEMASK(proto->isSRMMEnableTemp() ? 2 : 1);
- break;
- case 1:
- tvi.item.state = INDEXTOSTATEIMAGEMASK(proto->isChatEnableTemp() ? 2 : 1);
- break;
- case 2:
- tvi.item.state = INDEXTOSTATEIMAGEMASK(proto->isHistoryEnableTemp() ? 2 : 1);
- break;
+ case 0:
+ tvi.item.state = INDEXTOSTATEIMAGEMASK(proto->isSRMMEnableTemp() ? 2 : 1);
+ break;
+ case 1:
+ tvi.item.state = INDEXTOSTATEIMAGEMASK(proto->isChatEnableTemp() ? 2 : 1);
+ break;
+ case 2:
+ tvi.item.state = INDEXTOSTATEIMAGEMASK(proto->isHistoryEnableTemp() ? 2 : 1);
+ break;
}
- if (i==0) {
+ if (i == 0) {
hItem = TreeView_InsertItem(hProtoList, &tvi);
- } else {
+ }
+ else {
TreeView_InsertItem(hProtoList, &tvi);
}
if (!protoTemplates) break;
}
-// UpdateSRMMProtoInfo(hwndDlg, Options::getProtocolSettings());
+ // UpdateSRMMProtoInfo(hwndDlg, Options::getProtocolSettings());
TreeView_SelectItem(hProtoList, hItem);
}
-static bool BrowseFile(HWND hwndDlg, char *filter, char *defExt, char *path, int maxLen)
+static bool BrowseFile(HWND hwndDlg, char *filter, char *defExt, char *path, int maxLen)
{
- OPENFILENAMEA ofn={0};
+ OPENFILENAMEA ofn = { 0 };
GetWindowTextA(hwndDlg, path, maxLen);
ofn.lStructSize = sizeof(OPENFILENAME);//_SIZE_VERSION_400;
ofn.hwndOwner = hwndDlg;
@@ -416,20 +429,20 @@ static bool BrowseFile(HWND hwndDlg, char *filter, char *defExt, char *path, in ofn.nMaxFile = maxLen;
ofn.nMaxFileTitle = maxLen;
ofn.lpstrDefExt = defExt;//"ivt";
- if(GetOpenFileNameA(&ofn)) {
+ if (GetOpenFileNameA(&ofn)) {
SetWindowTextA(hwndDlg, path);
return true;
}
return false;
}
-int IEViewOptInit(WPARAM wParam, LPARAM lParam)
+int IEViewOptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = hInstance;
odp.ptszGroup = LPGENT("Message Sessions");
odp.ptszTitle = LPGENT("IEView");
- odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[0].dlgId);
odp.pfnDlgProc = tabPages[0].dlgProc;
odp.ptszTab = tabPages[0].tabName;
@@ -479,78 +492,78 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w {
switch (msg) {
case WM_INITDIALOG:
- {
- MarkInitialized(1);
- TranslateDialogDefault(hwndDlg);
- if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_BBCODES) {
- CheckDlgButton(hwndDlg, IDC_ENABLE_BBCODES, BST_CHECKED);
- }
- if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_FLASH) {
- CheckDlgButton(hwndDlg, IDC_ENABLE_FLASH, BST_CHECKED);
+ {
+ MarkInitialized(1);
+ TranslateDialogDefault(hwndDlg);
+ if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_BBCODES) {
+ CheckDlgButton(hwndDlg, IDC_ENABLE_BBCODES, BST_CHECKED);
+ }
+ if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_FLASH) {
+ CheckDlgButton(hwndDlg, IDC_ENABLE_FLASH, BST_CHECKED);
+ }
+ if (Options::getGeneralFlags() & Options::GENERAL_SMILEYINNAMES) {
+ CheckDlgButton(hwndDlg, IDC_SMILEYS_IN_NAMES, BST_CHECKED);
+ }
+ if (Options::getGeneralFlags() & Options::GENERAL_NO_BORDER) {
+ CheckDlgButton(hwndDlg, IDC_NO_BORDER, BST_CHECKED);
+ }
+ if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_EMBED) {
+ CheckDlgButton(hwndDlg, IDC_ENABLE_EMBED, BST_CHECKED);
+ }
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SMILEYS_IN_NAMES), Options::isSmileyAdd());
+ EnableWindow(GetDlgItem(hwndDlg, IDC_EMBED_SIZE), IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED));
+ TCHAR* size[] = { _T("320 x 205"), _T("480 x 385"), _T("560 x 349"), _T("640 x 390") };
+ for (int i = 0; i < SIZEOF(size); ++i){
+ int item = SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(size[i]));
+ SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_SETITEMDATA, item, 0);
+ }
+ SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_SETCURSEL, Options::getEmbedsize(), 0);
+ return TRUE;
+ }
+ case WM_COMMAND:
+ {
+ switch (LOWORD(wParam)) {
+ case IDC_ENABLE_BBCODES:
+ case IDC_ENABLE_FLASH:
+ case IDC_SMILEYS_IN_NAMES:
+ case IDC_NO_BORDER:
+ case IDC_EMBED_SIZE:
+ MarkChanges(1, hwndDlg);
+ break;
+ case IDC_ENABLE_EMBED:
+ MarkChanges(1, hwndDlg);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_EMBED_SIZE), IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED));
+ break;
+ }
+ }
+ break;
+ case WM_NOTIFY:
+ {
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_APPLY:
+ int i = 0;
+ if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_BBCODES)) {
+ i |= Options::GENERAL_ENABLE_BBCODES;
}
- if (Options::getGeneralFlags() & Options::GENERAL_SMILEYINNAMES) {
- CheckDlgButton(hwndDlg, IDC_SMILEYS_IN_NAMES, BST_CHECKED);
+ if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_FLASH)) {
+ i |= Options::GENERAL_ENABLE_FLASH;
}
- if (Options::getGeneralFlags() & Options::GENERAL_NO_BORDER) {
- CheckDlgButton(hwndDlg, IDC_NO_BORDER, BST_CHECKED);
+ if (IsDlgButtonChecked(hwndDlg, IDC_SMILEYS_IN_NAMES)) {
+ i |= Options::GENERAL_SMILEYINNAMES;
}
- if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_EMBED) {
- CheckDlgButton(hwndDlg, IDC_ENABLE_EMBED, BST_CHECKED);
+ if (IsDlgButtonChecked(hwndDlg, IDC_NO_BORDER)) {
+ i |= Options::GENERAL_NO_BORDER;
}
- EnableWindow(GetDlgItem(hwndDlg, IDC_SMILEYS_IN_NAMES), Options::isSmileyAdd());
- EnableWindow(GetDlgItem(hwndDlg, IDC_EMBED_SIZE), IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED));
- TCHAR* size[] = { _T("320 x 205"), _T("480 x 385") , _T("560 x 349"), _T("640 x 390")};
- for (int i = 0; i < SIZEOF(size); ++i){
- int item=SendDlgItemMessage(hwndDlg,IDC_EMBED_SIZE,CB_ADDSTRING,0,(LPARAM)TranslateTS(size[i]));
- SendDlgItemMessage(hwndDlg,IDC_EMBED_SIZE,CB_SETITEMDATA,item,0);
+ if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED)) {
+ i |= Options::GENERAL_ENABLE_EMBED;
}
- SendDlgItemMessage(hwndDlg,IDC_EMBED_SIZE,CB_SETCURSEL,Options::getEmbedsize(),0);
+ Options::setGeneralFlags(i);
+ ApplyChanges(1);
+ Options::setEmbedsize(SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_GETCURSEL, 0, 0));
return TRUE;
}
- case WM_COMMAND:
- {
- switch (LOWORD(wParam)) {
- case IDC_ENABLE_BBCODES:
- case IDC_ENABLE_FLASH:
- case IDC_SMILEYS_IN_NAMES:
- case IDC_NO_BORDER:
- case IDC_EMBED_SIZE:
- MarkChanges(1, hwndDlg);
- break;
- case IDC_ENABLE_EMBED:
- MarkChanges(1, hwndDlg);
- EnableWindow(GetDlgItem(hwndDlg, IDC_EMBED_SIZE), IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED));
- break;
- }
- }
- break;
- case WM_NOTIFY:
- {
- switch (((LPNMHDR) lParam)->code) {
- case PSN_APPLY:
- int i = 0;
- if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_BBCODES)) {
- i |= Options::GENERAL_ENABLE_BBCODES;
- }
- if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_FLASH)) {
- i |= Options::GENERAL_ENABLE_FLASH;
- }
- if (IsDlgButtonChecked(hwndDlg, IDC_SMILEYS_IN_NAMES)) {
- i |= Options::GENERAL_SMILEYINNAMES;
- }
- if (IsDlgButtonChecked(hwndDlg, IDC_NO_BORDER)) {
- i |= Options::GENERAL_NO_BORDER;
- }
- if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED)) {
- i |= Options::GENERAL_ENABLE_EMBED;
- }
- Options::setGeneralFlags(i);
- ApplyChanges(1);
- Options::setEmbedsize(SendDlgItemMessage(hwndDlg,IDC_EMBED_SIZE,CB_GETCURSEL,0,0));
- return TRUE;
- }
- }
- break;
+ }
+ break;
case WM_DESTROY:
break;
}
@@ -563,126 +576,126 @@ static INT_PTR CALLBACK IEViewSRMMOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar char path[MAX_PATH], filter[MAX_PATH];
switch (msg) {
case WM_INITDIALOG:
- {
- MarkInitialized(2);
- TranslateDialogDefault(hwndDlg);
- srmmCurrentProtoItem = NULL;
- RefreshProtoList(hwndDlg, 0, true);
- return TRUE;
- }
+ {
+ MarkInitialized(2);
+ TranslateDialogDefault(hwndDlg);
+ srmmCurrentProtoItem = NULL;
+ RefreshProtoList(hwndDlg, 0, true);
+ return TRUE;
+ }
case WM_COMMAND:
- {
- switch (LOWORD(wParam)) {
- case IDC_BACKGROUND_IMAGE_FILENAME:
- case IDC_EXTERNALCSS_FILENAME:
- case IDC_EXTERNALCSS_FILENAME_RTL:
- case IDC_TEMPLATES_FILENAME:
- if ((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE)
- MarkChanges(2, hwndDlg);
- break;
- case IDC_SCROLL_BACKGROUND_IMAGE:
- case IDC_LOG_SHOW_NICKNAMES:
- case IDC_LOG_SHOW_TIME:
- case IDC_LOG_SHOW_DATE:
- case IDC_LOG_SHOW_SECONDS:
- case IDC_LOG_LONG_DATE:
- case IDC_LOG_RELATIVE_DATE:
- case IDC_LOG_GROUP_MESSAGES:
+ {
+ switch (LOWORD(wParam)) {
+ case IDC_BACKGROUND_IMAGE_FILENAME:
+ case IDC_EXTERNALCSS_FILENAME:
+ case IDC_EXTERNALCSS_FILENAME_RTL:
+ case IDC_TEMPLATES_FILENAME:
+ if ((HWND)lParam == GetFocus() && HIWORD(wParam) == EN_CHANGE)
MarkChanges(2, hwndDlg);
- break;
- case IDC_BACKGROUND_IMAGE:
- bChecked = IsDlgButtonChecked(hwndDlg, IDC_MODE_COMPATIBLE) && IsDlgButtonChecked(hwndDlg, IDC_BACKGROUND_IMAGE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME), bChecked);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE_BACKGROUND_IMAGE), bChecked);
- EnableWindow(GetDlgItem(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE), bChecked);
+ break;
+ case IDC_SCROLL_BACKGROUND_IMAGE:
+ case IDC_LOG_SHOW_NICKNAMES:
+ case IDC_LOG_SHOW_TIME:
+ case IDC_LOG_SHOW_DATE:
+ case IDC_LOG_SHOW_SECONDS:
+ case IDC_LOG_LONG_DATE:
+ case IDC_LOG_RELATIVE_DATE:
+ case IDC_LOG_GROUP_MESSAGES:
+ MarkChanges(2, hwndDlg);
+ break;
+ case IDC_BACKGROUND_IMAGE:
+ bChecked = IsDlgButtonChecked(hwndDlg, IDC_MODE_COMPATIBLE) && IsDlgButtonChecked(hwndDlg, IDC_BACKGROUND_IMAGE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME), bChecked);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE_BACKGROUND_IMAGE), bChecked);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_SCROLL_BACKGROUND_IMAGE), bChecked);
+ MarkChanges(2, hwndDlg);
+ break;
+ case IDC_BROWSE_TEMPLATES:
+ mir_snprintf(filter, SIZEOF(filter), "%s (*.ivt)%c*.ivt%c%s (*.*)%c*.*%c%c", Translate("Template"), 0, 0, Translate("All Files"), 0, 0, 0);
+ if (BrowseFile(hwndDlg, filter, "ivt", path, SIZEOF(path))) {
+ SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, path);
+ UpdateTemplateIcons(hwndDlg, path);
MarkChanges(2, hwndDlg);
- break;
- case IDC_BROWSE_TEMPLATES:
- mir_snprintf(filter, SIZEOF(filter), "%s (*.ivt)%c*.ivt%c%s (*.*)%c*.*%c%c", Translate("Template"), 0, 0, Translate("All Files"), 0, 0, 0);
- if (BrowseFile(hwndDlg, filter, "ivt", path, SIZEOF(path))) {
- SetDlgItemTextA(hwndDlg, IDC_TEMPLATES_FILENAME, path);
- UpdateTemplateIcons(hwndDlg, path);
- MarkChanges(2, hwndDlg);
- }
- break;
- case IDC_BROWSE_BACKGROUND_IMAGE:
- mir_snprintf(filter, SIZEOF(filter), "%s (*.jpg,*.jpeg,*.gif,*.png,*.bmp)%c*.jpg;*.jpeg;*.gif;*.png;*.bmp%c%s (*.*)%c*.*%c%c", Translate("All Images"), 0, 0, Translate("All Files"), 0, 0, 0);
- if (BrowseFile(hwndDlg, filter, "jpg", path, SIZEOF(path))) {
- SetDlgItemTextA(hwndDlg,IDC_BACKGROUND_IMAGE_FILENAME,path);
- MarkChanges(2, hwndDlg);
- }
- break;
- case IDC_BROWSE_EXTERNALCSS:
- mir_snprintf(filter, SIZEOF(filter), "%s (*.css)%c*.css%c%s (*.*)%c*.*%c%c", Translate("Style Sheet"), 0, 0, Translate("All Files"), 0, 0, 0);
- if (BrowseFile(hwndDlg, filter, "css", path, SIZEOF(path))) {
- SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, path);
- MarkChanges(2, hwndDlg);
- }
- break;
- case IDC_BROWSE_EXTERNALCSS_RTL:
- mir_snprintf(filter, SIZEOF(filter), "%s (*.css)%c*.css%c%s (*.*)%c*.*%c%c", Translate("Style Sheet"), 0, 0, Translate("All Files"), 0, 0, 0);
- if (BrowseFile(hwndDlg, filter, "css", path, SIZEOF(path))) {
- SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME_RTL, path);
- MarkChanges(2, hwndDlg);
- }
- break;
- case IDC_MODE_COMPATIBLE:
- case IDC_MODE_CSS:
- case IDC_MODE_TEMPLATE:
- UpdateControlsState(hwndDlg);
+ }
+ break;
+ case IDC_BROWSE_BACKGROUND_IMAGE:
+ mir_snprintf(filter, SIZEOF(filter), "%s (*.jpg,*.jpeg,*.gif,*.png,*.bmp)%c*.jpg;*.jpeg;*.gif;*.png;*.bmp%c%s (*.*)%c*.*%c%c", Translate("All Images"), 0, 0, Translate("All Files"), 0, 0, 0);
+ if (BrowseFile(hwndDlg, filter, "jpg", path, SIZEOF(path))) {
+ SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, path);
MarkChanges(2, hwndDlg);
- break;
}
- }
- break;
- case UM_CHECKSTATECHANGE:
- {
- ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM) lParam);
- if (proto != NULL)
- if (strcmpi(proto->getProtocolName(), "_default_"))
- proto->setSRMMEnableTemp(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM) lParam));
-
- if ((HTREEITEM) lParam != TreeView_GetSelection((HWND)wParam))
- TreeView_SelectItem((HWND)wParam, (HTREEITEM) lParam);
- else
- UpdateSRMMProtoInfo(hwndDlg, proto);
-
+ break;
+ case IDC_BROWSE_EXTERNALCSS:
+ mir_snprintf(filter, SIZEOF(filter), "%s (*.css)%c*.css%c%s (*.*)%c*.*%c%c", Translate("Style Sheet"), 0, 0, Translate("All Files"), 0, 0, 0);
+ if (BrowseFile(hwndDlg, filter, "css", path, SIZEOF(path))) {
+ SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME, path);
+ MarkChanges(2, hwndDlg);
+ }
+ break;
+ case IDC_BROWSE_EXTERNALCSS_RTL:
+ mir_snprintf(filter, SIZEOF(filter), "%s (*.css)%c*.css%c%s (*.*)%c*.*%c%c", Translate("Style Sheet"), 0, 0, Translate("All Files"), 0, 0, 0);
+ if (BrowseFile(hwndDlg, filter, "css", path, SIZEOF(path))) {
+ SetDlgItemTextA(hwndDlg, IDC_EXTERNALCSS_FILENAME_RTL, path);
+ MarkChanges(2, hwndDlg);
+ }
+ break;
+ case IDC_MODE_COMPATIBLE:
+ case IDC_MODE_CSS:
+ case IDC_MODE_TEMPLATE:
+ UpdateControlsState(hwndDlg);
MarkChanges(2, hwndDlg);
+ break;
}
- break;
+ }
+ break;
+ case UM_CHECKSTATECHANGE:
+ {
+ ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM)lParam);
+ if (proto != NULL)
+ if (strcmpi(proto->getProtocolName(), "_default_"))
+ proto->setSRMMEnableTemp(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM)lParam));
+
+ if ((HTREEITEM)lParam != TreeView_GetSelection((HWND)wParam))
+ TreeView_SelectItem((HWND)wParam, (HTREEITEM)lParam);
+ else
+ UpdateSRMMProtoInfo(hwndDlg, proto);
+
+ MarkChanges(2, hwndDlg);
+ }
+ break;
case WM_NOTIFY:
if (((LPNMHDR)lParam)->idFrom == IDC_PROTOLIST) {
switch (((LPNMHDR)lParam)->code) {
case NM_CLICK:
- {
- TVHITTESTINFO ht = {0};
- DWORD dwpos = GetMessagePos();
- POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
- MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
- TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
- if (TVHT_ONITEMSTATEICON & ht.flags) {
- PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom, (LPARAM)ht.hItem);
- return FALSE;
- }
+ {
+ TVHITTESTINFO ht = { 0 };
+ DWORD dwpos = GetMessagePos();
+ POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
+ MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
+ TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
+ if (TVHT_ONITEMSTATEICON & ht.flags) {
+ PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom, (LPARAM)ht.hItem);
+ return FALSE;
}
- break;
+ }
+ break;
case TVN_KEYDOWN:
- if (((LPNMTVKEYDOWN) lParam)->wVKey == VK_SPACE)
+ if (((LPNMTVKEYDOWN)lParam)->wVKey == VK_SPACE)
PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom,
(LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom));
break;
case TVN_SELCHANGEDA:
case TVN_SELCHANGEDW:
- {
- ProtocolSettings *proto = (ProtocolSettings *)GetItemParam(GetDlgItem(hwndDlg, IDC_PROTOLIST), (HTREEITEM) NULL);
- SaveSRMMProtoSettings(hwndDlg, srmmCurrentProtoItem);
- UpdateSRMMProtoInfo(hwndDlg, proto);
- }
- break;
+ {
+ ProtocolSettings *proto = (ProtocolSettings *)GetItemParam(GetDlgItem(hwndDlg, IDC_PROTOLIST), (HTREEITEM)NULL);
+ SaveSRMMProtoSettings(hwndDlg, srmmCurrentProtoItem);
+ UpdateSRMMProtoInfo(hwndDlg, proto);
+ }
+ break;
}
break;
}
- switch (((LPNMHDR) lParam)->code) {
+ switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
SaveSRMMProtoSettings(hwndDlg, srmmCurrentProtoItem);
ApplyChanges(2);
@@ -711,7 +724,7 @@ static INT_PTR CALLBACK IEViewHistoryOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w case IDC_EXTERNALCSS_FILENAME:
case IDC_EXTERNALCSS_FILENAME_RTL:
case IDC_TEMPLATES_FILENAME:
- if ((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE)
+ if ((HWND)lParam == GetFocus() && HIWORD(wParam) == EN_CHANGE)
MarkChanges(4, hwndDlg);
break;
case IDC_SCROLL_BACKGROUND_IMAGE:
@@ -742,7 +755,7 @@ static INT_PTR CALLBACK IEViewHistoryOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w case IDC_BROWSE_BACKGROUND_IMAGE:
mir_snprintf(filter, SIZEOF(filter), "%s (*.jpg,*.gif,*.png,*.bmp)%c*.ivt%c%s%c*.*%c%c", Translate("All Images"), 0, 0, Translate("All Files"), 0, 0, 0);
if (BrowseFile(hwndDlg, filter, "jpg", path, SIZEOF(path))) {
- SetDlgItemTextA(hwndDlg,IDC_BACKGROUND_IMAGE_FILENAME,path);
+ SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, path);
MarkChanges(4, hwndDlg);
}
break;
@@ -770,54 +783,54 @@ static INT_PTR CALLBACK IEViewHistoryOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w break;
case UM_CHECKSTATECHANGE:
- {
- ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM) lParam);
- if (proto != NULL)
- if (strcmpi(proto->getProtocolName(), "_default_"))
- proto->setHistoryEnableTemp(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM) lParam));
-
- if ((HTREEITEM) lParam != TreeView_GetSelection((HWND)wParam))
- TreeView_SelectItem((HWND)wParam, (HTREEITEM) lParam);
- else
- UpdateHistoryProtoInfo(hwndDlg, proto);
-
- MarkChanges(4, hwndDlg);
- }
- break;
+ {
+ ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM)lParam);
+ if (proto != NULL)
+ if (strcmpi(proto->getProtocolName(), "_default_"))
+ proto->setHistoryEnableTemp(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM)lParam));
+
+ if ((HTREEITEM)lParam != TreeView_GetSelection((HWND)wParam))
+ TreeView_SelectItem((HWND)wParam, (HTREEITEM)lParam);
+ else
+ UpdateHistoryProtoInfo(hwndDlg, proto);
+
+ MarkChanges(4, hwndDlg);
+ }
+ break;
case WM_NOTIFY:
if (((LPNMHDR)lParam)->idFrom == IDC_PROTOLIST) {
switch (((LPNMHDR)lParam)->code) {
- case NM_CLICK:
- {
- TVHITTESTINFO ht = {0};
- DWORD dwpos = GetMessagePos();
- POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
- MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
- TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
- if (TVHT_ONITEMSTATEICON & ht.flags) {
- PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom, (LPARAM)ht.hItem);
- return FALSE;
- }
- }
- break;
- case TVN_KEYDOWN:
- if (((LPNMTVKEYDOWN) lParam)->wVKey == VK_SPACE)
- PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom,
- (LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom));
- break;
- case TVN_SELCHANGEDA:
- case TVN_SELCHANGEDW:
- {
- ProtocolSettings *proto = (ProtocolSettings *)GetItemParam(GetDlgItem(hwndDlg, IDC_PROTOLIST), (HTREEITEM) NULL);
- SaveHistoryProtoSettings(hwndDlg, historyCurrentProtoItem);
- UpdateHistoryProtoInfo(hwndDlg, proto);
- }
- break;
+ case NM_CLICK:
+ {
+ TVHITTESTINFO ht = { 0 };
+ DWORD dwpos = GetMessagePos();
+ POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
+ MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
+ TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
+ if (TVHT_ONITEMSTATEICON & ht.flags) {
+ PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom, (LPARAM)ht.hItem);
+ return FALSE;
+ }
+ }
+ break;
+ case TVN_KEYDOWN:
+ if (((LPNMTVKEYDOWN)lParam)->wVKey == VK_SPACE)
+ PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom,
+ (LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom));
+ break;
+ case TVN_SELCHANGEDA:
+ case TVN_SELCHANGEDW:
+ {
+ ProtocolSettings *proto = (ProtocolSettings *)GetItemParam(GetDlgItem(hwndDlg, IDC_PROTOLIST), (HTREEITEM)NULL);
+ SaveHistoryProtoSettings(hwndDlg, historyCurrentProtoItem);
+ UpdateHistoryProtoInfo(hwndDlg, proto);
+ }
+ break;
}
break;
}
- switch (((LPNMHDR) lParam)->code) {
+ switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
SaveHistoryProtoSettings(hwndDlg, historyCurrentProtoItem);
ApplyChanges(4);
@@ -846,7 +859,7 @@ static INT_PTR CALLBACK IEViewGroupChatsOptDlgProc(HWND hwndDlg, UINT msg, WPARA case IDC_EXTERNALCSS_FILENAME:
case IDC_EXTERNALCSS_FILENAME_RTL:
case IDC_TEMPLATES_FILENAME:
- if ((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE)
+ if ((HWND)lParam == GetFocus() && HIWORD(wParam) == EN_CHANGE)
MarkChanges(8, hwndDlg);
break;
case IDC_SCROLL_BACKGROUND_IMAGE:
@@ -877,7 +890,7 @@ static INT_PTR CALLBACK IEViewGroupChatsOptDlgProc(HWND hwndDlg, UINT msg, WPARA case IDC_BROWSE_BACKGROUND_IMAGE:
mir_snprintf(filter, SIZEOF(filter), "%s (*.jpg,*.gif,*.png,*.bmp)%c*.ivt%c%s%c*.*%c%c", Translate("All Images"), 0, 0, Translate("All Files"), 0, 0, 0);
if (BrowseFile(hwndDlg, filter, "jpg", path, SIZEOF(path))) {
- SetDlgItemTextA(hwndDlg,IDC_BACKGROUND_IMAGE_FILENAME,path);
+ SetDlgItemTextA(hwndDlg, IDC_BACKGROUND_IMAGE_FILENAME, path);
MarkChanges(8, hwndDlg);
}
break;
@@ -905,53 +918,54 @@ static INT_PTR CALLBACK IEViewGroupChatsOptDlgProc(HWND hwndDlg, UINT msg, WPARA break;
case UM_CHECKSTATECHANGE:
- {
- ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM) lParam);
- if (proto != NULL)
- if (strcmpi(proto->getProtocolName(), "_default_"))
- proto->setChatEnableTemp(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM) lParam));
-
- if ((HTREEITEM) lParam != TreeView_GetSelection((HWND)wParam)) {
- TreeView_SelectItem((HWND)wParam, (HTREEITEM) lParam);
- } else {
- UpdateChatProtoInfo(hwndDlg, proto);
- }
- MarkChanges(8, hwndDlg);
+ {
+ ProtocolSettings *proto = (ProtocolSettings *)GetItemParam((HWND)wParam, (HTREEITEM)lParam);
+ if (proto != NULL)
+ if (strcmpi(proto->getProtocolName(), "_default_"))
+ proto->setChatEnableTemp(0 != TreeView_GetCheckState((HWND)wParam, (HTREEITEM)lParam));
+
+ if ((HTREEITEM)lParam != TreeView_GetSelection((HWND)wParam)) {
+ TreeView_SelectItem((HWND)wParam, (HTREEITEM)lParam);
}
- break;
+ else {
+ UpdateChatProtoInfo(hwndDlg, proto);
+ }
+ MarkChanges(8, hwndDlg);
+ }
+ break;
case WM_NOTIFY:
if (((LPNMHDR)lParam)->idFrom == IDC_PROTOLIST) {
switch (((LPNMHDR)lParam)->code) {
- case NM_CLICK:
- {
- TVHITTESTINFO ht = {0};
- DWORD dwpos = GetMessagePos();
- POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
- MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
- TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
- if (TVHT_ONITEMSTATEICON & ht.flags) {
- PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom, (LPARAM)ht.hItem);
- return FALSE;
- }
- }
- break;
- case TVN_KEYDOWN:
- if (((LPNMTVKEYDOWN) lParam)->wVKey == VK_SPACE)
- PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom,
- (LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom));
- break;
- case TVN_SELCHANGEDA:
- case TVN_SELCHANGEDW:
- {
- ProtocolSettings *proto = (ProtocolSettings *)GetItemParam(GetDlgItem(hwndDlg, IDC_PROTOLIST), (HTREEITEM) NULL);
- SaveChatProtoSettings(hwndDlg, chatCurrentProtoItem);
- UpdateChatProtoInfo(hwndDlg, proto);
- }
- break;
+ case NM_CLICK:
+ {
+ TVHITTESTINFO ht = { 0 };
+ DWORD dwpos = GetMessagePos();
+ POINTSTOPOINT(ht.pt, MAKEPOINTS(dwpos));
+ MapWindowPoints(HWND_DESKTOP, ((LPNMHDR)lParam)->hwndFrom, &ht.pt, 1);
+ TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &ht);
+ if (TVHT_ONITEMSTATEICON & ht.flags) {
+ PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom, (LPARAM)ht.hItem);
+ return FALSE;
+ }
+ }
+ break;
+ case TVN_KEYDOWN:
+ if (((LPNMTVKEYDOWN)lParam)->wVKey == VK_SPACE)
+ PostMessage(hwndDlg, UM_CHECKSTATECHANGE, (WPARAM)((LPNMHDR)lParam)->hwndFrom,
+ (LPARAM)TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom));
+ break;
+ case TVN_SELCHANGEDA:
+ case TVN_SELCHANGEDW:
+ {
+ ProtocolSettings *proto = (ProtocolSettings *)GetItemParam(GetDlgItem(hwndDlg, IDC_PROTOLIST), (HTREEITEM)NULL);
+ SaveChatProtoSettings(hwndDlg, chatCurrentProtoItem);
+ UpdateChatProtoInfo(hwndDlg, proto);
+ }
+ break;
}
break;
}
- switch (((LPNMHDR) lParam)->code) {
+ switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
SaveChatProtoSettings(hwndDlg, chatCurrentProtoItem);
ApplyChanges(8);
@@ -1475,7 +1489,7 @@ void Options::init() PROTOACCOUNT **pProtos;
ProtocolSettings *lastProto = NULL;
ProtoEnumAccounts(&protoCount, &pProtos);
- for (int i = 0; i < protoCount+1; i++) {
+ for (int i = 0; i < protoCount + 1; i++) {
ProtocolSettings *proto;
char tmpPath[MAX_PATH];
char dbsName[256];
@@ -1483,7 +1497,7 @@ void Options::init() proto = new ProtocolSettings("_default_");
proto->setSRMMEnable(true);
}
- else if (strcmp(pProtos[i-1]->szModuleName, META_PROTO)) {
+ else if (strcmp(pProtos[i - 1]->szModuleName, META_PROTO)) {
if ((CallProtoService(pProtos[i - 1]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) == 0)
continue;
@@ -1493,31 +1507,31 @@ void Options::init() /* SRMM settings */
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_ENABLE);
- proto->setSRMMEnable(i==0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
+ proto->setSRMMEnable(i == 0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_MODE);
proto->setSRMMMode(db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_FLAGS);
proto->setSRMMFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
- if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if ( strncmp(tmpPath, "http://", 7))
+ if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setSRMMBackgroundFilename(tmpPath);
db_free(&dbv);
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
- if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if ( strncmp(tmpPath, "http://", 7))
+ if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setSRMMCssFilename(tmpPath);
db_free(&dbv);
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
- if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setSRMMTemplateFilename(tmpPath);
@@ -1526,31 +1540,31 @@ void Options::init() /* Group chat settings */
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_ENABLE);
- proto->setChatEnable(i==0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
+ proto->setChatEnable(i == 0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_MODE);
proto->setChatMode(db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_FLAGS);
proto->setChatFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
- if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if ( strncmp(tmpPath, "http://", 7))
+ if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setChatBackgroundFilename(tmpPath);
db_free(&dbv);
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
- if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if ( strncmp(tmpPath, "http://", 7))
+ if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setChatCssFilename(tmpPath);
db_free(&dbv);
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
- if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setChatTemplateFilename(tmpPath);
@@ -1559,31 +1573,31 @@ void Options::init() /* History settings */
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_ENABLE);
- proto->setHistoryEnable(i==0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
+ proto->setHistoryEnable(i == 0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_MODE);
proto->setHistoryMode(db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_FLAGS);
proto->setHistoryFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
- if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if ( strncmp(tmpPath, "http://", 7))
+ if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryBackgroundFilename(tmpPath);
db_free(&dbv);
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
- if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
- if ( strncmp(tmpPath, "http://", 7))
+ if (strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryCssFilename(tmpPath);
db_free(&dbv);
}
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
- if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryTemplateFilename(tmpPath);
@@ -1592,7 +1606,8 @@ void Options::init() proto->copyToTemp();
if (lastProto != NULL) {
lastProto->setNext(proto);
- } else {
+ }
+ else {
protocolList = proto;
}
lastProto = proto;
@@ -1607,7 +1622,7 @@ void Options::init() void Options::uninit()
{
ProtocolSettings *p, *p1;
- for (p = protocolList; p != NULL; p = p1 ) {
+ for (p = protocolList; p != NULL; p = p1) {
p1 = p->getNext();
delete p;
}
@@ -1621,7 +1636,7 @@ void Options::uninit() void Options::setGeneralFlags(int flags)
{
generalFlags = flags;
- db_set_dw(NULL, ieviewModuleName, DBS_BASICFLAGS, (DWORD) flags);
+ db_set_dw(NULL, ieviewModuleName, DBS_BASICFLAGS, (DWORD)flags);
}
int Options::getGeneralFlags()
@@ -1631,7 +1646,7 @@ int Options::getGeneralFlags() void Options::setEmbedsize(int size)
{
- db_set_dw(NULL, ieviewModuleName, "Embedsize", (DWORD) size);
+ db_set_dw(NULL, ieviewModuleName, "Embedsize", (DWORD)size);
}
int Options::getEmbedsize()
@@ -1665,14 +1680,14 @@ ProtocolSettings * Options::getProtocolSettings(const char *protocolName) void Options::resetProtocolSettings()
{
- for (ProtocolSettings *proto=Options::getProtocolSettings();proto!=NULL;proto=proto->getNext())
+ for (ProtocolSettings *proto = Options::getProtocolSettings(); proto != NULL; proto = proto->getNext())
proto->copyToTemp();
}
void Options::saveProtocolSettings()
{
ProtocolSettings *proto = Options::getProtocolSettings();
- for (int i = 0; proto != NULL; proto = proto->getNext(),i++) {
+ for (int i = 0; proto != NULL; proto = proto->getNext(), i++) {
char dbsName[256];
char tmpPath[MAX_PATH];
proto->copyFromTemp();
@@ -1689,12 +1704,12 @@ void Options::saveProtocolSettings() db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
- strcpy (tmpPath, proto->getSRMMCssFilename());
+ strcpy(tmpPath, proto->getSRMMCssFilename());
PathToRelative(proto->getSRMMCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
- strcpy (tmpPath, proto->getSRMMTemplateFilename());
+ strcpy(tmpPath, proto->getSRMMTemplateFilename());
PathToRelative(proto->getSRMMTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
@@ -1706,17 +1721,17 @@ void Options::saveProtocolSettings() mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_FLAGS);
db_set_dw(NULL, ieviewModuleName, dbsName, proto->getChatFlags());
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
- strcpy (tmpPath, proto->getChatBackgroundFilename());
+ strcpy(tmpPath, proto->getChatBackgroundFilename());
PathToRelative(proto->getChatBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
- strcpy (tmpPath, proto->getChatCssFilename());
+ strcpy(tmpPath, proto->getChatCssFilename());
PathToRelative(proto->getChatCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
- strcpy (tmpPath, proto->getChatTemplateFilename());
+ strcpy(tmpPath, proto->getChatTemplateFilename());
PathToRelative(proto->getChatTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
@@ -1728,17 +1743,17 @@ void Options::saveProtocolSettings() mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_FLAGS);
db_set_dw(NULL, ieviewModuleName, dbsName, proto->getHistoryFlags());
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
- strcpy (tmpPath, proto->getHistoryBackgroundFilename());
+ strcpy(tmpPath, proto->getHistoryBackgroundFilename());
PathToRelative(proto->getHistoryBackgroundFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
- strcpy (tmpPath, proto->getHistoryCssFilename());
+ strcpy(tmpPath, proto->getHistoryCssFilename());
PathToRelative(proto->getHistoryCssFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
- strcpy (tmpPath, proto->getHistoryTemplateFilename());
+ strcpy(tmpPath, proto->getHistoryTemplateFilename());
PathToRelative(proto->getHistoryTemplateFilename(), tmpPath);
db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
}
diff --git a/plugins/IEView/src/Options.h b/plugins/IEView/src/Options.h index e6a2bec535..d0420cdc5f 100644 --- a/plugins/IEView/src/Options.h +++ b/plugins/IEView/src/Options.h @@ -193,8 +193,8 @@ public: class Options {
private:
- static int generalFlags;
- static bool isInited;
+ static int generalFlags;
+ static bool isInited;
static bool bSmileyAdd;
static int avatarServiceFlags;
static ProtocolSettings* protocolList;
@@ -205,26 +205,26 @@ public: MODE_TEMPLATE = 2
};
enum OPTIONS {
- GENERAL_ENABLE_BBCODES = 0x000001,
- GENERAL_ENABLE_FLASH = 0x000004,
- GENERAL_SMILEYINNAMES = 0x000010,
- GENERAL_NO_BORDER = 0x000020,
- GENERAL_ENABLE_EMBED = 0x000040,
-
- LOG_SHOW_NICKNAMES = 0x000100,
- LOG_SHOW_TIME = 0x000200,
- LOG_SHOW_DATE = 0x000400,
- LOG_SHOW_SECONDS = 0x000800,
- LOG_LONG_DATE = 0x001000,
- LOG_RELATIVE_DATE = 0x002000,
- LOG_GROUP_MESSAGES = 0x004000,
-
- LOG_IMAGE_ENABLED = 0x010000,
- LOG_IMAGE_SCROLL = 0x020000
+ GENERAL_ENABLE_BBCODES = 0x000001,
+ GENERAL_ENABLE_FLASH = 0x000004,
+ GENERAL_SMILEYINNAMES = 0x000010,
+ GENERAL_NO_BORDER = 0x000020,
+ GENERAL_ENABLE_EMBED = 0x000040,
+
+ LOG_SHOW_NICKNAMES = 0x000100,
+ LOG_SHOW_TIME = 0x000200,
+ LOG_SHOW_DATE = 0x000400,
+ LOG_SHOW_SECONDS = 0x000800,
+ LOG_LONG_DATE = 0x001000,
+ LOG_RELATIVE_DATE = 0x002000,
+ LOG_GROUP_MESSAGES = 0x004000,
+
+ LOG_IMAGE_ENABLED = 0x010000,
+ LOG_IMAGE_SCROLL = 0x020000
};
enum AVATARSERVICEFLAGS {
- AVATARSERVICE_PRESENT = 0x0001,
+ AVATARSERVICE_PRESENT = 0x0001,
};
static void setGeneralFlags(int flags);
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp index bc42feb127..e15d709236 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.cpp +++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp @@ -93,7 +93,7 @@ void ScriverHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour) }
if (lf) {
mir_snprintf(str, SIZEOF(str), "SRMFont%dSize", i);
- lf->lfHeight = (char) db_get_b(NULL, SRMMMOD, str, 10);
+ lf->lfHeight = (char)db_get_b(NULL, SRMMMOD, str, 10);
lf->lfHeight = abs(lf->lfHeight);
lf->lfWidth = 0;
lf->lfEscapement = 0;
@@ -143,18 +143,20 @@ char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mod tm_today.tm_hour = tm_today.tm_min = tm_today.tm_sec = 0;
today = mktime(&tm_today);
- if(dwFlags & SMF_LOG_USERELATIVEDATE && check >= today) {
+ if (dwFlags & SMF_LOG_USERELATIVEDATE && check >= today) {
strcpy(szResult, Translate("Today"));
if (mode == 0) {
strcat(szResult, ",");
}
- } else if(dwFlags & SMF_LOG_USERELATIVEDATE && check > (today - 86400)) {
+ }
+ else if (dwFlags & SMF_LOG_USERELATIVEDATE && check > (today - 86400)) {
strcpy(szResult, Translate("Yesterday"));
if (mode == 0) {
strcat(szResult, ",");
}
- } else {
- if(dwFlags & SMF_LOG_USELONGDATE)
+ }
+ else {
+ if (dwFlags & SMF_LOG_USELONGDATE)
strcpy(format, "D");
else
strcpy(format, "d");
@@ -167,8 +169,8 @@ char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mod strcat(format, (dwFlags & SMF_LOG_SHOWSECONDS) ? "s" : "t");
}
if (format[0] != '\0') {
-// CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, check, (LPARAM) & dbtts);
- CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM) & dbtts);
+ // CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, check, (LPARAM) & dbtts);
+ CallService(MS_DB_TIME_TIMESTAMPTOSTRING, check, (LPARAM)& dbtts);
//_tcsncat(szResult, str, 500);
strncat(szResult, str, 500);
}
@@ -186,18 +188,20 @@ void ScriverHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) if (protoSettings == NULL) {
return;
}
- if (protoSettings->getSRMMMode() == Options::MODE_TEMPLATE) {
+ if (protoSettings->getSRMMMode() == Options::MODE_TEMPLATE) {
buildHeadTemplate(view, event, protoSettings);
return;
}
- if (protoSettings->getSRMMMode() == Options::MODE_CSS) {
- const char *externalCSS = protoSettings->getSRMMCssFilename();
+ if (protoSettings->getSRMMMode() == Options::MODE_CSS) {
+ const char *externalCSS = protoSettings->getSRMMCssFilename();
if (strncmp(externalCSS, "http://", 7)) {
Utils::appendText(&output, &outputSize, "<html><head><link rel=\"stylesheet\" href=\"file://%s\"/></head><body class=\"body\">\n", externalCSS);
- } else {
+ }
+ else {
Utils::appendText(&output, &outputSize, "<html><head><link rel=\"stylesheet\" href=\"%s\"/></head><body class=\"body\">\n", externalCSS);
}
- } else {
+ }
+ else {
HDC hdc = GetDC(NULL);
int logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(NULL, hdc);
@@ -207,55 +211,57 @@ void ScriverHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) COLORREF inColor = db_get_dw(NULL, SRMMMOD, "IncomingBkgColour", 0xFFFFFF);
COLORREF outColor = db_get_dw(NULL, SRMMMOD, "OutgoingBkgColour", 0xFFFFFF);
COLORREF lineColor = db_get_dw(NULL, SRMMMOD, "LineColour", 0xFFFFFF);
- bkgColor= (((bkgColor & 0xFF) << 16) | (bkgColor & 0xFF00) | ((bkgColor & 0xFF0000) >> 16));
- inColor= (((inColor & 0xFF) << 16) | (inColor & 0xFF00) | ((inColor & 0xFF0000) >> 16));
- outColor= (((outColor & 0xFF) << 16) | (outColor & 0xFF00) | ((outColor & 0xFF0000) >> 16));
- lineColor= (((lineColor & 0xFF) << 16) | (lineColor & 0xFF00) | ((lineColor & 0xFF0000) >> 16));
+ bkgColor = (((bkgColor & 0xFF) << 16) | (bkgColor & 0xFF00) | ((bkgColor & 0xFF0000) >> 16));
+ inColor = (((inColor & 0xFF) << 16) | (inColor & 0xFF00) | ((inColor & 0xFF0000) >> 16));
+ outColor = (((outColor & 0xFF) << 16) | (outColor & 0xFF00) | ((outColor & 0xFF0000) >> 16));
+ lineColor = (((lineColor & 0xFF) << 16) | (lineColor & 0xFF00) | ((lineColor & 0xFF0000) >> 16));
if (protoSettings->getSRMMFlags() & Options::LOG_IMAGE_ENABLED) {
Utils::appendText(&output, &outputSize, ".body {padding: 2px; text-align: left; background-attachment: %s; background-color: #%06X; background-image: url('%s'); overflow: auto;}\n",
- protoSettings->getSRMMFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int) bkgColor, protoSettings->getSRMMBackgroundFilename());
- } else {
+ protoSettings->getSRMMFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int)bkgColor, protoSettings->getSRMMBackgroundFilename());
+ }
+ else {
Utils::appendText(&output, &outputSize, ".body {margin: 0px; text-align: left; background-color: #%06X; overflow: auto;}\n",
- (int) bkgColor);
+ (int)bkgColor);
}
Utils::appendText(&output, &outputSize, ".link {color: #0000FF; text-decoration: underline;}\n");
Utils::appendText(&output, &outputSize, ".img {}\n");
if (protoSettings->getSRMMFlags() & Options::LOG_IMAGE_ENABLED) {
Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
- Utils::appendText(&output, &outputSize, ".divInGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) lineColor);
- Utils::appendText(&output, &outputSize, ".divOutGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) lineColor);
+ Utils::appendText(&output, &outputSize, ".divInGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)lineColor);
+ Utils::appendText(&output, &outputSize, ".divOutGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)lineColor);
Utils::appendText(&output, &outputSize, ".divInRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
Utils::appendText(&output, &outputSize, ".divOutRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
- Utils::appendText(&output, &outputSize, ".divInGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) lineColor);
- Utils::appendText(&output, &outputSize, ".divOutGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) lineColor);
- } else {
- Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) inColor);
- Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) outColor);
+ Utils::appendText(&output, &outputSize, ".divInGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)lineColor);
+ Utils::appendText(&output, &outputSize, ".divOutGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)lineColor);
+ }
+ else {
+ Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)inColor);
+ Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)outColor);
Utils::appendText(&output, &outputSize, ".divInGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; background-color: #%06X;}\n",
- (int) lineColor, (int) inColor);
+ (int)lineColor, (int)inColor);
Utils::appendText(&output, &outputSize, ".divOutGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; background-color: #%06X;}\n",
- (int) lineColor, (int) outColor);
- Utils::appendText(&output, &outputSize, ".divInRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) inColor);
- Utils::appendText(&output, &outputSize, ".divOutRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) outColor);
+ (int)lineColor, (int)outColor);
+ Utils::appendText(&output, &outputSize, ".divInRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)inColor);
+ Utils::appendText(&output, &outputSize, ".divOutRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)outColor);
Utils::appendText(&output, &outputSize, ".divInGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; background-color: #%06X;}\n",
- (int) lineColor, (int) inColor);
+ (int)lineColor, (int)inColor);
Utils::appendText(&output, &outputSize, ".divOutGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; background-color: #%06X;}\n",
- (int) lineColor, (int) outColor);
+ (int)lineColor, (int)outColor);
}
Utils::appendText(&output, &outputSize, ".divNotice {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
- Utils::appendText(&output, &outputSize, ".divNoticeGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) lineColor);
+ Utils::appendText(&output, &outputSize, ".divNoticeGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)lineColor);
Utils::appendText(&output, &outputSize, ".divNoticeRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
- Utils::appendText(&output, &outputSize, ".divNoticeGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) lineColor);
- for(int i = 0; i < FONT_NUM; i++) {
+ Utils::appendText(&output, &outputSize, ".divNoticeGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)lineColor);
+ for (int i = 0; i < FONT_NUM; i++) {
loadMsgDlgFont(i, &lf, &color);
Utils::appendText(&output, &outputSize, "%s {font-family: %s; font-size: %dpt; font-weight: %s; color: #%06X; %s }\n",
- classNames[i],
- lf.lfFaceName,
- abs((signed char)lf.lfHeight) * 74 /logPixelSY ,
- lf.lfWeight >= FW_BOLD ? "bold" : "normal",
- (int)(((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16)),
- lf.lfItalic ? "font-style: italic;" : "");
+ classNames[i],
+ lf.lfFaceName,
+ abs((signed char)lf.lfHeight) * 74 / logPixelSY,
+ lf.lfWeight >= FW_BOLD ? "bold" : "normal",
+ (int)(((color & 0xFF) << 16) | (color & 0xFF00) | ((color & 0xFF0000) >> 16)),
+ lf.lfItalic ? "font-style: italic;" : "");
}
Utils::appendText(&output, &outputSize, "</style></head><body class=\"body\">\n");
}
@@ -282,9 +288,9 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event dwFlags |= db_get_b(NULL, SRMMMOD, SRMSGSET_MESSAGEONNEWLINE, 0) ? SMF_LOG_MSGONNEWLINE : 0;
dwFlags |= db_get_b(NULL, SRMMMOD, SRMSGSET_DRAWLINES, 0) ? SMF_LOG_DRAWLINES : 0;
- ptrA szRealProto( getRealProto(event->hContact));
+ ptrA szRealProto(getRealProto(event->hContact));
IEVIEWEVENTDATA* eventData = event->eventData;
- for (int eventIdx = 0; eventData!=NULL && (eventIdx < event->count || event->count==-1); eventData = eventData->next, eventIdx++) {
+ for (int eventIdx = 0; eventData != NULL && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) {
const char *className = "";
int outputSize;
char *output;
@@ -293,13 +299,13 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event bool isRTL = (eventData->dwFlags & IEEDF_RTL) != 0;
showColon = false;
if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_STATUSCHANGE ||
- eventData->iType == IEED_EVENT_URL || eventData->iType == IEED_EVENT_FILE)
+ eventData->iType == IEED_EVENT_URL || eventData->iType == IEED_EVENT_FILE)
{
int isGroupBreak = TRUE;
- if ((dwFlags & SMF_LOG_GROUPMESSAGES) && eventData->dwFlags == LOWORD(getLastEventType()) &&
- eventData->iType == IEED_EVENT_MESSAGE && HIWORD(getLastEventType()) == IEED_EVENT_MESSAGE &&
- (isSameDate(eventData->time, getLastEventTime())) &&
- (((eventData->time < startedTime) == (getLastEventTime() < startedTime)) || !(eventData->dwFlags & IEEDF_READ))) {
+ if ((dwFlags & SMF_LOG_GROUPMESSAGES) && eventData->dwFlags == LOWORD(getLastEventType()) &&
+ eventData->iType == IEED_EVENT_MESSAGE && HIWORD(getLastEventType()) == IEED_EVENT_MESSAGE &&
+ (isSameDate(eventData->time, getLastEventTime())) &&
+ (((eventData->time < startedTime) == (getLastEventTime() < startedTime)) || !(eventData->dwFlags & IEEDF_READ))) {
isGroupBreak = FALSE;
}
ptrA szName, szText;
@@ -347,7 +353,7 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event char* timestampString = NULL;
if (dwFlags & SMF_LOG_GROUPMESSAGES) {
if (isGroupBreak) {
- if (!(dwFlags & SMF_LOG_MARKFOLLOWUPS))
+ if (!(dwFlags & SMF_LOG_MARKFOLLOWUPS))
timestampString = timestampToString(dwFlags, eventData->time, 0);
else if (dwFlags & SMF_LOG_SHOWDATE)
timestampString = timestampToString(dwFlags, eventData->time, 1);
@@ -359,22 +365,22 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event if (timestampString != NULL)
Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s</span>",
- isSent ? "timeOut" : "timeIn", timestampString);
+ isSent ? "timeOut" : "timeIn", timestampString);
if (eventData->iType != IEED_EVENT_MESSAGE)
Utils::appendText(&output, &outputSize, "<span class=\"%s\">: </span>",
- isSent ? "colonOut" : "colonIn");
+ isSent ? "colonOut" : "colonIn");
showColon = true;
}
- if ((dwFlags & SMF_LOG_SHOWNICK && eventData->iType == IEED_EVENT_MESSAGE && isGroupBreak) || eventData->iType == IEED_EVENT_STATUSCHANGE ) {
+ if ((dwFlags & SMF_LOG_SHOWNICK && eventData->iType == IEED_EVENT_MESSAGE && isGroupBreak) || eventData->iType == IEED_EVENT_STATUSCHANGE) {
if (eventData->iType == IEED_EVENT_MESSAGE) {
if (showColon)
Utils::appendText(&output, &outputSize, "<span class=\"%s\"> %s</span>",
- isSent ? "nameOut" : "nameIn", szName);
+ isSent ? "nameOut" : "nameIn", szName);
else
Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s</span>",
- isSent ? "nameOut" : "nameIn", szName);
+ isSent ? "nameOut" : "nameIn", szName);
showColon = true;
if (dwFlags & SMF_LOG_GROUPMESSAGES) {
@@ -387,13 +393,13 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event if (dwFlags & SMF_LOG_SHOWTIME && dwFlags & SMF_LOG_GROUPMESSAGES && dwFlags & SMF_LOG_MARKFOLLOWUPS
&& eventData->iType == IEED_EVENT_MESSAGE && isGroupBreak) {
Utils::appendText(&output, &outputSize, "<span class=\"%s\">%s</span>",
- isSent ? "timeOut" : "timeIn",
- timestampToString(dwFlags, eventData->time, 2));
+ isSent ? "timeOut" : "timeIn",
+ timestampToString(dwFlags, eventData->time, 2));
showColon = true;
}
if (showColon && eventData->iType == IEED_EVENT_MESSAGE)
Utils::appendText(&output, &outputSize, "<span class=\"%s\">: </span>",
- isSent ? "colonOut" : "colonIn");
+ isSent ? "colonOut" : "colonIn");
if (eventData->iType == IEED_EVENT_MESSAGE) {
if (dwFlags & SMF_LOG_MSGONNEWLINE && showColon)
@@ -435,7 +441,7 @@ void ScriverHTMLBuilder::appendEvent(IEView *view, IEVIEWEVENT *event) if (protoSettings == NULL)
return;
- if (protoSettings->getSRMMMode() == Options::MODE_TEMPLATE)
+ if (protoSettings->getSRMMMode() == Options::MODE_TEMPLATE)
appendEventTemplate(view, event, protoSettings);
else
appendEventNonTemplate(view, event);
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.h b/plugins/IEView/src/ScriverHTMLBuilder.h index 6652cedafe..2d3a8bca51 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.h +++ b/plugins/IEView/src/ScriverHTMLBuilder.h @@ -25,7 +25,7 @@ class ScriverHTMLBuilder; #include "TemplateHTMLBuilder.h"
-class ScriverHTMLBuilder:public TemplateHTMLBuilder
+class ScriverHTMLBuilder :public TemplateHTMLBuilder
{
protected:
void loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour);
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp index 2a87dc18f2..d574d6b034 100644 --- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp +++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp @@ -210,12 +210,12 @@ void TabSRMMHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) if (protoSettings == NULL)
return;
- if (protoSettings->getSRMMMode() == Options::MODE_TEMPLATE) {
+ if (protoSettings->getSRMMMode() == Options::MODE_TEMPLATE) {
buildHeadTemplate(view, event, protoSettings);
return;
}
- if (protoSettings->getSRMMMode() == Options::MODE_CSS) {
- const char *externalCSS = protoSettings->getSRMMCssFilename();
+ if (protoSettings->getSRMMMode() == Options::MODE_CSS) {
+ const char *externalCSS = protoSettings->getSRMMCssFilename();
if (strncmp(externalCSS, "http://", 7))
Utils::appendText(&output, &outputSize, "<html><head><link rel=\"stylesheet\" href=\"file://%s\"/></head><body class=\"body\">\n", externalCSS);
else
@@ -225,24 +225,24 @@ void TabSRMMHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) HDC hdc = GetDC(NULL);
int logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
ReleaseDC(NULL, hdc);
- DWORD dwFlags = db_get_dw(NULL, SRMSGMOD_T, "mwflags", MWF_LOG_DEFAULT);
+ DWORD dwFlags = db_get_dw(NULL, SRMSGMOD_T, "mwflags", MWF_LOG_DEFAULT);
Utils::appendText(&output, &outputSize, "<html><head><style type=\"text/css\">\n");
COLORREF inColor, outColor;
COLORREF bkgColor = db_get_dw(NULL, TABSRMM_FONTMODULE, "BkgColour", 0xFFFFFF);
- bkgColor= (((bkgColor & 0xFF) << 16) | (bkgColor & 0xFF00) | ((bkgColor & 0xFF0000) >> 16));
+ bkgColor = (((bkgColor & 0xFF) << 16) | (bkgColor & 0xFF00) | ((bkgColor & 0xFF0000) >> 16));
COLORREF gridColor = db_get_dw(NULL, TABSRMM_FONTMODULE, "hgrid", 0xFFFFFF);
- gridColor= (((gridColor & 0xFF) << 16) | (gridColor & 0xFF00) | ((gridColor & 0xFF0000) >> 16));
+ gridColor = (((gridColor & 0xFF) << 16) | (gridColor & 0xFF00) | ((gridColor & 0xFF0000) >> 16));
if (dwFlags & MWF_LOG_INDIVIDUALBKG) {
- inColor = db_get_dw(NULL, TABSRMM_FONTMODULE, "inbg", RGB(224,224,224));
- outColor = db_get_dw(NULL, TABSRMM_FONTMODULE, "outbg", RGB(224,224,224));
- inColor= (((inColor & 0xFF) << 16) | (inColor & 0xFF00) | ((inColor & 0xFF0000) >> 16));
- outColor= (((outColor & 0xFF) << 16) | (outColor & 0xFF00) | ((outColor & 0xFF0000) >> 16));
+ inColor = db_get_dw(NULL, TABSRMM_FONTMODULE, "inbg", RGB(224, 224, 224));
+ outColor = db_get_dw(NULL, TABSRMM_FONTMODULE, "outbg", RGB(224, 224, 224));
+ inColor = (((inColor & 0xFF) << 16) | (inColor & 0xFF00) | ((inColor & 0xFF0000) >> 16));
+ outColor = (((outColor & 0xFF) << 16) | (outColor & 0xFF00) | ((outColor & 0xFF0000) >> 16));
}
else inColor = outColor = bkgColor;
if (protoSettings->getSRMMFlags() & Options::LOG_IMAGE_ENABLED) {
Utils::appendText(&output, &outputSize, ".body {margin: 0px; text-align: left; background-attachment: %s; background-color: #%06X; background-image: url('%s'); overflow: auto;}\n",
- protoSettings->getSRMMFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int) bkgColor, protoSettings->getSRMMBackgroundFilename());
+ protoSettings->getSRMMFlags() & Options::LOG_IMAGE_SCROLL ? "scroll" : "fixed", (int)bkgColor, protoSettings->getSRMMBackgroundFilename());
}
else Utils::appendText(&output, &outputSize, ".body {margin: 0px; text-align: left; background-color: #%06X; overflow: auto;}\n", (int)bkgColor);
@@ -251,26 +251,26 @@ void TabSRMMHTMLBuilder::buildHead(IEView *view, IEVIEWEVENT *event) if (protoSettings->getSRMMFlags() & Options::LOG_IMAGE_ENABLED) {
Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
- Utils::appendText(&output, &outputSize, ".divInGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) gridColor);
- Utils::appendText(&output, &outputSize, ".divOutGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) gridColor);
+ Utils::appendText(&output, &outputSize, ".divInGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)gridColor);
+ Utils::appendText(&output, &outputSize, ".divOutGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)gridColor);
Utils::appendText(&output, &outputSize, ".divInRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
Utils::appendText(&output, &outputSize, ".divOutRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word;}\n");
- Utils::appendText(&output, &outputSize, ".divInGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) gridColor);
- Utils::appendText(&output, &outputSize, ".divOutGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int) gridColor);
+ Utils::appendText(&output, &outputSize, ".divInGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)gridColor);
+ Utils::appendText(&output, &outputSize, ".divOutGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X}\n", (int)gridColor);
}
else {
Utils::appendText(&output, &outputSize, ".divIn {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)inColor);
- Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) outColor);
+ Utils::appendText(&output, &outputSize, ".divOut {padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)outColor);
Utils::appendText(&output, &outputSize, ".divInGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; background-color: #%06X;}\n",
- (int) gridColor, (int) inColor);
+ (int)gridColor, (int)inColor);
Utils::appendText(&output, &outputSize, ".divOutGrid {padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; background-color: #%06X;}\n",
- (int) gridColor, (int) outColor);
- Utils::appendText(&output, &outputSize, ".divInRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) inColor);
- Utils::appendText(&output, &outputSize, ".divOutRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int) outColor);
+ (int)gridColor, (int)outColor);
+ Utils::appendText(&output, &outputSize, ".divInRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)inColor);
+ Utils::appendText(&output, &outputSize, ".divOutRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; background-color: #%06X;}\n", (int)outColor);
Utils::appendText(&output, &outputSize, ".divInGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; background-color: #%06X;}\n",
- (int) gridColor, (int) inColor);
+ (int)gridColor, (int)inColor);
Utils::appendText(&output, &outputSize, ".divOutGridRTL {text-align: right; direction:RTL; unicode-bidi:embed; padding-left: 2px; padding-right: 2px; word-wrap: break-word; border-top: 1px solid #%06X; background-color: #%06X;}\n",
- (int) gridColor, (int) outColor);
+ (int)gridColor, (int)outColor);
}
for (int i = 0; i < FONT_NUM; i++) {
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.h b/plugins/IEView/src/TabSRMMHTMLBuilder.h index 5132851369..f707abe42d 100644 --- a/plugins/IEView/src/TabSRMMHTMLBuilder.h +++ b/plugins/IEView/src/TabSRMMHTMLBuilder.h @@ -25,7 +25,7 @@ class TabSRMMHTMLBuilder; #include "TemplateHTMLBuilder.h"
-class TabSRMMHTMLBuilder:public TemplateHTMLBuilder
+class TabSRMMHTMLBuilder :public TemplateHTMLBuilder
{
protected:
virtual void loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour);
diff --git a/plugins/IEView/src/Template.cpp b/plugins/IEView/src/Template.cpp index b1b078c4cd..8c9d8e7acb 100644 --- a/plugins/IEView/src/Template.cpp +++ b/plugins/IEView/src/Template.cpp @@ -90,7 +90,7 @@ Template::~Template() mir_free(name);
Token *ptr = tokens, *ptr2;
tokens = NULL;
- for (;ptr!=NULL;ptr = ptr2) {
+ for (; ptr != NULL; ptr = ptr2) {
ptr2 = ptr->getNext();
delete ptr;
}
@@ -171,18 +171,18 @@ void Template::tokenize() int lastTokenType = Token::PLAIN;
int lastTokenEscape = 0;
int l = (int)strlen(str);
- for (int i=0, lastTokenStart=0; i<=l;) {
+ for (int i = 0, lastTokenStart = 0; i <= l;) {
Token *newToken;
int newTokenType = 0, newTokenSize = 0, newTokenEscape = 0;
- if (str[i]=='\0') {
+ if (str[i] == '\0') {
newTokenType = Token::END;
newTokenSize = 1;
newTokenEscape = 0;
}
else {
bool found = false;
- for (unsigned int j=0; j<(sizeof(tokenNames)/sizeof(tokenNames[0])); j++) {
- if (!strncmp(str+i, tokenNames[j].tokenString, tokenNames[j].tokenLen)) {
+ for (unsigned int j = 0; j < (sizeof(tokenNames) / sizeof(tokenNames[0])); j++) {
+ if (!strncmp(str + i, tokenNames[j].tokenString, tokenNames[j].tokenLen)) {
newTokenType = tokenNames[j].token;
newTokenSize = tokenNames[j].tokenLen;
newTokenEscape = tokenNames[j].escape;
@@ -204,7 +204,7 @@ void Template::tokenize() }
if ((lastTokenType != newTokenType || lastTokenEscape != newTokenEscape) && i != lastTokenStart) {
if (lastTokenType == Token::PLAIN)
- newToken = new Token(lastTokenType, str+lastTokenStart, lastTokenEscape);
+ newToken = new Token(lastTokenType, str + lastTokenStart, lastTokenEscape);
else
newToken = new Token(lastTokenType, NULL, lastTokenEscape);
@@ -251,7 +251,7 @@ TemplateMap::~TemplateMap() TemplateMap* TemplateMap::add(const char *id, const char *filename)
{
TemplateMap *map;
- for (map=mapList; map!=NULL; map=map->next) {
+ for (map = mapList; map != NULL; map = map->next) {
if (!strcmp(map->name, id)) {
map->clear();
map->setFilename(filename);
@@ -277,7 +277,7 @@ void TemplateMap::clear() Template *ptr, *ptr2;
ptr = entries;
entries = NULL;
- for (;ptr!=NULL;ptr=ptr2) {
+ for (; ptr != NULL; ptr = ptr2) {
ptr2 = ptr->getNext();
delete ptr;
}
@@ -338,7 +338,7 @@ static TokenDef templateNames[] = { TemplateMap* TemplateMap::loadTemplateFile(const char *id, const char *filename, bool onlyInfo)
{
char lastTemplate[1024], tmp2[1024];
- unsigned int i=0;
+ unsigned int i = 0;
if (filename == NULL || strlen(filename) == 0)
return NULL;
@@ -385,21 +385,21 @@ TemplateMap* TemplateMap::loadTemplateFile(const char *id, const char *filename, free(templateText), templateText = NULL;
fclose(fh);
- static const char *groupTemplates[] = {"MessageInGroupStart", "MessageInGroupInner",
- "hMessageInGroupStart", "hMessageInGroupInner",
- "MessageOutGroupStart", "MessageOutGroupInner",
- "hMessageOutGroupStart", "hMessageOutGroupInner"};
+ static const char *groupTemplates[] = { "MessageInGroupStart", "MessageInGroupInner",
+ "hMessageInGroupStart", "hMessageInGroupInner",
+ "MessageOutGroupStart", "MessageOutGroupInner",
+ "hMessageOutGroupStart", "hMessageOutGroupInner" };
tmap->grouping = true;
- for (i = 0; i<SIZEOF(groupTemplates); i++) {
- if (tmap->getTemplate(groupTemplates[i])== NULL) {
+ for (i = 0; i < SIZEOF(groupTemplates); i++) {
+ if (tmap->getTemplate(groupTemplates[i]) == NULL) {
tmap->grouping = false;
break;
}
}
- static const char *rtlTemplates[] = {"MessageInRTL", "MessageOutRTL"}; //"HTMLStartRTL",
+ static const char *rtlTemplates[] = { "MessageInRTL", "MessageOutRTL" }; //"HTMLStartRTL",
tmap->rtl = true;
- for (i=0; i<SIZEOF(rtlTemplates); i++) {
- if (tmap->getTemplate(rtlTemplates[i])== NULL) {
+ for (i = 0; i < SIZEOF(rtlTemplates); i++) {
+ if (tmap->getTemplate(rtlTemplates[i]) == NULL) {
tmap->rtl = false;
break;
}
diff --git a/plugins/IEView/src/Template.h b/plugins/IEView/src/Template.h index a0a3c51dd7..4d1f0846cc 100644 --- a/plugins/IEView/src/Template.h +++ b/plugins/IEView/src/Template.h @@ -43,7 +43,7 @@ private: Token *next;
public:
enum TOKENS {
- END = 0,
+ END = 0,
BASE,
PLAIN,
TEXT,
@@ -65,7 +65,7 @@ public: NICKOUT,
FILEDESC,
};
- Token(int, const char *, int );
+ Token(int, const char *, int);
~Token();
int getType();
int getEscape();
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index c45ac7e528..10ce8161c0 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -344,7 +344,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, char *szRealProto = getProto(hRealContact);
char *szProto = getProto(event->pszProto, event->hContact);
tempBase[0] = '\0';
-
+
TemplateMap *tmpm = getTemplateMap(protoSettings);
if (tmpm != NULL) {
strcpy(tempBase, "file://");
@@ -427,9 +427,9 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, bool isHistory = (eventData->time < (DWORD)getStartedTime() && (eventData->dwFlags & IEEDF_READ || eventData->dwFlags & IEEDF_SENT));
bool isGroupBreak = true;
if ((getFlags(protoSettings) & Options::LOG_GROUP_MESSAGES) && eventData->dwFlags == LOWORD(getLastEventType())
- && eventData->iType == IEED_EVENT_MESSAGE && HIWORD(getLastEventType()) == IEED_EVENT_MESSAGE
- && (isSameDate(eventData->time, getLastEventTime()))
- && (((eventData->time < (DWORD)startedTime) == (getLastEventTime() < (DWORD)startedTime)) || !(eventData->dwFlags & IEEDF_READ)))
+ && eventData->iType == IEED_EVENT_MESSAGE && HIWORD(getLastEventType()) == IEED_EVENT_MESSAGE
+ && (isSameDate(eventData->time, getLastEventTime()))
+ && (((eventData->time < (DWORD)startedTime) == (getLastEventTime() < (DWORD)startedTime)) || !(eventData->dwFlags & IEEDF_READ)))
isGroupBreak = false;
if (isSent) {
@@ -445,7 +445,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, tmpltName[0] = groupTemplate;
tmpltName[1] = NULL;
groupTemplate = NULL;
-
+
char *szName = NULL, *szText = NULL, *szFileDesc = NULL;
if (event->eventData->dwFlags & IEEDF_UNICODE_NICK)
szName = encodeUTF8(event->hContact, szRealProto, eventData->pszNickW, ENF_NAMESMILEYS, true);
@@ -507,7 +507,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, Template *tmplt = tmpm->getTemplate(tmpltName[i]);
if (tmplt == NULL)
continue;
-
+
for (Token *token = tmplt->getTokens(); token != NULL; token = token->getNext()) {
const char *tokenVal;
tokenVal = NULL;
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.h b/plugins/IEView/src/TemplateHTMLBuilder.h index 4063f1f0d6..b3ab10463d 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.h +++ b/plugins/IEView/src/TemplateHTMLBuilder.h @@ -26,25 +26,25 @@ class TemplateHTMLBuilder; #include "HTMLBuilder.h"
#include "Template.h"
-class TemplateHTMLBuilder:public HTMLBuilder
+class TemplateHTMLBuilder :public HTMLBuilder
{
protected:
- char *timestampToString(DWORD dwFlags, time_t check, int mode);
- time_t startedTime;
- time_t getStartedTime();
- const char *groupTemplate;
- time_t flashAvatarsTime[2];
- char * flashAvatars[2];
- const char *getFlashAvatar(const TCHAR *file, int index);
- char *getAvatar(MCONTACT hContact, const char *szProto);
- void buildHeadTemplate(IEView *, IEVIEWEVENT *event, ProtocolSettings* protoSettings);
- void appendEventTemplate(IEView *, IEVIEWEVENT *event, ProtocolSettings* protoSettings);
- virtual TemplateMap *getTemplateMap(ProtocolSettings *);
- virtual int getFlags(ProtocolSettings *);
+ char *timestampToString(DWORD dwFlags, time_t check, int mode);
+ time_t startedTime;
+ time_t getStartedTime();
+ const char *groupTemplate;
+ time_t flashAvatarsTime[2];
+ char * flashAvatars[2];
+ const char *getFlashAvatar(const TCHAR *file, int index);
+ char *getAvatar(MCONTACT hContact, const char *szProto);
+ void buildHeadTemplate(IEView *, IEVIEWEVENT *event, ProtocolSettings* protoSettings);
+ void appendEventTemplate(IEView *, IEVIEWEVENT *event, ProtocolSettings* protoSettings);
+ virtual TemplateMap *getTemplateMap(ProtocolSettings *);
+ virtual int getFlags(ProtocolSettings *);
public:
- TemplateHTMLBuilder();
- virtual ~TemplateHTMLBuilder();
-// void buildHead(IEView *, IEVIEWEVENT *event);
+ TemplateHTMLBuilder();
+ virtual ~TemplateHTMLBuilder();
+ // void buildHead(IEView *, IEVIEWEVENT *event);
};
#endif
diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp index 7dc8acbc73..2c8d122279 100644 --- a/plugins/IEView/src/TextToken.cpp +++ b/plugins/IEView/src/TextToken.cpp @@ -594,8 +594,8 @@ void TextToken::toString(wchar_t **str, int *sizeAlloced) int len = match2 != NULL ? match2 - match : (int)wcslen(match);
match = mir_wstrdup(match);
match[len] = 0;
- int width;
- int height;
+ int width = 0;
+ int height = 0;
int Embedsize = Options::getEmbedsize();
switch (Embedsize){
case 0:
@@ -618,11 +618,11 @@ void TextToken::toString(wchar_t **str, int *sizeAlloced) };
Utils::appendText(str, sizeAlloced, L"<div><object width=\"%d\" height=\"%d\">\
- <param name=\"movie\" value=\"http://www.youtube.com/v/%s&feature=player_embedded&version=3\"/>\
- <param name=\"allowFullScreen\" value=\"true\"/>\
- <param name=\"allowScriptAccess\" value=\"true\"/>\
- <embed src=\"http://www.youtube.com/v/%s&feature=player_embedded&version=3\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowScriptAccess=\"always\" width=\"%d\" height=\"%d\"/>\
- </object></div>", width, height, match, match, width, height);
+ <param name=\"movie\" value=\"http://www.youtube.com/v/%s&feature=player_embedded&version=3\"/>\
+ <param name=\"allowFullScreen\" value=\"true\"/>\
+ <param name=\"allowScriptAccess\" value=\"true\"/>\
+ <embed src=\"http://www.youtube.com/v/%s&feature=player_embedded&version=3\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowScriptAccess=\"always\" width=\"%d\" height=\"%d\"/>\
+ </object></div>", width, height, match, match, width, height);
mir_free(match);
break;
}
@@ -630,15 +630,15 @@ void TextToken::toString(wchar_t **str, int *sizeAlloced) }
Utils::appendText(str, sizeAlloced, L"<a class=\"link\" target=\"_self\" href=\"%s%s\">%s</a>", linkPrefix, eLink, eText);
}
- break;
+ break;
case SMILEY:
eText = htmlEncode(wtext);
if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_FLASH) && (wcsstr(wlink, L".swf") != NULL)) {
Utils::appendText(str, sizeAlloced,
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>",
- eText, wlink);
+ 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>",
+ eText, wlink);
}
else {
Utils::appendText(str, sizeAlloced, L"<img class=\"img\" src=\"file://%s\" title=\"%s\" alt=\"%s\" />", wlink, eText, eText);
@@ -676,9 +676,9 @@ void TextToken::toString(wchar_t **str, int *sizeAlloced) if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_FLASH) && eText != NULL && (wcsstr(eText, L".swf") != NULL)) {
Utils::appendText(str, sizeAlloced,
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>",
- eText);
+ 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>",
+ eText);
}
else {
if (eText != NULL && wcsncmp(eText, L"http://", 7) && wcsncmp(eText, L"https://", 8)) {
@@ -695,9 +695,9 @@ void TextToken::toString(wchar_t **str, int *sizeAlloced) if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_FLASH) && (wcsstr(eText, L".swf") != NULL)) {
Utils::appendText(str, sizeAlloced,
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>",
- eText);
+ 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>",
+ eText);
}
else {
Utils::appendText(str, sizeAlloced, L"<div style=\"width: 100%%; border: 0; overflow: hidden;\"><img class=\"img\" style=\"width: expression((maxw = this.parentNode.offsetWidth ) > this.width ? 'auto' : maxw);\" src=\"file://%s\" /></div>", eText);
diff --git a/plugins/IEView/src/TextToken.h b/plugins/IEView/src/TextToken.h index 68e607cd69..3789ce9350 100644 --- a/plugins/IEView/src/TextToken.h +++ b/plugins/IEView/src/TextToken.h @@ -36,7 +36,7 @@ private: static TextToken* tokenizeBBCodes(const wchar_t *text, int len);
public:
enum TOKENS {
- END = 0,
+ END = 0,
TEXT,
LINK,
WWWLINK,
@@ -73,12 +73,12 @@ public: void setEnd(bool);
TextToken * getNext();
void setNext(TextToken *);
-// void toString(char **str, int *sizeAlloced);
+ // void toString(char **str, int *sizeAlloced);
void toString(wchar_t **str, int *sizeAlloced);
-// static char * htmlEncode(const char *str);
-// static char * urlEncode2(const char *str);
-// static TextToken* tokenizeLinks(const char *text);
-// static TextToken* tokenizeSmileys(const char *proto, const char *text);
+ // static char * htmlEncode(const char *str);
+ // static char * urlEncode2(const char *str);
+ // static TextToken* tokenizeLinks(const char *text);
+ // static TextToken* tokenizeSmileys(const char *proto, const char *text);
// UNICODE
wchar_t * htmlEncode(const wchar_t *str);
static TextToken* tokenizeLinks(const wchar_t *wtext);
diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp index 37c0da77f2..0c2d2a8d6b 100644 --- a/plugins/IEView/src/Utils.cpp +++ b/plugins/IEView/src/Utils.cpp @@ -35,7 +35,7 @@ wchar_t* Utils::toAbsolute(wchar_t* relative) long len = (int)wcslen(bdir);
long tlen = len + (int)wcslen(relative);
wchar_t* result = (wchar_t*)mir_alloc(sizeof(wchar_t)*(tlen + 1));
- if(result) {
+ if (result) {
wcscpy(result, bdir);
wcscpy(result + len, relative);
}
@@ -45,7 +45,7 @@ wchar_t* Utils::toAbsolute(wchar_t* relative) static int countNoWhitespace(const wchar_t *str)
{
int c;
- for (c=0; *str!='\n' && *str!='\r' && *str!='\t' && *str!=' ' && *str!='\0'; str++, c++);
+ for (c = 0; *str != '\n' && *str != '\r' && *str != '\t' && *str != ' ' && *str != '\0'; str++, c++);
return c;
}
@@ -57,9 +57,9 @@ void Utils::appendText(char **str, int *sizeAlloced, const char *fmt, ...) if (str == NULL) return;
- if (*str==NULL || *sizeAlloced<=0) {
+ if (*str == NULL || *sizeAlloced <= 0) {
*sizeAlloced = size = 2048;
- *str = (char *) malloc(size);
+ *str = (char *)malloc(size);
len = 0;
}
else {
@@ -70,17 +70,17 @@ void Utils::appendText(char **str, int *sizeAlloced, const char *fmt, ...) if (size < 128) {
size += 2048;
(*sizeAlloced) += 2048;
- *str = (char *) realloc(*str, *sizeAlloced);
+ *str = (char *)realloc(*str, *sizeAlloced);
}
p = *str + len;
va_start(vararg, fmt);
- while (mir_vsnprintf(p, size - 1, fmt, vararg) == -1) {
+ while (mir_vsnprintf(p, size - 1, fmt, vararg) == -1) {
size += 2048;
(*sizeAlloced) += 2048;
- *str = (char *) realloc(*str, *sizeAlloced);
+ *str = (char *)realloc(*str, *sizeAlloced);
p = *str + len;
}
- p[ size - 1 ] = '\0';
+ p[size - 1] = '\0';
va_end(vararg);
}
@@ -92,9 +92,9 @@ void Utils::appendText(wchar_t **str, int *sizeAlloced, const wchar_t *fmt, ...) if (str == NULL) return;
- if (*str==NULL || *sizeAlloced<=0) {
+ if (*str == NULL || *sizeAlloced <= 0) {
*sizeAlloced = size = 2048;
- *str = (wchar_t *) malloc(size);
+ *str = (wchar_t *)malloc(size);
len = 0;
}
else {
@@ -105,24 +105,24 @@ void Utils::appendText(wchar_t **str, int *sizeAlloced, const wchar_t *fmt, ...) if (size < 128) {
size += 2048;
(*sizeAlloced) += 2048;
- *str = (wchar_t *) realloc(*str, *sizeAlloced);
+ *str = (wchar_t *)realloc(*str, *sizeAlloced);
}
p = *str + len;
va_start(vararg, fmt);
while (mir_vsnwprintf(p, size / sizeof(wchar_t) - 1, fmt, vararg) == -1) {
size += 2048;
(*sizeAlloced) += 2048;
- *str = (wchar_t *) realloc(*str, *sizeAlloced);
+ *str = (wchar_t *)realloc(*str, *sizeAlloced);
p = *str + len;
}
- p[ size / sizeof(wchar_t) - 1] = '\0';
+ p[size / sizeof(wchar_t) - 1] = '\0';
va_end(vararg);
}
void Utils::convertPath(char *path)
{
if (path != NULL) {
- for (; *path!='\0'; path++) {
+ for (; *path != '\0'; path++) {
if (*path == '\\') *path = '/';
}
}
@@ -131,7 +131,7 @@ void Utils::convertPath(char *path) void Utils::convertPath(wchar_t *path)
{
if (path != NULL) {
- for (; *path!='\0'; path++) {
+ for (; *path != '\0'; path++) {
if (*path == '\\') *path = '/';
}
}
@@ -140,15 +140,15 @@ void Utils::convertPath(wchar_t *path) int Utils::detectURL(const wchar_t *text)
{
int i;
- for (i=0;text[i]!='\0';i++) {
- if (!((text[i] >= '0' && text[i]<='9') || iswalpha(text[i]))) {
+ for (i = 0; text[i] != '\0'; i++) {
+ if (!((text[i] >= '0' && text[i] <= '9') || iswalpha(text[i]))) {
break;
}
}
- if (i > 0 && text[i]==':' && text[i+1]=='/' && text[i+2]=='/') {
- i += countNoWhitespace(text+i);
- for (; i > 0; i --) {
- if ((text[i-1] >= '0' && text[i-1]<='9') || iswalpha(text[i-1]) || text[i-1]=='/') {
+ if (i > 0 && text[i] == ':' && text[i + 1] == '/' && text[i + 2] == '/') {
+ i += countNoWhitespace(text + i);
+ for (; i > 0; i--) {
+ if ((text[i - 1] >= '0' && text[i - 1] <= '9') || iswalpha(text[i - 1]) || text[i - 1] == '/') {
break;
}
}
@@ -169,7 +169,7 @@ char *Utils::escapeString(const char *a) l++;
}
}
- char *out = (char*)mir_alloc(l+1);
+ char *out = (char*)mir_alloc(l + 1);
for (i = l = 0; i < len; i++, l++) {
if (a[i] == '\\' || a[i] == '\n' || a[i] == '\r' || a[i] == '\"'
|| a[i] == '\'' || a[i] == '\b' || a[i] == '\t' || a[i] == '\f') {
diff --git a/plugins/IEView/src/ieview_main.cpp b/plugins/IEView/src/ieview_main.cpp index 5f0caf87a7..cbafdcd3c1 100644 --- a/plugins/IEView/src/ieview_main.cpp +++ b/plugins/IEView/src/ieview_main.cpp @@ -37,16 +37,16 @@ PLUGININFOEX pluginInfoEx = { __AUTHORWEB,
UNICODE_AWARE,
// 0495171B-7137-4DED-97F8-CE6FED67D691
- {0x0495171b, 0x7137, 0x4ded, {0x97, 0xf8, 0xce, 0x6f, 0xed, 0x67, 0xd6, 0x91}}
+ { 0x0495171b, 0x7137, 0x4ded, { 0x97, 0xf8, 0xce, 0x6f, 0xed, 0x67, 0xd6, 0x91 } }
};
-BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
+BOOL WINAPI DllMain(HINSTANCE hModule, DWORD, LPVOID)
{
hInstance = hModule;
return TRUE;
}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
{
return &pluginInfoEx;
}
diff --git a/plugins/IEView/src/ieview_services.cpp b/plugins/IEView/src/ieview_services.cpp index 8c5f3f0d4b..6357f73764 100644 --- a/plugins/IEView/src/ieview_services.cpp +++ b/plugins/IEView/src/ieview_services.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. INT_PTR HandleIEWindow(WPARAM, LPARAM lParam)
{
- IEVIEWWINDOW *window = (IEVIEWWINDOW *) lParam;
+ IEVIEWWINDOW *window = (IEVIEWWINDOW *)lParam;
IEView::init();
Options::init();
if (window->iType == IEW_CREATE) {
@@ -57,7 +57,7 @@ INT_PTR HandleIEWindow(WPARAM, LPARAM lParam) else if (window->iType == IEW_SETPOS) {
IEView *view = IEView::get(window->hwnd);
if (view != NULL)
- view->setWindowPos(window->x, window->y, window->cx,window->cy);
+ view->setWindowPos(window->x, window->y, window->cx, window->cy);
}
else if (window->iType == IEW_SCROLLBOTTOM) {
IEView *view = IEView::get(window->hwnd);
@@ -74,7 +74,7 @@ INT_PTR HandleIEWindow(WPARAM, LPARAM lParam) INT_PTR HandleIEEvent(WPARAM, LPARAM lParam)
{
- IEVIEWEVENT *event = (IEVIEWEVENT *) lParam;
+ IEVIEWEVENT *event = (IEVIEWEVENT *)lParam;
IEView::init();
Options::init();
IEView *view = IEView::get(event->hwnd);
@@ -95,7 +95,7 @@ INT_PTR HandleIEEvent(WPARAM, LPARAM lParam) INT_PTR HandleIENavigate(WPARAM, LPARAM lParam)
{
- IEVIEWNAVIGATE *navigate = (IEVIEWNAVIGATE *) lParam;
+ IEVIEWNAVIGATE *navigate = (IEVIEWNAVIGATE *)lParam;
IEView::init();
Options::init();
IEView *view = IEView::get(navigate->hwnd);
|