summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-01-21 14:23:36 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-01-21 14:23:36 +0300
commit6d8904f7b96bf24618e9493b8cee050868be3e82 (patch)
tree7c35fede90b8a255e41c722b4c760e4db436677b
parent8c18d1fe6f83807116c065e548ee6b567f4b49a1 (diff)
fixes #1776 (rest of URL atavisms)
-rw-r--r--plugins/HistoryStats/src/column_events.cpp7
-rw-r--r--plugins/KeyboardNotify/res/resources.rc3
-rw-r--r--plugins/KeyboardNotify/src/flash.cpp14
-rw-r--r--plugins/KeyboardNotify/src/main.cpp4
-rw-r--r--plugins/KeyboardNotify/src/options.cpp7
-rw-r--r--plugins/KeyboardNotify/src/resource.h1
-rw-r--r--plugins/NewStory/src/fonts.cpp6
-rw-r--r--plugins/Scriver/src/msglog.cpp72
-rw-r--r--plugins/Scriver/src/msgs.h6
-rw-r--r--plugins/WinterSpeak/res/Speak.rc3
-rw-r--r--plugins/WinterSpeak/src/AnnounceDialog.cpp3
-rw-r--r--plugins/WinterSpeak/src/resource.h1
12 files changed, 13 insertions, 114 deletions
diff --git a/plugins/HistoryStats/src/column_events.cpp b/plugins/HistoryStats/src/column_events.cpp
index db230e666f..b1ac0e0f0c 100644
--- a/plugins/HistoryStats/src/column_events.cpp
+++ b/plugins/HistoryStats/src/column_events.cpp
@@ -32,9 +32,6 @@ void ColEvents::impl_configToUI(OptionsCtrl& Opt, OptionsCtrl::Item hGroup)
m_hSource = Opt.insertCombo(hGroup, TranslateT("Events to count"));
static const wchar_t* sourceTexts[] = {
- LPGENW("URLs (incoming)"),
- LPGENW("URLs (outgoing)"),
- LPGENW("URLs (all)"),
LPGENW("Files (incoming)"),
LPGENW("Files (outgoing)"),
LPGENW("Files (all)"),
@@ -56,14 +53,10 @@ void ColEvents::impl_configFromUI(OptionsCtrl& Opt)
void ColEvents::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) const
{
static const wchar_t* szShortDesc[] = {
- LPGENW("URLs"),
LPGENW("Files"),
};
static const wchar_t* szSourceDesc[] = {
- LPGENW("Incoming URLs"),
- LPGENW("Outgoing URLs"),
- LPGENW("URLs"),
LPGENW("Incoming files"),
LPGENW("Outgoing files"),
LPGENW("Files"),
diff --git a/plugins/KeyboardNotify/res/resources.rc b/plugins/KeyboardNotify/res/resources.rc
index 38ce2ea85a..8ba35da2f4 100644
--- a/plugins/KeyboardNotify/res/resources.rc
+++ b/plugins/KeyboardNotify/res/resources.rc
@@ -49,8 +49,7 @@ BEGIN
GROUPBOX "Events to react on",IDC_STATIC,3,4,147,68
CONTROL "Incoming messages",IDC_ONMESSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,16,127,10
CONTROL "Incoming files",IDC_ONFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,29,127,10
- CONTROL "Incoming URLs",IDC_ONURL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,42,127,10
- CONTROL "Everything else",IDC_ONOTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,55,128,10
+ CONTROL "Everything else",IDC_ONOTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,42,128,10
GROUPBOX "Message-Event only",IDC_STATIC,3,77,147,57
CONTROL "Blink if message window is open",IDC_IFOPEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,89,140,10
CONTROL "and not in foreground",IDC_IFNOTTOP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,102,127,10
diff --git a/plugins/KeyboardNotify/src/flash.cpp b/plugins/KeyboardNotify/src/flash.cpp
index 86b8c528aa..d1d9edfbd4 100644
--- a/plugins/KeyboardNotify/src/flash.cpp
+++ b/plugins/KeyboardNotify/src/flash.cpp
@@ -35,7 +35,7 @@ static void __cdecl TestThread(void *param);
static void PreviewThread(void *);
FLASHING_SEQUENCE str2FS(wchar_t *);
BYTE KbdChar2Byte(char);
-void countUnopenEvents(int *, int *, int *, int *);
+void countUnopenEvents(int *, int *, int *);
#define Leds2Flash ((BYTE)(bFlashLed[2] + (bFlashLed[0]<<1) + (bFlashLed[1]<<2)))
@@ -45,7 +45,7 @@ BOOL bTemporarilyUseExtern;
extern BYTE bFlashLed[3];
extern BYTE bFlashEffect; extern BYTE bSequenceOrder;
extern WORD wCustomTheme;
-extern BYTE bTrillianLedsMsg; extern BYTE bTrillianLedsURL; extern BYTE bTrillianLedsFile; extern BYTE bTrillianLedsOther;
+extern BYTE bTrillianLedsMsg, bTrillianLedsFile, bTrillianLedsOther;
extern BYTE bEmulateKeypresses;
// TestThread/PreviewThread globals
@@ -165,10 +165,10 @@ FLASHING_SEQUENCE *getTrillianSeq(void)
void updateTrillianSeq(void)
{
- int i, msgCount=0, fileCount=0, urlCount=0, otherCount=0;
+ int i, msgCount=0, fileCount=0, otherCount=0;
pFS->size = 2;
- countUnopenEvents(&msgCount, &fileCount, &urlCount, &otherCount);
+ countUnopenEvents(&msgCount, &fileCount, &otherCount);
if ((bTrillianLedsMsg & Leds2Flash) && (pFS->size + 2 * msgCount) <= MAX_PATH)
for (i=0; i < msgCount; i++) {
@@ -182,12 +182,6 @@ void updateTrillianSeq(void)
pFS->frame[pFS->size++] = 0;
}
- if ((bTrillianLedsURL & Leds2Flash) && (pFS->size + 2 * urlCount) <= MAX_PATH)
- for (i=0; i < urlCount; i++) {
- pFS->frame[pFS->size++] = bTrillianLedsURL & Leds2Flash;
- pFS->frame[pFS->size++] = 0;
- }
-
if ((bTrillianLedsOther & Leds2Flash) && (pFS->size + 2 * otherCount) <= MAX_PATH)
for (i=0; i < otherCount; i++) {
pFS->frame[pFS->size++] = bTrillianLedsOther & Leds2Flash;
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index d10bbdb9af..adbe79029d 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -45,7 +45,6 @@ DWORD dwLastInput = 0;
POINT lastGlobalMousePos = { 0, 0 };
BYTE bFlashOnMsg;
-BYTE bFlashOnURL;
BYTE bFlashOnFile;
BYTE bFlashOnOther;
BYTE bFullScreenMode;
@@ -663,7 +662,6 @@ int UnhookWindowsHooks()
void LoadSettings(void)
{
bFlashOnMsg = g_plugin.getByte("onmsg", DEF_SETTING_ONMSG);
- bFlashOnURL = g_plugin.getByte("onurl", DEF_SETTING_ONURL);
bFlashOnFile = g_plugin.getByte("onfile", DEF_SETTING_ONFILE);
bFlashOnOther = g_plugin.getByte("onother", DEF_SETTING_OTHER);
bFullScreenMode = g_plugin.getByte("fscreenmode", DEF_SETTING_FSCREEN);
@@ -845,7 +843,7 @@ BOOL CheckMsgWnd(MCONTACT hContact, BOOL *focus)
}
-void countUnopenEvents(int *msgCount, int *fileCount, int *urlCount, int *otherCount)
+void countUnopenEvents(int *msgCount, int *fileCount, int *otherCount)
{
int nIndex;
CLISTEVENT *pCLEvent;
diff --git a/plugins/KeyboardNotify/src/options.cpp b/plugins/KeyboardNotify/src/options.cpp
index 273d87793c..47fbb0a007 100644
--- a/plugins/KeyboardNotify/src/options.cpp
+++ b/plugins/KeyboardNotify/src/options.cpp
@@ -18,11 +18,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-#define IDI_BLANK 200
+#define IDI_BLANK 200
void LoadSettings(void);
-extern BYTE bFlashOnMsg, bFlashOnURL, bFlashOnFile, bFlashOnOther, bFullScreenMode, bScreenSaverRunning, bWorkstationLocked, bProcessesAreRunning,
+extern BYTE bFlashOnMsg, bFlashOnFile, bFlashOnOther, bFullScreenMode, bScreenSaverRunning, bWorkstationLocked, bProcessesAreRunning,
bWorkstationActive, bFlashIfMsgOpen, bFlashIfMsgOlder, bFlashUntil, bMirandaOrWindows, bFlashLed[3], bFlashEffect, bSequenceOrder, bFlashSpeed,
bEmulateKeypresses, bOverride, bFlashIfMsgWinNotTop, bTrillianLedsMsg, bTrillianLedsURL, bTrillianLedsFile, bTrillianLedsOther;
extern WORD wSecondsOlder, wBlinksNumber, wStatusMap, wReminderCheck, wCustomTheme, wStartDelay;
@@ -597,7 +597,6 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
createXstatusListAux();
CheckDlgButton(hwndDlg, IDC_ONMESSAGE, bFlashOnMsg ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONURL, bFlashOnURL ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ONFILE, bFlashOnFile ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ONOTHER, bFlashOnOther ? BST_CHECKED : BST_UNCHECKED);
@@ -671,7 +670,6 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_ONMESSAGE:
- case IDC_ONURL:
case IDC_ONFILE:
case IDC_ONOTHER:
case IDC_IFOPEN:
@@ -751,7 +749,6 @@ static INT_PTR CALLBACK DlgProcBasicOptions(HWND hwndDlg, UINT msg, WPARAM wPara
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
g_plugin.setByte("onmsg", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ONMESSAGE) == BST_CHECKED ? 1 : 0));
- g_plugin.setByte("onurl", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ONURL) == BST_CHECKED ? 1 : 0));
g_plugin.setByte("onfile", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ONFILE) == BST_CHECKED ? 1 : 0));
g_plugin.setByte("onother", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ONOTHER) == BST_CHECKED ? 1 : 0));
diff --git a/plugins/KeyboardNotify/src/resource.h b/plugins/KeyboardNotify/src/resource.h
index 78e99972b7..87528e8fec 100644
--- a/plugins/KeyboardNotify/src/resource.h
+++ b/plugins/KeyboardNotify/src/resource.h
@@ -15,7 +15,6 @@
#define IDD_XSTATUSES 158
#define IDC_ONMESSAGE 1000
#define IDC_ONFILE 1001
-#define IDC_ONURL 1002
#define IDC_ONOTHER 1003
#define IDC_IFOPEN 1004
#define IDC_IFNOTTOP 1005
diff --git a/plugins/NewStory/src/fonts.cpp b/plugins/NewStory/src/fonts.cpp
index 39e3f016b4..272a89723e 100644
--- a/plugins/NewStory/src/fonts.cpp
+++ b/plugins/NewStory/src/fonts.cpp
@@ -8,9 +8,6 @@ MyColourID colors[] =
{ "Incoming Files", "ColorFileIn", RGB(0xff, 0xff, 0xff) },
{ "Outgoing Files", "ColorFileOut", RGB(0xff, 0xff, 0xff) },
- { "Incoming URLs", "ColorURLIn", RGB(0xff, 0xff, 0xff) },
- { "Outgoing URLs", "ColorURLOut", RGB(0xff, 0xff, 0xff) },
-
{ "Status changes", "ColorStatus", RGB(0xff, 0xff, 0xff) },
{ "Other Outgoing Events", "ColorOut", RGB(0xff, 0xff, 0xff) },
@@ -28,9 +25,6 @@ MyFontID fonts[] =
{ "Incoming Files", "FontFileIn" },
{ "Outgoing Files", "FontFileOut" },
- { "Incoming URLs", "FontURLIn" },
- { "Outgoing URLs", "FontURLOut" },
-
{ "Status changes", "FontStatus" },
{ "Other Outgoing Events", "FontOut" },
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index b1f8d79df5..11ae269256 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -380,51 +380,6 @@ int isSameDate(time_t time1, time_t time2)
return 0;
}
-static int DetectURL(wchar_t *text, BOOL firstChar)
-{
- wchar_t c;
- struct prefix_s
- {
- wchar_t *text;
- int length;
- } prefixes[12] = {
- { L"http:", 5 },
- { L"file:", 5 },
- { L"mailto:", 7 },
- { L"ftp:", 4 },
- { L"https:", 6 },
- { L"gopher:", 7 },
- { L"nntp:", 5 },
- { L"prospero:", 9 },
- { L"telnet:", 7 },
- { L"news:", 5 },
- { L"wais:", 5 },
- { L"www.", 4 }
- };
- c = firstChar ? ' ' : text[-1];
- if (!((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'))) {
- int found = 0;
- int i, len = 0;
- int prefixlen = _countof(prefixes);
- for (i = 0; i < prefixlen; i++) {
- if (!wcsncmp(text, prefixes[i].text, prefixes[i].length)) {
- len = prefixes[i].length;
- found = 1;
- break;
- }
- }
- if (found) {
- for (; text[len] != '\n' && text[len] != '\r' && text[len] != '\t' && text[len] != ' ' && text[len] != '\0'; len++);
- for (; len > 0; len--)
- if ((text[len - 1] >= '0' && text[len - 1] <= '9') || iswalpha(text[len - 1]))
- break;
-
- return len;
- }
- }
- return 0;
-}
-
static void AppendWithCustomLinks(EventData *evt, int style, CMStringA &buf)
{
if (evt->pszText == nullptr)
@@ -432,7 +387,6 @@ static void AppendWithCustomLinks(EventData *evt, int style, CMStringA &buf)
BOOL isAnsii = (evt->dwFlags & IEEDF_UNICODE_TEXT) == 0;
WCHAR *wText;
- int lasttoken = 0;
size_t len, laststart = 0;
if (isAnsii) {
len = mir_strlen(evt->pszText);
@@ -442,34 +396,12 @@ static void AppendWithCustomLinks(EventData *evt, int style, CMStringA &buf)
wText = evt->pszTextW;
len = (int)mir_wstrlen(evt->pszTextW);
}
- for (size_t j = 0; j < len; j++) {
- int newtoken = 0;
- int l = DetectURL(wText + j, j == 0);
- if (l > 0)
- newtoken = 1;
-
- if (j == 0)
- lasttoken = newtoken;
-
- if (newtoken != lasttoken) {
- if (lasttoken == 0)
- buf.AppendFormat("%s ", SetToStyle(style));
- else
- buf.AppendFormat("%s ", SetToStyle(evt->dwFlags & IEEDF_SENT ? MSGFONTID_MYURL : MSGFONTID_YOURURL));
- AppendUnicodeOrAnsiiToBufferL(buf, wText + laststart, j - laststart, isAnsii);
- laststart = j;
- lasttoken = newtoken;
- }
- }
if (len - laststart > 0) {
- if (lasttoken == 0)
- buf.AppendFormat("%s ", SetToStyle(style));
- else
- buf.AppendFormat("%s ", SetToStyle(evt->dwFlags & IEEDF_SENT ? MSGFONTID_MYURL : MSGFONTID_YOURURL));
-
+ buf.AppendFormat("%s ", SetToStyle(style));
AppendUnicodeOrAnsiiToBufferL(buf, wText + laststart, len - laststart, isAnsii);
}
+
if (isAnsii)
mir_free(wText);
}
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index a1b8704ff6..41bf0a6e3e 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -310,10 +310,8 @@ int IsAutoPopup(MCONTACT hContact);
#define MSGFONTID_YOURCOLON 7
#define MSGFONTID_MESSAGEAREA 8
#define MSGFONTID_NOTICE 9
-#define MSGFONTID_MYURL 10
-#define MSGFONTID_YOURURL 11
-#define MSGFONTID_INFOBAR_NAME 12
-#define MSGFONTID_INFOBAR_STATUS 13
+#define MSGFONTID_INFOBAR_NAME 10
+#define MSGFONTID_INFOBAR_STATUS 11
void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour);
extern int fontOptionsListSize;
diff --git a/plugins/WinterSpeak/res/Speak.rc b/plugins/WinterSpeak/res/Speak.rc
index c62f905fcc..318ca0dc6b 100644
--- a/plugins/WinterSpeak/res/Speak.rc
+++ b/plugins/WinterSpeak/res/Speak.rc
@@ -62,8 +62,7 @@ BEGIN
CONTROL "Invisible",IDC_STATUS_INVISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,96,85,10
GROUPBOX "Occurring Events",IDC_STATIC,7,117,99,74
CONTROL "Incoming message",IDC_EVENT_MESSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,131,85,10
- CONTROL "Incoming URL",IDC_EVENT_URL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,142,85,10
- CONTROL "Incoming File",IDC_EVENT_FILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,153,85,10
+ CONTROL "Incoming File",IDC_EVENT_FILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,142,85,10
CONTROL "Authorization request",IDC_EVENT_AUTHREQUEST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,164,85,10
CONTROL "Added to contact list",IDC_EVENT_ADDED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,175,85,10
GROUPBOX "Status messages",IDC_STATIC,112,7,195,107
diff --git a/plugins/WinterSpeak/src/AnnounceDialog.cpp b/plugins/WinterSpeak/src/AnnounceDialog.cpp
index 75c4d947ee..eb07e5fa5b 100644
--- a/plugins/WinterSpeak/src/AnnounceDialog.cpp
+++ b/plugins/WinterSpeak/src/AnnounceDialog.cpp
@@ -65,7 +65,6 @@ void AnnounceDialog::command(HWND window, int control)
case IDC_SPEAK_STATUS_MSG:
case IDC_SUPPRESS_CONNECT:
case IDC_EVENT_MESSAGE:
- case IDC_EVENT_URL:
case IDC_EVENT_FILE:
case IDC_EVENT_AUTHREQUEST:
case IDC_EVENT_ADDED:
@@ -104,7 +103,6 @@ AnnounceDialog::load(HWND window)
CheckDlgButton(window, IDC_SUPPRESS_CONNECT, m_db.getStatusFlag(AnnounceDatabase::StatusFlag_SuppressConnect) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(window, IDC_EVENT_MESSAGE, m_db.getEventFlag(AnnounceDatabase::EventFlag_Message) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(window, IDC_EVENT_URL, m_db.getEventFlag(AnnounceDatabase::EventFlag_Url) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(window, IDC_EVENT_FILE, m_db.getEventFlag(AnnounceDatabase::EventFlag_File) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(window, IDC_EVENT_AUTHREQUEST, m_db.getEventFlag(AnnounceDatabase::EventFlag_AuthRequest) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(window, IDC_EVENT_ADDED, m_db.getEventFlag(AnnounceDatabase::EventFlag_Added) ? BST_CHECKED : BST_UNCHECKED);
@@ -133,7 +131,6 @@ AnnounceDialog::save(HWND window)
m_db.setStatusFlag(AnnounceDatabase::StatusFlag_SuppressConnect, (IsDlgButtonChecked(window, IDC_SUPPRESS_CONNECT) != 0));
m_db.setEventFlag(AnnounceDatabase::EventFlag_Message, (IsDlgButtonChecked(window, IDC_EVENT_MESSAGE) != 0));
- m_db.setEventFlag(AnnounceDatabase::EventFlag_Url, (IsDlgButtonChecked(window, IDC_EVENT_URL) != 0));
m_db.setEventFlag(AnnounceDatabase::EventFlag_File, (IsDlgButtonChecked(window, IDC_EVENT_FILE) != 0));
m_db.setEventFlag(AnnounceDatabase::EventFlag_AuthRequest, (IsDlgButtonChecked(window, IDC_EVENT_AUTHREQUEST) != 0));
m_db.setEventFlag(AnnounceDatabase::EventFlag_Added, (IsDlgButtonChecked(window, IDC_EVENT_ADDED) != 0));
diff --git a/plugins/WinterSpeak/src/resource.h b/plugins/WinterSpeak/src/resource.h
index d15b8b8c9a..a4e8e7ed1c 100644
--- a/plugins/WinterSpeak/src/resource.h
+++ b/plugins/WinterSpeak/src/resource.h
@@ -36,7 +36,6 @@
#define IDC_STATUS_INVISIBLE 1107
#define IDC_SPEAK_STATUS_MSG 1108
#define IDC_EVENT_MESSAGE 1109
-#define IDC_EVENT_URL 1110
#define IDC_EVENT_FILE 1111
#define IDC_EVENT_AUTHREQUEST 1112
#define IDC_EVENT_ADDED 1113