summaryrefslogtreecommitdiff
path: root/plugins/IEView
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-10-07 20:46:56 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-10-07 20:46:56 +0000
commit96d6803160cff5941a7d4e3913eb5fcc41a98fc9 (patch)
tree818cca2dbb02e99de9e296580dd2f3833fbcd81f /plugins/IEView
parent5d10fc1bc38dd867ab191cd0fdcc21bb6e021cef (diff)
IEView:
- Removed PNG-workaround for old Internet Explorer - BBCode "img" now supports "https"-links (fixes #805) git-svn-id: http://svn.miranda-ng.org/main/trunk@10737 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEView')
-rw-r--r--plugins/IEView/res/ieview.rc22
-rw-r--r--plugins/IEView/src/Options.cpp12
-rw-r--r--plugins/IEView/src/Options.h1
-rw-r--r--plugins/IEView/src/TextToken.cpp18
-rw-r--r--plugins/IEView/src/resource.h28
5 files changed, 19 insertions, 62 deletions
diff --git a/plugins/IEView/res/ieview.rc b/plugins/IEView/res/ieview.rc
index 6aac7db2ce..71df058918 100644
--- a/plugins/IEView/res/ieview.rc
+++ b/plugins/IEView/res/ieview.rc
@@ -7,8 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
-
+#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -59,24 +58,22 @@ IDI_GROUP_OFF ICON "group_off.ico"
// Dialog
//
-IDD_GENERAL_OPTIONS DIALOGEX 0, 0, 306, 165
+IDD_GENERAL_OPTIONS DIALOGEX 0, 0, 306, 140
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- GROUPBOX "Options",IDC_STATIC,4,2,297,155
+ GROUPBOX "Options",IDC_STATIC,4,2,297,131
CONTROL "Enable BBCodes",IDC_ENABLE_BBCODES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,19,279,10
LTEXT "Currently the following BBCodes are supported: [b][i][u][s][img][size][color][url]",IDC_STATIC,26,31,265,12
CONTROL "Enable support for Flash files in smileys and BBCodes",IDC_ENABLE_FLASH,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,46,279,10
- CONTROL "Enable workaround for PNG transparency",IDC_ENABLE_PNGHACK,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,61,279,10
CONTROL "Replace smileys in user names",IDC_SMILEYS_IN_NAMES,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,91,279,10
- CONTROL "Hide window border",IDC_NO_BORDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,106,279,10
- CONTROL "Embed YouTube videos",IDC_ENABLE_EMBED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,121,279,10
- LTEXT "Size:",IDC_STATIC,26,138,30,8
- COMBOBOX IDC_EMBED_SIZE,57,136,56,130,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,63,279,10
+ CONTROL "Hide window border",IDC_NO_BORDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,78,279,10
+ CONTROL "Embed YouTube videos",IDC_ENABLE_EMBED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,95,279,10
+ LTEXT "Size:",IDC_STATIC,27,109,30,8
+ COMBOBOX IDC_EMBED_SIZE,58,108,56,130,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
END
IDD_SRMM_OPTIONS DIALOGEX 0, 0, 306, 228
@@ -168,8 +165,7 @@ END
//
// Generated from the TEXTINCLUDE 3 resource.
//
-
-
+
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp
index a027be03ec..c9ea0b3e4a 100644
--- a/plugins/IEView/src/Options.cpp
+++ b/plugins/IEView/src/Options.cpp
@@ -477,7 +477,6 @@ static void MarkChanges(int i, HWND hWnd)
static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- int i;
switch (msg) {
case WM_INITDIALOG:
{
@@ -489,9 +488,6 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w
if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_FLASH) {
CheckDlgButton(hwndDlg, IDC_ENABLE_FLASH, TRUE);
}
- if (Options::getGeneralFlags() & Options::GENERAL_ENABLE_PNGHACK) {
- CheckDlgButton(hwndDlg, IDC_ENABLE_PNGHACK, TRUE);
- }
if (Options::getGeneralFlags() & Options::GENERAL_SMILEYINNAMES) {
CheckDlgButton(hwndDlg, IDC_SMILEYS_IN_NAMES, TRUE);
}
@@ -504,7 +500,7 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w
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 (i = 0; i < SIZEOF(size); ++i){
+ 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);
}
@@ -516,7 +512,6 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w
switch (LOWORD(wParam)) {
case IDC_ENABLE_BBCODES:
case IDC_ENABLE_FLASH:
- case IDC_ENABLE_PNGHACK:
case IDC_SMILEYS_IN_NAMES:
case IDC_NO_BORDER:
case IDC_EMBED_SIZE:
@@ -533,16 +528,13 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w
{
switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
- i = 0;
+ 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_ENABLE_PNGHACK)) {
- i |= Options::GENERAL_ENABLE_PNGHACK;
- }
if (IsDlgButtonChecked(hwndDlg, IDC_SMILEYS_IN_NAMES)) {
i |= Options::GENERAL_SMILEYINNAMES;
}
diff --git a/plugins/IEView/src/Options.h b/plugins/IEView/src/Options.h
index 4fbf6fe4a1..e6a2bec535 100644
--- a/plugins/IEView/src/Options.h
+++ b/plugins/IEView/src/Options.h
@@ -207,7 +207,6 @@ public:
enum OPTIONS {
GENERAL_ENABLE_BBCODES = 0x000001,
GENERAL_ENABLE_FLASH = 0x000004,
- GENERAL_ENABLE_PNGHACK = 0x000008,
GENERAL_SMILEYINNAMES = 0x000010,
GENERAL_NO_BORDER = 0x000020,
GENERAL_ENABLE_EMBED = 0x000040,
diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp
index fa5e33f464..a7b4fb85bf 100644
--- a/plugins/IEView/src/TextToken.cpp
+++ b/plugins/IEView/src/TextToken.cpp
@@ -640,21 +640,13 @@ void TextToken::toString(wchar_t **str, int *sizeAlloced)
<param NAME=\"movie\" VALUE=\"%s\"><param NAME=\"quality\" VALUE=\"high\"><PARAM NAME=\"loop\" VALUE=\"true\"></object></span><span style=\"position:absolute; visibility:hidden;\">%s</span>",
eText, wlink, eText);
}
- else if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_PNGHACK) && (wcsstr(wlink, L".png") != NULL)) {
- Utils::appendText(str, sizeAlloced, L"<img class=\"img\" style=\"height:1px;width:1px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='%s',sizingMethod='image');\" title=\"%s\" alt=\"%s\"/><span style=\"position:absolute; visibility:hidden;\">%s</span>", wlink, eText, eText, eText);
- }
else {
Utils::appendText(str, sizeAlloced, L"<img class=\"img\" src=\"file://%s\" title=\"%s\" alt=\"%s\" /><span style=\"position:absolute; visibility:hidden;\">%s</span>", wlink, eText, eText, eText);
}
break;
case MATH:
eText = htmlEncode(wtext);
- if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_PNGHACK) && (wcsstr(wlink, L".png") != NULL)) {
- Utils::appendText(str, sizeAlloced, L"<img class=\"img\" style=\"height:1px;width:1px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='%s',sizingMethod='image');\" alt=\"%s\" /><span style=\"position:absolute; visibility:hidden;\">%s</span>", wlink, eText, eText);
- }
- else {
- Utils::appendText(str, sizeAlloced, L"<img class=\"img\" src=\"file://%s\" alt=\"%s\" /><span style=\"position:absolute; visibility:hidden;\">%s</span>", wlink, eText, eText);
- }
+ Utils::appendText(str, sizeAlloced, L"<img class=\"img\" src=\"file://%s\" alt=\"%s\" /><span style=\"position:absolute; visibility:hidden;\">%s</span>", wlink, eText, eText);
break;
case BBCODE:
if (!end) {
@@ -688,11 +680,8 @@ void TextToken::toString(wchar_t **str, int *sizeAlloced)
<param NAME=\"movie\" VALUE=\"%s\"><param NAME=\"quality\" VALUE=\"high\"><PARAM NAME=\"loop\" VALUE=\"true\"></object></div>",
eText);
}
- else if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_PNGHACK) && eText != NULL && (wcsstr(eText, L".png") != NULL)) {
- Utils::appendText(str, sizeAlloced, L"<img class=\"img\" style=\"height:1px;width:1px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='%s',sizingMethod='image');\" />", eText);
- }
else {
- if (eText != NULL && wcsncmp(eText, L"http://", 7)) {
+ if (eText != NULL && wcsncmp(eText, L"http://", 7) && wcsncmp(eText, L"https://", 8)) {
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);
}
else {
@@ -710,9 +699,6 @@ void TextToken::toString(wchar_t **str, int *sizeAlloced)
<param NAME=\"movie\" VALUE=\"%s\"><param NAME=\"quality\" VALUE=\"high\"><PARAM NAME=\"loop\" VALUE=\"true\"></object></div>",
eText);
}
- else if ((Options::getGeneralFlags()&Options::GENERAL_ENABLE_PNGHACK) && (wcsstr(eText, L".png") != NULL)) {
- Utils::appendText(str, sizeAlloced, L"<img class=\"img\" style=\"height:1px;width:1px;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='%s',sizingMethod='image');\" />", 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/resource.h b/plugins/IEView/src/resource.h
index ce77e9d24f..f4c7095b47 100644
--- a/plugins/IEView/src/resource.h
+++ b/plugins/IEView/src/resource.h
@@ -1,22 +1,7 @@
-/*
-IEView Plugin for Miranda IM
-Copyright (C) 2005-2010 Piotr Piastucki
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by ..\res\ieview.rc
+//
#define ID_MENU_COPY 15
#define ID_MENU_PRINT 27
#define ID_MENU_SELECTALL 31
@@ -33,11 +18,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define IDC_SCROLL_BACKGROUND_IMAGE 1003
#define IDC_ENABLE_BBCODES 1004
#define IDC_ENABLE_FLASH 1005
-#define IDC_ENABLE_PNGHACK 1007
#define IDC_SMILEYS_IN_NAMES 1008
#define IDC_NO_BORDER 1009
-#define IDC_ENABLE_EMBED 1010
-#define IDC_EMBED_SIZE 1011
+#define IDC_ENABLE_EMBED 1010
+#define IDC_EMBED_SIZE 1011
#define IDC_EXTERNALCSS 1020
#define IDC_EXTERNALCSS_FILENAME 1021
#define IDC_BROWSE_EXTERNALCSS 1022