From c2e2c85262148dcf71450dfd3c7b33ef41eb84ec Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 Jan 2019 23:14:19 +0300 Subject: code cleaning - ACKTYPE_URL removed; - PF1_URL removed; - IEED_EVENT_URL removed; - another URL-related code cleaning --- plugins/BasicHistory/src/EventList.cpp | 5 - plugins/BasicHistory/src/Options.cpp | 1 - plugins/Clist_nicer/res/resource.rc | 40 --- plugins/Clist_nicer/src/clistmenus.cpp | 321 ----------------------- plugins/Clist_nicer/src/clistmod.cpp | 8 - plugins/Clist_nicer/src/resource.h | 1 - plugins/ExternalAPI/m_ieview.h | 1 - plugins/HistoryLinkListPlus/src/linklist.cpp | 3 +- plugins/HistoryLinkListPlus/src/linklist_fct.cpp | 2 +- plugins/HistoryStats/src/column_events.cpp | 3 - plugins/HistoryStats/src/contact.cpp | 6 - plugins/HistoryStats/src/contact.h | 4 - plugins/HistoryStats/src/statistic.h | 1 - plugins/IEHistory/src/dlgHandlers.cpp | 4 +- plugins/IEView/src/HTMLBuilder.cpp | 6 +- plugins/IEView/src/HistoryHTMLBuilder.cpp | 9 +- plugins/IEView/src/ScriverHTMLBuilder.cpp | 10 +- plugins/IEView/src/TabSRMMHTMLBuilder.cpp | 9 +- plugins/IEView/src/TemplateHTMLBuilder.cpp | 8 +- plugins/IgnoreState/src/main.cpp | 2 - plugins/Import/src/import.cpp | 4 - plugins/KeyboardNotify/src/ignore.cpp | 5 +- plugins/KeyboardNotify/src/main.cpp | 13 +- plugins/MenuItemEx/src/main.cpp | 2 - plugins/MirandaG15/src/CAppletManager.cpp | 7 - plugins/Msg_Export/src/utils.cpp | 14 +- plugins/NewAwaySysMod/src/MsgEventAdded.cpp | 3 +- plugins/NewEventNotify/src/popup.cpp | 18 -- plugins/Scriver/src/msgdialog.cpp | 2 +- plugins/Scriver/src/msglog.cpp | 11 +- plugins/SendScreenshotPlus/src/CSend.cpp | 4 - plugins/ShellExt/src/shlcom.cpp | 2 +- plugins/StatusChange/src/main.cpp | 4 - plugins/TabSRMM/src/msgdlgutils.cpp | 3 +- plugins/Variables/src/parse_miranda.cpp | 1 - plugins/Variables/src/parse_miranda.h | 1 - plugins/WinterSpeak/src/EventInformation.cpp | 1 - plugins/WinterSpeak/src/SpeakAnnounce.cpp | 4 - 38 files changed, 21 insertions(+), 522 deletions(-) (limited to 'plugins') diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 4906732d31..8e3b635be2 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -79,7 +79,6 @@ bool HistoryEventList::CanShowHistory(DBEVENTINFO* dbei) if (m_defFilter < 1) { switch (dbei->eventType) { case EVENTTYPE_MESSAGE: - case EVENTTYPE_URL: case EVENTTYPE_FILE: return true; @@ -123,7 +122,6 @@ bool HistoryEventList::CanShowHistory(const IImport::ExternalMessage &message) if (m_defFilter < 1) { switch (message.eventType) { case EVENTTYPE_MESSAGE: - case EVENTTYPE_URL: case EVENTTYPE_FILE: return true; } @@ -466,9 +464,6 @@ bool HistoryEventList::GetEventIcon(bool isMe, int eventType, int &id) case EVENTTYPE_FILE: id = iconsNum; return true; - case EVENTTYPE_URL: - id = iconsNum + 1; - return true; case EVENTTYPE_AUTHREQUEST: id = iconsNum + 2; return true; diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index 0190050341..797e41b92d 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -34,7 +34,6 @@ EventNames[] = { EVENTTYPE_MESSAGE, LPGENW("Message"), EVENTTYPE_FILE, LPGENW("File transfer"), - EVENTTYPE_URL, LPGENW("Link"), EVENTTYPE_AUTHREQUEST, LPGENW("Authorization request"), EVENTTYPE_ADDED, LPGENW("You were added"), EVENTTYPE_CONTACTS, LPGENW("Contacts received"), diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc index 8077d53857..5f1474bf7d 100644 --- a/plugins/Clist_nicer/res/resource.rc +++ b/plugins/Clist_nicer/res/resource.rc @@ -443,42 +443,6 @@ BEGIN PUSHBUTTON "Export to skin file",IDC_EXPORT,19,229,125,15 END -IDD_QUICKIGNORE DIALOGEX 0, 0, 357, 247 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Dialog" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Ignore these events",IDC_STATIC,7,3,197,85 - CONTROL "Messages",IDC_IGN_MSGEVENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,14,106,11 - CONTROL "Incoming file transfers",IDC_IGN_FILEEVENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,26,106,11 - CONTROL "URL events",IDC_IGN_URLEVENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,38,106,11 - CONTROL "Suppress auth requests",IDC_IGN_AUTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,50,182,11 - CONTROL "Suppress added notifications",IDC_IGN_ADD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,62,182,11 - CONTROL "Suppress online notifications",IDC_IGN_ONLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,74,182,11 - PUSHBUTTON "Ignore all",IDC_IGN_ALL,129,11,71,15 - PUSHBUTTON "Ignore none",IDC_IGN_NONE,129,33,71,15 - GROUPBOX "Visibility",IDC_STATIC,7,89,197,35 - CONTROL "Appear always online",IDC_IGN_ALWAYSONLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,98,182,11 - CONTROL "Appear always offline (block contact)",IDC_IGN_ALWAYSOFFLINE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,111,182,11 - GROUPBOX "Other",IDC_STATIC,7,125,197,96 - CONTROL "Hide this contact from the list",IDC_HIDECONTACT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,132,182,14 - LTEXT "To show a previously hidden contact, navigate to Options -> Contacts -> Ignore, search the contact in the list and tick the checkbox next to its name.",IDC_STATIC,18,146,182,34 - GROUPBOX "Display options",IDC_STATIC,209,3,143,218 - CONTROL "Show contact with priority",IDC_IGN_PRIORITY,"Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,219,13,127,11 - LTEXT "Show avatar:",IDC_STATIC,225,28,94,11 - COMBOBOX IDC_AVATARDISPMODE,219,38,127,56,CBS_DROPDOWNLIST | CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP - LTEXT "Show 2nd line:",IDC_STATIC,225,54,94,11 - COMBOBOX IDC_SECONDLINEMODE,219,64,127,56,CBS_DROPDOWNLIST | CBS_SORT | WS_DISABLED | WS_VSCROLL | WS_TABSTOP - CONTROL "",IDC_IGN_ADDPERMANENTLY,"MButtonClass",WS_TABSTOP,95,202,106,15,WS_EX_NOACTIVATE | 0x10000000L - PUSHBUTTON "OK",IDOK,211,228,65,14 - PUSHBUTTON "Cancel",IDCANCEL,284,228,65,14 - CONTROL "Draw overlay icon on avatar",IDC_OVERLAYICON,"Button",BS_AUTO3STATE | WS_TABSTOP,219,82,127,10 - CONTROL "Show local time",IDC_SHOWLOCALTIME1,"Button",BS_AUTO3STATE | WS_TABSTOP,219,94,127,10 - CONTROL "",IDC_DSP_LOADDEFAULT,"MButtonClass",WS_TABSTOP,213,202,135,15,WS_EX_NOACTIVATE | 0x10000000L -END - - #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -647,10 +611,6 @@ BEGIN IDD_OPT, DIALOG BEGIN END - - IDD_QUICKIGNORE, DIALOG - BEGIN - END END #endif // APSTUDIO_INVOKED diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index cc366e053c..e0aba7057a 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -45,331 +45,10 @@ INT_PTR CloseAction(WPARAM, LPARAM) return 0; } -static MWindowList hWindowListIGN = nullptr; - -// dialog procedure for handling the contact ignore dialog (available from the contact menu -static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA); - - switch (msg) { - case WM_INITDIALOG: - { - DWORD dwMask; - ClcContact *contact = nullptr; - int pCaps; - HWND hwndAdd; - - hContact = lParam; - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)hContact); - dwMask = db_get_dw(hContact, "Ignore", "Mask1", 0); - SendMessage(hWnd, WM_USER + 100, hContact, dwMask); - SendMessage(hWnd, WM_USER + 120, 0, 0); - TranslateDialogDefault(hWnd); - hwndAdd = GetDlgItem(hWnd, IDC_IGN_ADDPERMANENTLY); // CreateWindowEx(0, L"CLCButtonClass", L"FOO", WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_plugin.getInst(), NULL); - CustomizeButton(hwndAdd, false, true, false); - - SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT)); - SetWindowText(hwndAdd, TranslateT("Add permanently")); - EnableWindow(hwndAdd, g_plugin.getByte(hContact, "NotOnList")); - - hwndAdd = GetDlgItem(hWnd, IDC_DSP_LOADDEFAULT); // CreateWindowEx(0, L"CLCButtonClass", L"FOO", WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_plugin.getInst(), NULL); - CustomizeButton(hwndAdd, false, true, false); - - SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_DELETE)); - SetWindowText(hwndAdd, TranslateT("Revert to default")); - EnableWindow(hwndAdd, TRUE); - - SendDlgItemMessage(hWnd, IDC_AVATARDISPMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Default (global setting)")); - SendDlgItemMessage(hWnd, IDC_AVATARDISPMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Show always when available")); - SendDlgItemMessage(hWnd, IDC_AVATARDISPMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Hide always")); - - SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Default (global setting)")); - SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Never")); - SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Always")); - SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("When space is available")); - SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("When needed by status message")); - - if (cfg::clcdat) { - Clist_FindItem(g_clistApi.hwndContactTree, cfg::clcdat, hContact, &contact); - if (contact && contact->type != CLCIT_CONTACT) { - DestroyWindow(hWnd); - return FALSE; - } - else { - wchar_t szTitle[512]; - DWORD dwFlags = g_plugin.getDword(hContact, "CLN_Flags"); - BYTE bSecondLine = g_plugin.getByte(hContact, "CLN_2ndline", -1); - - mir_snwprintf(szTitle, TranslateT("Contact list display and ignore options for %s"), contact ? contact->szText : Clist_GetContactDisplayName(hContact)); - - SetWindowText(hWnd, szTitle); - Window_SetSkinIcon_IcoLib(hWnd, SKINICON_OTHER_MIRANDA); - pCaps = CallProtoService(contact ? contact->pce->szProto : GetContactProto(hContact), PS_GETCAPS, PFLAGNUM_1, 0); - Utils::enableDlgControl(hWnd, IDC_IGN_ALWAYSONLINE, pCaps & PF1_INVISLIST ? TRUE : FALSE); - Utils::enableDlgControl(hWnd, IDC_IGN_ALWAYSOFFLINE, pCaps & PF1_VISLIST ? TRUE : FALSE); - CheckDlgButton(hWnd, IDC_IGN_PRIORITY, g_plugin.getByte(hContact, "Priority") ? BST_CHECKED : BST_UNCHECKED); - Utils::enableDlgControl(hWnd, IDC_IGN_PRIORITY, TRUE); - Utils::enableDlgControl(hWnd, IDC_AVATARDISPMODE, TRUE); - Utils::enableDlgControl(hWnd, IDC_SECONDLINEMODE, TRUE); - if (dwFlags & ECF_FORCEAVATAR) - SendDlgItemMessage(hWnd, IDC_AVATARDISPMODE, CB_SETCURSEL, 1, 0); - else if (dwFlags & ECF_HIDEAVATAR) - SendDlgItemMessage(hWnd, IDC_AVATARDISPMODE, CB_SETCURSEL, 2, 0); - else - SendDlgItemMessage(hWnd, IDC_AVATARDISPMODE, CB_SETCURSEL, 0, 0); - - if (dwFlags & ECF_FORCEOVERLAY) - CheckDlgButton(hWnd, IDC_OVERLAYICON, BST_CHECKED); - else if (dwFlags & ECF_HIDEOVERLAY) - CheckDlgButton(hWnd, IDC_OVERLAYICON, BST_UNCHECKED); - else - CheckDlgButton(hWnd, IDC_OVERLAYICON, BST_INDETERMINATE); - - if (dwFlags & ECF_FORCELOCALTIME) - CheckDlgButton(hWnd, IDC_SHOWLOCALTIME1, BST_CHECKED); - else if (dwFlags & ECF_HIDELOCALTIME) - CheckDlgButton(hWnd, IDC_SHOWLOCALTIME1, BST_UNCHECKED); - else - CheckDlgButton(hWnd, IDC_SHOWLOCALTIME1, BST_INDETERMINATE); - - if (bSecondLine == 0xff) - SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_SETCURSEL, 0, 0); - else - SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_SETCURSEL, (WPARAM)(bSecondLine + 1), 0); - } - } - WindowList_Add(hWindowListIGN, hWnd, hContact); - ShowWindow(hWnd, SW_SHOWNORMAL); - } - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDC_IGN_PRIORITY: - SendMessage(g_clistApi.hwndContactTree, CLM_TOGGLEPRIORITYCONTACT, hContact, 0); - return 0; - - case IDC_IGN_ALL: - SendMessage(hWnd, WM_USER + 100, hContact, (LPARAM)0xffffffff); - return 0; - - case IDC_IGN_NONE: - SendMessage(hWnd, WM_USER + 100, hContact, 0); - return 0; - - case IDC_IGN_ALWAYSONLINE: - if (IsDlgButtonChecked(hWnd, IDC_IGN_ALWAYSONLINE)) - CheckDlgButton(hWnd, IDC_IGN_ALWAYSOFFLINE, BST_UNCHECKED); - break; - - case IDC_IGN_ALWAYSOFFLINE: - if (IsDlgButtonChecked(hWnd, IDC_IGN_ALWAYSOFFLINE)) - CheckDlgButton(hWnd, IDC_IGN_ALWAYSONLINE, BST_UNCHECKED); - break; - - case IDC_HIDECONTACT: - g_plugin.setByte(hContact, "Hidden", (BYTE)(IsDlgButtonChecked(hWnd, IDC_HIDECONTACT) ? 1 : 0)); - break; - - case IDC_IGN_ADDPERMANENTLY: - Contact_Add(hContact, hWnd); - Utils::enableDlgControl(hWnd, IDC_IGN_ADDPERMANENTLY, g_plugin.getByte(hContact, "NotOnList")); - break; - - case IDC_DSP_LOADDEFAULT: - SendDlgItemMessage(hWnd, IDC_AVATARDISPMODE, CB_SETCURSEL, 0, 0); - SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_SETCURSEL, 0, 0); - CheckDlgButton(hWnd, IDC_OVERLAYICON, BST_INDETERMINATE); - CheckDlgButton(hWnd, IDC_LOCALTIME, BST_INDETERMINATE); - break; - - case IDOK: - { - DWORD newMask = 0; - ClcContact *contact = nullptr; - - SendMessage(hWnd, WM_USER + 110, 0, (LPARAM)&newMask); - db_set_dw(hContact, "Ignore", "Mask1", newMask); - SendMessage(hWnd, WM_USER + 130, 0, 0); - - if (cfg::clcdat) { - LRESULT iSel = SendDlgItemMessage(hWnd, IDC_AVATARDISPMODE, CB_GETCURSEL, 0, 0); - DWORD dwFlags = g_plugin.getDword(hContact, "CLN_Flags"), dwXMask = 0; - LRESULT checked = 0; - - Clist_FindItem(g_clistApi.hwndContactTree, cfg::clcdat, hContact, &contact); - if (iSel != CB_ERR) { - dwFlags &= ~(ECF_FORCEAVATAR | ECF_HIDEAVATAR); - - if (iSel == 1) - dwFlags |= ECF_FORCEAVATAR; - else if (iSel == 2) - dwFlags |= ECF_HIDEAVATAR; - if (contact) - LoadAvatarForContact(contact); - } - - dwFlags &= ~(ECF_FORCEOVERLAY | ECF_HIDEOVERLAY | ECF_FORCELOCALTIME | ECF_HIDELOCALTIME); - - checked = IsDlgButtonChecked(hWnd, IDC_OVERLAYICON); - if (checked == BST_CHECKED) - dwFlags |= ECF_FORCEOVERLAY; - else if (checked == BST_UNCHECKED) - dwFlags |= ECF_HIDEOVERLAY; - - checked = IsDlgButtonChecked(hWnd, IDC_SHOWLOCALTIME1); - if (checked == BST_CHECKED) - dwFlags |= ECF_FORCELOCALTIME; - else if (checked == BST_UNCHECKED) - dwFlags |= ECF_HIDELOCALTIME; - - g_plugin.setDword(hContact, "CLN_Flags", dwFlags); - - if ((iSel = SendDlgItemMessage(hWnd, IDC_SECONDLINEMODE, CB_GETCURSEL, 0, 0)) != CB_ERR) { - if (iSel == 0) { - g_plugin.delSetting(hContact, "CLN_2ndline"); - if (contact) - contact->bSecondLine = cfg::dat.dualRowMode; - } - else { - g_plugin.setByte(hContact, "CLN_2ndline", (BYTE)(iSel - 1)); - if (contact) - contact->bSecondLine = (BYTE)(iSel - 1); - } - } - g_plugin.setDword(hContact, "CLN_xmask", dwXMask); - if (contact) { - if (contact->pExtra) - contact->pExtra->dwDFlags = dwFlags; - } - else { - TExtraCache *p = cfg::getCache(hContact, nullptr); - if (p) - p->dwDFlags = dwFlags; - } - g_plugin.setByte(hContact, "Priority", (BYTE)(IsDlgButtonChecked(hWnd, IDC_IGN_PRIORITY) ? 1 : 0)); - Clist_Broadcast(CLM_AUTOREBUILD, 0, 0); - } - } - case IDCANCEL: - DestroyWindow(hWnd); - break; - } - break; - - case WM_USER + 100: // fill dialog (wParam = hContact, lParam = mask) - CheckDlgButton(hWnd, IDC_IGN_MSGEVENTS, lParam & (1 << (IGNOREEVENT_MESSAGE - 1)) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hWnd, IDC_IGN_FILEEVENTS, lParam & (1 << (IGNOREEVENT_FILE - 1)) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hWnd, IDC_IGN_URLEVENTS, lParam & (1 << (IGNOREEVENT_URL - 1)) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hWnd, IDC_IGN_AUTH, lParam & (1 << (IGNOREEVENT_AUTHORIZATION - 1)) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hWnd, IDC_IGN_ADD, lParam & (1 << (IGNOREEVENT_YOUWEREADDED - 1)) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hWnd, IDC_IGN_ONLINE, lParam & (1 << (IGNOREEVENT_USERONLINE - 1)) ? BST_CHECKED : BST_UNCHECKED); - return 0; - - case WM_USER + 110: // retrieve value - { - DWORD *dwNewMask = (DWORD *)lParam, dwMask = 0; - dwMask = (IsDlgButtonChecked(hWnd, IDC_IGN_MSGEVENTS) ? (1 << (IGNOREEVENT_MESSAGE - 1)) : 0) | - (IsDlgButtonChecked(hWnd, IDC_IGN_FILEEVENTS) ? (1 << (IGNOREEVENT_FILE - 1)) : 0) | - (IsDlgButtonChecked(hWnd, IDC_IGN_URLEVENTS) ? (1 << (IGNOREEVENT_URL - 1)) : 0) | - (IsDlgButtonChecked(hWnd, IDC_IGN_AUTH) ? (1 << (IGNOREEVENT_AUTHORIZATION - 1)) : 0) | - (IsDlgButtonChecked(hWnd, IDC_IGN_ADD) ? (1 << (IGNOREEVENT_YOUWEREADDED - 1)) : 0) | - (IsDlgButtonChecked(hWnd, IDC_IGN_ONLINE) ? (1 << (IGNOREEVENT_USERONLINE - 1)) : 0); - - if (dwNewMask) - *dwNewMask = dwMask; - } - return 0; - - case WM_USER + 120: // set visibility status - { - ClcContact *contact = nullptr; - if (Clist_FindItem(g_clistApi.hwndContactTree, cfg::clcdat, hContact, &contact)) { - if (contact) { - WORD wApparentMode = db_get_w(contact->hContact, contact->pce->szProto, "ApparentMode", 0); - - CheckDlgButton(hWnd, IDC_IGN_ALWAYSOFFLINE, wApparentMode == ID_STATUS_OFFLINE ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hWnd, IDC_IGN_ALWAYSONLINE, wApparentMode == ID_STATUS_ONLINE ? BST_CHECKED : BST_UNCHECKED); - } - } - } - return 0; - - case WM_USER + 130: // update apparent mode - { - ClcContact *contact = nullptr; - if (Clist_FindItem(g_clistApi.hwndContactTree, cfg::clcdat, hContact, &contact)) { - if (contact) { - WORD wApparentMode = 0; - - if (IsDlgButtonChecked(hWnd, IDC_IGN_ALWAYSONLINE)) - wApparentMode = ID_STATUS_ONLINE; - else if (IsDlgButtonChecked(hWnd, IDC_IGN_ALWAYSOFFLINE)) - wApparentMode = ID_STATUS_OFFLINE; - - ProtoChainSend(hContact, PSS_SETAPPARENTMODE, (WPARAM)wApparentMode, 0); - SendMessage(hWnd, WM_USER + 120, 0, 0); - } - } - } - return 0; - - case WM_DESTROY: - SetWindowLongPtr(hWnd, GWLP_USERDATA, 0); - WindowList_Remove(hWindowListIGN, hWnd); - break; - } - return FALSE; -} - -/* - * service function: Open ignore settings dialog for the contact handle in wParam - * (clist_nicer+ specific service) - * - * Servicename = CList/SetContactIgnore - * - * ensure that dialog is only opened once (the dialog proc saves the window handle of an open dialog - * of this type to the contacts database record). - * - * if dialog is already open, focus it. - */ - -static INT_PTR SetContactIgnore(WPARAM wParam, LPARAM) -{ - HWND hWnd = nullptr; - - if (hWindowListIGN == nullptr) - hWindowListIGN = WindowList_Create(); - - hWnd = WindowList_Find(hWindowListIGN, wParam); - if (wParam) { - if (hWnd == nullptr) - CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_QUICKIGNORE), nullptr, IgnoreDialogProc, (LPARAM)wParam); - else if (IsWindow(hWnd)) - SetFocus(hWnd); - } - return 0; -} - int InitCustomMenus(void) { InitIconLibMenuIcons(); CreateServiceFunction("CloseAction", CloseAction); - CreateServiceFunction("CList/SetContactIgnore", SetContactIgnore); - - CMenuItem mi(&g_plugin); - SET_UID(mi, 0xe3b08c6f, 0x8a01, 0x4c94, 0xb3, 0xf5, 0x9d, 0x38, 0x6, 0x63, 0x7a, 0xa9); - mi.position = 200000; - mi.pszService = "CList/SetContactIgnore"; - mi.hIcolibItem = iconItem[0].hIcolib; - mi.name.a = LPGEN("&Contact list settings..."); - Menu_AddContactMenuItem(&mi); return 0; } - -void UninitCustomMenus(void) -{ - WindowList_Destroy(hWindowListIGN); -} diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index bde5b10618..d4c08d0897 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" int InitCustomMenus(void); -void UninitCustomMenus(void); INT_PTR GetContactStatusMessage(WPARAM wParam, LPARAM lParam); @@ -57,15 +56,8 @@ int IconFromStatusMode(const char *szProto, int status, MCONTACT hContact) return coreCli.pfnIconFromStatusMode(szFinalProto, finalStatus, hContact); } -static int ContactListShutdownProc(WPARAM, LPARAM) -{ - UninitCustomMenus(); - return 0; -} - int LoadContactListModule(void) { - HookEvent(ME_SYSTEM_SHUTDOWN, ContactListShutdownProc); CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode); hSvc_GetContactStatusMsg = CreateServiceFunction("CList/GetContactStatusMsg", GetContactStatusMessage); diff --git a/plugins/Clist_nicer/src/resource.h b/plugins/Clist_nicer/src/resource.h index dba210f3bb..57072d9256 100644 --- a/plugins/Clist_nicer/src/resource.h +++ b/plugins/Clist_nicer/src/resource.h @@ -4,7 +4,6 @@ // #define IDD_OPT_VIEWMODES 1 #define IDD_OPT_SKIN 4 -#define IDD_QUICKIGNORE 5 #define IDD_OPT 6 #define IDD_EXCEPTION 20 #define IDD_OPT_CLIST 126 diff --git a/plugins/ExternalAPI/m_ieview.h b/plugins/ExternalAPI/m_ieview.h index 85c2b7276c..e5fd6c713b 100644 --- a/plugins/ExternalAPI/m_ieview.h +++ b/plugins/ExternalAPI/m_ieview.h @@ -74,7 +74,6 @@ typedef struct { #define IEED_EVENT_MESSAGE 0x0001 // message #define IEED_EVENT_STATUSCHANGE 0x0002 // status change #define IEED_EVENT_FILE 0x0003 // file -#define IEED_EVENT_URL 0x0004 // url #define IEED_EVENT_ERRMSG 0x0005 // error message #define IEED_EVENT_SYSTEM 0x0006 // system event diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp index 3941ac8bbf..4715aa8bd2 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist.cpp @@ -95,7 +95,7 @@ static INT_PTR LinkList_Main(WPARAM hContact, LPARAM) memset(listStart, 0, sizeof(LISTELEMENT)); for (;;) { - if (dbe.eventType == EVENTTYPE_URL || dbe.eventType == EVENTTYPE_MESSAGE) { + if (dbe.eventType == EVENTTYPE_MESSAGE) { // Call function to find URIs if (ExtractURI(&dbe, hEvent, listStart) < 0) { mir_free(dbe.pBlob); @@ -104,6 +104,7 @@ static INT_PTR LinkList_Main(WPARAM hContact, LPARAM) return -1; } } + actCount++; if (((int)(((float)actCount / histCount) * 100.00)) % 10 == 0) SendMessage(hWndProgress, WM_COMMAND, 100, ((int)(((float)actCount / histCount) * 100.00))); diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index 4e8f903892..dcfbe5711f 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -1185,7 +1185,7 @@ int DBUpdate(WPARAM wParam, LPARAM hEvent) dbe.cbBlob = db_event_getBlobSize(hEvent); dbe.pBlob = (PBYTE)mir_alloc((size_t)dbe.cbBlob + 1); db_event_get(hEvent, &dbe); - if (dbe.eventType == EVENTTYPE_URL || dbe.eventType == EVENTTYPE_MESSAGE) { + if (dbe.eventType == EVENTTYPE_MESSAGE) { // Call function to find URIs linkNum = ExtractURI(&dbe, hEvent, DlgParam->listStart); if (linkNum > 0) diff --git a/plugins/HistoryStats/src/column_events.cpp b/plugins/HistoryStats/src/column_events.cpp index 016558f0ca..db230e666f 100644 --- a/plugins/HistoryStats/src/column_events.cpp +++ b/plugins/HistoryStats/src/column_events.cpp @@ -78,9 +78,6 @@ void ColEvents::impl_outputRenderHeader(ext::ostream& tos, int row, int rowSpan) void ColEvents::impl_outputRenderRow(ext::ostream& tos, const Contact& contact, DisplayType) { static int (Contact::*getData[6])() const = { - &Contact::getInUrls, - &Contact::getOutUrls, - &Contact::getTotalUrls, &Contact::getInFiles, &Contact::getOutFiles, &Contact::getTotalFiles, diff --git a/plugins/HistoryStats/src/contact.cpp b/plugins/HistoryStats/src/contact.cpp index 8a03c1b746..433ec64da9 100644 --- a/plugins/HistoryStats/src/contact.cpp +++ b/plugins/HistoryStats/src/contact.cpp @@ -19,7 +19,6 @@ Contact::Contact(Statistic* pStatistic, int nSlots, const ext::string& nick, con m_ChatDurMin(0xFFFFFFFF), m_ChatDurMax(0), m_ChatDurSum(0), - m_Urls(0, 0), m_Files(0, 0), m_NumContacts(nContacts), m_NumSubcontacts(nSubcontacts), @@ -89,10 +88,6 @@ void Contact::addEvent(WORD eventType, bool bOutgoing) InOut* pIO = nullptr; switch (eventType) { - case EVENTTYPE_URL: - pIO = &m_Urls; - break; - case EVENTTYPE_FILE: pIO = &m_Files; break; @@ -135,7 +130,6 @@ void Contact::merge(const Contact& other) } m_Files += other.m_Files; - m_Urls += other.m_Urls; m_NumContacts += other.m_NumContacts; m_NumSubcontacts += other.m_NumSubcontacts; diff --git a/plugins/HistoryStats/src/contact.h b/plugins/HistoryStats/src/contact.h index 5d73f1c91d..719a2b4a21 100644 --- a/plugins/HistoryStats/src/contact.h +++ b/plugins/HistoryStats/src/contact.h @@ -36,7 +36,6 @@ private: DWORD m_FirstTime; DWORD m_LastTime; InOut m_Files; - InOut m_Urls; int m_NumContacts; int m_NumSubcontacts; @@ -94,9 +93,6 @@ public: DWORD getLastTime() const { return m_LastTime; } // files and URLs - int getOutUrls() const { return m_Urls.out; } - int getInUrls() const { return m_Urls.in; } - int getTotalUrls() const { return m_Urls.total(); } int getOutFiles() const { return m_Files.out; } int getInFiles() const { return m_Files.in; } int getTotalFiles() const { return m_Files.total(); } diff --git a/plugins/HistoryStats/src/statistic.h b/plugins/HistoryStats/src/statistic.h index fc4f2cacb0..b0de0b3392 100644 --- a/plugins/HistoryStats/src/statistic.h +++ b/plugins/HistoryStats/src/statistic.h @@ -37,7 +37,6 @@ public: etMessage = EVENTTYPE_MESSAGE, // other events etFile = EVENTTYPE_FILE, - etURL = EVENTTYPE_URL, etICQSMS = ICQEVENTTYPE_SMS, etICQWebPager = ICQEVENTTYPE_WEBPAGER, etICQEMailExpress = ICQEVENTTYPE_EMAILEXPRESS, diff --git a/plugins/IEHistory/src/dlgHandlers.cpp b/plugins/IEHistory/src/dlgHandlers.cpp index 5f75aaac66..441495a4f6 100644 --- a/plugins/IEHistory/src/dlgHandlers.cpp +++ b/plugins/IEHistory/src/dlgHandlers.cpp @@ -129,10 +129,8 @@ void FillIEViewInfo(IEVIEWEVENTDATA *fillData, DBEVENTINFO dbInfo, PBYTE blob) case EVENTTYPE_FILE: fillData->iType = IEED_EVENT_FILE; break; - case EVENTTYPE_URL: - fillData->iType = IEED_EVENT_URL; - break; } + fillData->pszNick = ""; fillData->bIsMe = (dbInfo.flags & DBEF_SENT); fillData->dwFlags = (dbInfo.flags & DBEF_SENT) ? IEEDF_SENT : 0; diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index 7d0c7a278d..e8aaaf2119 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -253,7 +253,7 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) } dbei.pBlob = (PBYTE)malloc(dbei.cbBlob); db_event_get(hDbEvent, &dbei); - if (!(dbei.flags & DBEF_SENT) && (dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_URL)) { + if (!(dbei.flags & DBEF_SENT) && dbei.eventType == EVENTTYPE_MESSAGE) { db_event_markRead(event->hContact, hDbEvent); g_clistApi.pfnRemoveEvent(event->hContact, hDbEvent); } @@ -282,12 +282,10 @@ void HTMLBuilder::appendEventOld(IEView *view, IEVIEWEVENT *event) eventData->pszNickW = getContactName(event->hContact, szProto); eventData->bIsMe = FALSE; } - if (dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_URL || Utils::DbEventIsForMsgWindow(&dbei)) { + if (dbei.eventType == EVENTTYPE_MESSAGE || Utils::DbEventIsForMsgWindow(&dbei)) { eventData->pszTextW = DbEvent_GetTextW(&dbei, newEvent.codepage); if (dbei.eventType == EVENTTYPE_MESSAGE) eventData->iType = IEED_EVENT_MESSAGE; - else if (dbei.eventType == EVENTTYPE_URL) - eventData->iType = IEED_EVENT_URL; else eventData->iType = IEED_EVENT_STATUSCHANGE; } diff --git a/plugins/IEView/src/HistoryHTMLBuilder.cpp b/plugins/IEView/src/HistoryHTMLBuilder.cpp index 9160daf897..11725edb12 100644 --- a/plugins/IEView/src/HistoryHTMLBuilder.cpp +++ b/plugins/IEView/src/HistoryHTMLBuilder.cpp @@ -226,8 +226,7 @@ void HistoryHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event for (int eventIdx = 0; eventData != nullptr && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) { CMStringA str; bool isSent = (eventData->dwFlags & IEEDF_SENT) != 0; - if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_STATUSCHANGE || - eventData->iType == IEED_EVENT_URL || eventData->iType == IEED_EVENT_FILE) + if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_STATUSCHANGE || eventData->iType == IEED_EVENT_FILE) { ptrA szName, szText; if (eventData->dwFlags & IEEDF_UNICODE_NICK) @@ -250,10 +249,6 @@ void HistoryHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event iconFile = "file.gif"; str.AppendFormat("
", isSent ? "divFileOut" : "divFileIn"); break; - case IEED_EVENT_URL: - iconFile = "url.gif"; - str.AppendFormat("
", isSent ? "divUrlOut" : "divUrlIn"); - break; default: iconFile = "message.gif"; str.AppendFormat("
", isSent ? "divMessageOut" : "divMessageIn"); @@ -267,8 +262,6 @@ void HistoryHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event str.AppendFormat("%s
", isSent ? "timeOut" : "timeIn", timestampToString(eventData->time)); if (eventData->iType == IEED_EVENT_FILE) str.AppendFormat("%s:
%s", isSent ? Translate("Outgoing File Transfer") : Translate("Incoming File Transfer"), szText); - else if (eventData->iType == IEED_EVENT_URL) - str.AppendFormat("%s:
%s", isSent ? Translate("URL sent") : Translate("URL received"), szText); else str.AppendFormat("%s", szText); diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp index 8283b2e474..8157734247 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.cpp +++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp @@ -73,8 +73,6 @@ bool ScriverHTMLBuilder::isDbEventShown(DBEVENTINFO * dbei) switch (dbei->eventType) { case EVENTTYPE_MESSAGE: return 1; - case EVENTTYPE_URL: - return 1; case EVENTTYPE_FILE: return 1; default: @@ -282,7 +280,7 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event bool isSent = (eventData->dwFlags & IEEDF_SENT) != 0; 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) { + if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_STATUSCHANGE || 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 && @@ -323,8 +321,6 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event iconFile = isSent ? "message_out.gif" : "message_in.gif"; else if (eventData->iType == IEED_EVENT_FILE) iconFile = "file.gif"; - else if (eventData->iType == IEED_EVENT_URL) - iconFile = "url.gif"; else if (eventData->iType == IEED_EVENT_STATUSCHANGE) iconFile = "status.gif"; @@ -390,10 +386,6 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event str.AppendFormat("%s: %s", className, (isSent) ? Translate("File sent") : Translate("File received"), szText); } - else if (eventData->iType == IEED_EVENT_URL) { - str.AppendFormat("%s: %s", className, - (isSent) ? Translate("URL sent") : Translate("URL received"), szText); - } else str.AppendFormat("%s", className, szText); str.Append("
\n"); diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp index 22540d802d..d4910a93c9 100644 --- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp +++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp @@ -87,9 +87,6 @@ bool TabSRMMHTMLBuilder::isDbEventShown(DWORD dwFlags, DBEVENTINFO *dbei) switch (dbei->eventType) { case EVENTTYPE_MESSAGE: return 1; - case EVENTTYPE_URL: - if (dwFlags & MWF_SHOW_URLEVENTS) return 1; - break; case EVENTTYPE_FILE: if (dwFlags & MWF_SHOW_FILEEVENTS) return 1; break; @@ -304,7 +301,7 @@ void TabSRMMHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event char *szRealProto = getRealProto(event->hContact); IEVIEWEVENTDATA* eventData = event->eventData; for (int eventIdx = 0; eventData != nullptr && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) { - if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_FILE || eventData->iType == IEED_EVENT_URL || eventData->iType == IEED_EVENT_STATUSCHANGE) { + if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_FILE || eventData->iType == IEED_EVENT_STATUSCHANGE) { bool isGroupBreak = true; bool isSent = (eventData->dwFlags & IEEDF_SENT) != 0; bool isRTL = (eventData->dwFlags & IEEDF_RTL) != 0; @@ -343,8 +340,6 @@ void TabSRMMHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event } else if (eventData->iType == IEED_EVENT_FILE) iconFile = "file.gif"; - else if (eventData->iType == IEED_EVENT_URL) - iconFile = "url.gif"; else if (eventData->iType == IEED_EVENT_STATUSCHANGE) iconFile = "status.gif"; @@ -399,8 +394,6 @@ void TabSRMMHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event } else if (eventData->iType == IEED_EVENT_FILE) className = isHistory ? "hMiscIn" : "miscIn"; - else if (eventData->iType == IEED_EVENT_URL) - className = isHistory ? "hMiscIn" : "miscIn"; else if (eventData->iType == IEED_EVENT_STATUSCHANGE) className = "statusChange"; diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 84086986c6..a391525b60 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -358,7 +358,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, IEVIEWEVENTDATA* eventData = event->eventData; for (int eventIdx = 0; eventData != nullptr && (eventIdx < event->count || event->count == -1); eventData = eventData->next, eventIdx++) { - if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_STATUSCHANGE || eventData->iType == IEED_EVENT_FILE || eventData->iType == IEED_EVENT_URL || eventData->iType == IEED_EVENT_SYSTEM) { + if (eventData->iType == IEED_EVENT_MESSAGE || eventData->iType == IEED_EVENT_STATUSCHANGE || eventData->iType == IEED_EVENT_FILE || eventData->iType == IEED_EVENT_SYSTEM) { CMStringA str; bool isSent = (eventData->dwFlags & IEEDF_SENT) != 0; bool isRTL = (eventData->dwFlags & IEEDF_RTL) && tmpm->isRTL(); @@ -429,12 +429,6 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, if (tmplt == nullptr) tmpltName[1] = isHistory ? "hFile" : "File"; } - else if (eventData->iType == IEED_EVENT_URL) { - tmpltName[1] = isHistory ? isSent ? "hURLOut" : "hURLIn" : isSent ? "URLOut" : "URLIn"; - Template *tmplt = (tmpm == nullptr) ? nullptr : tmpm->getTemplate(tmpltName[1]); - if (tmplt == nullptr) - tmpltName[1] = isHistory ? "hURL" : "URL"; - } else if (eventData->iType == IEED_EVENT_STATUSCHANGE || (eventData->iType == IEED_EVENT_SYSTEM)) tmpltName[1] = isHistory ? "hStatus" : "Status"; diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp index 6923074d1e..1776080f67 100644 --- a/plugins/IgnoreState/src/main.cpp +++ b/plugins/IgnoreState/src/main.cpp @@ -33,11 +33,9 @@ INT clistIcon = 0; //Icon slot to use IGNOREITEMS ii[] = { { LPGENW("All"), IGNOREEVENT_ALL, SKINICON_OTHER_FILLEDBLOB }, { LPGENW("Messages"), IGNOREEVENT_MESSAGE, SKINICON_EVENT_MESSAGE }, - { LPGENW("URL"), IGNOREEVENT_URL, SKINICON_EVENT_URL }, { LPGENW("Files"), IGNOREEVENT_FILE, SKINICON_EVENT_FILE }, { LPGENW("User Online"), IGNOREEVENT_USERONLINE, SKINICON_OTHER_USERONLINE }, { LPGENW("Authorization"), IGNOREEVENT_AUTHORIZATION, SKINICON_OTHER_MIRANDA }, - { LPGENW("You Were Added"), IGNOREEVENT_YOUWEREADDED, SKINICON_OTHER_ADDCONTACT }, { LPGENW("Typing Notify"), IGNOREEVENT_TYPINGNOTIFY, SKINICON_OTHER_TYPING } }; diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 5ad7298758..b0a3a5345a 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -956,10 +956,6 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC if ((bIsSent ? IOPT_FILESENT : IOPT_FILERECV) & g_iImportOptions) bSkipThis = false; break; - case EVENTTYPE_URL: - if ((bIsSent ? IOPT_URLSENT : IOPT_URLRECV) & g_iImportOptions) - bSkipThis = false; - break; default: if ((bIsSent ? IOPT_OTHERSENT : IOPT_OTHERRECV) & g_iImportOptions) bSkipThis = false; diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp index 190f82cf82..124ef7b51b 100644 --- a/plugins/KeyboardNotify/src/ignore.cpp +++ b/plugins/KeyboardNotify/src/ignore.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IDI_FILLEDBLOB 212 #define IDI_EMPTYBLOB 213 -static const DWORD ignoreIdToPf1[IGNOREEVENT_MAX] = {PF1_IMRECV, PF1_URLRECV, PF1_FILERECV, 0xFFFFFFFF}; +static const DWORD ignoreIdToPf1[IGNOREEVENT_MAX] = {PF1_IMRECV, 0xFFFFFFFF, PF1_FILERECV, 0xFFFFFFFF}; static DWORD GetMask(MCONTACT hContact) { @@ -328,9 +328,6 @@ BOOL IsIgnored(MCONTACT hContact, WORD eventType) case EVENTTYPE_MESSAGE: ignoreID = 0; break; - case EVENTTYPE_URL: - ignoreID = 1; - break; case EVENTTYPE_FILE: ignoreID = 2; break; diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 7c621d3073..d10bbdb9af 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -251,9 +251,8 @@ BOOL checkUnopenEvents() DBEVENTINFO einfo = readEventInfo(pCLEvent->hDbEvent, pCLEvent->hContact); if ((einfo.eventType == EVENTTYPE_MESSAGE && bFlashOnMsg) || - (einfo.eventType == EVENTTYPE_URL && bFlashOnURL) || (einfo.eventType == EVENTTYPE_FILE && bFlashOnFile) || - (einfo.eventType != EVENTTYPE_MESSAGE && einfo.eventType != EVENTTYPE_URL && einfo.eventType != EVENTTYPE_FILE && bFlashOnOther)) + (einfo.eventType != EVENTTYPE_MESSAGE && einfo.eventType != EVENTTYPE_FILE && bFlashOnOther)) if (metaCheckProtocol(einfo.szModule, pCLEvent->hContact, einfo.eventType)) return TRUE; @@ -396,9 +395,8 @@ static int PluginMessageEventHook(WPARAM hContact, LPARAM hEvent) DBEVENTINFO einfo = {}; if (!db_event_get(hEvent, &einfo) && !(einfo.flags & DBEF_SENT)) if ((einfo.eventType == EVENTTYPE_MESSAGE && bFlashOnMsg && checkOpenWindow(hContact) && checkMsgTimestamp(hContact, hEvent, einfo.timestamp)) || - (einfo.eventType == EVENTTYPE_URL && bFlashOnURL) || (einfo.eventType == EVENTTYPE_FILE && bFlashOnFile) || - (einfo.eventType != EVENTTYPE_MESSAGE && einfo.eventType != EVENTTYPE_URL && einfo.eventType != EVENTTYPE_FILE && bFlashOnOther)) { + (einfo.eventType != EVENTTYPE_MESSAGE && einfo.eventType != EVENTTYPE_FILE && bFlashOnOther)) { if (contactCheckProtocol(einfo.szModule, hContact, einfo.eventType) && checkNotifyOptions() && checkStatus(einfo.szModule) && checkXstatus(einfo.szModule)) @@ -427,9 +425,8 @@ static VOID CALLBACK ReminderTimer(HWND, UINT, UINT_PTR, DWORD) DBEVENTINFO einfo = readEventInfo(pCLEvent->hDbEvent, pCLEvent->hContact); if ((einfo.eventType == EVENTTYPE_MESSAGE && bFlashOnMsg) || - (einfo.eventType == EVENTTYPE_URL && bFlashOnURL) || (einfo.eventType == EVENTTYPE_FILE && bFlashOnFile) || - (einfo.eventType != EVENTTYPE_MESSAGE && einfo.eventType != EVENTTYPE_URL && einfo.eventType != EVENTTYPE_FILE && bFlashOnOther)) + (einfo.eventType != EVENTTYPE_MESSAGE && einfo.eventType != EVENTTYPE_FILE && bFlashOnOther)) if (metaCheckProtocol(einfo.szModule, pCLEvent->hContact, einfo.eventType) && checkNotifyOptions() && checkStatus(einfo.szModule) && checkXstatus(einfo.szModule)) { @@ -862,10 +859,6 @@ void countUnopenEvents(int *msgCount, int *fileCount, int *urlCount, int *otherC if (bFlashOnMsg) (*msgCount)++; break; - case EVENTTYPE_URL: - if (bFlashOnURL) - (*urlCount)++; - break; case EVENTTYPE_FILE: if (bFlashOnFile) (*fileCount)++; diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 8acee13959..49db1367f3 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -65,11 +65,9 @@ struct { static const ii[] = { { LPGENW("All"), IGNOREEVENT_ALL, SKINICON_OTHER_FILLEDBLOB }, { LPGENW("Messages"), IGNOREEVENT_MESSAGE, SKINICON_EVENT_MESSAGE }, - { LPGENW("URL"), IGNOREEVENT_URL, SKINICON_EVENT_URL }, { LPGENW("Files"), IGNOREEVENT_FILE, SKINICON_EVENT_FILE }, { LPGENW("User Online"), IGNOREEVENT_USERONLINE, SKINICON_OTHER_USERONLINE }, { LPGENW("Authorization"), IGNOREEVENT_AUTHORIZATION, SKINICON_AUTH_REQUEST }, - { LPGENW("You Were Added"), IGNOREEVENT_YOUWEREADDED, SKINICON_AUTH_ADD }, { LPGENW("Typing Notify"), IGNOREEVENT_TYPINGNOTIFY, SKINICON_OTHER_TYPING } }; diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 4d7bc37348..58cc434bc0 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -861,13 +861,6 @@ bool CAppletManager::TranslateDBEvent(CEvent *pEvent, WPARAM hContact, LPARAM hd pEvent->strDescription = strName + L": " + pEvent->strValue; pEvent->strSummary = TranslateString(L"New message from %s", strName.c_str()); break; - case EVENTTYPE_URL: - if (CConfig::GetBoolSetting(NOTIFY_URL)) - pEvent->bNotification = true; - - pEvent->eType = EVENT_URL; - pEvent->strDescription = TranslateString(L"Incoming URL from %s", strName.c_str()); - break; case EVENTTYPE_CONTACTS: if (CConfig::GetBoolSetting(NOTIFY_CONTACTS)) pEvent->bNotification = true; diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index 8b629bd6a4..d79a2537de 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -831,20 +831,10 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, wstring sFilePath bWriteIndentedToFile(hFile, nIndent, ptrW(DbEvent_GetTextW(&dbei, CP_ACP)), bWriteUTF8Format); break; - case EVENTTYPE_URL: case EVENTTYPE_FILE: { - const wchar_t *pszType; - const char *pszData; - - if (dbei.eventType == EVENTTYPE_URL) { - pszType = LPGENW("URL: "); - pszData = (char *)dbei.pBlob; - } - else { - pszType = LPGENW("File: "); - pszData = (char *)(dbei.pBlob + sizeof(DWORD)); - } + const wchar_t *pszType = LPGENW("File: "); + const char *pszData = (char *)(dbei.pBlob + sizeof(DWORD)); int nLen = (int)mir_strlen(pszData); if ((pszData - (char *)dbei.pBlob) + nLen < (int)dbei.cbBlob) { diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp index 7efc0dfde2..c3cfb99c54 100644 --- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp +++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp @@ -110,7 +110,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam) if (!hContact) return 0; - if (dbei->flags & DBEF_SENT || (dbei->eventType != EVENTTYPE_MESSAGE && dbei->eventType != EVENTTYPE_URL && dbei->eventType != EVENTTYPE_FILE)) + if (dbei->flags & DBEF_SENT || (dbei->eventType != EVENTTYPE_MESSAGE && dbei->eventType != EVENTTYPE_FILE)) return 0; if (time(0) - dbei->timestamp > MAX_REPLY_TIMEDIFF) // don't reply to offline messages @@ -209,7 +209,6 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam) return 0; if ((dbei->eventType == EVENTTYPE_MESSAGE && !AutoreplyOptData.GetValue(IDC_REPLYDLG_EVENTMSG)) || - (dbei->eventType == EVENTTYPE_URL && !AutoreplyOptData.GetValue(IDC_REPLYDLG_EVENTURL)) || (dbei->eventType == EVENTTYPE_FILE && !AutoreplyOptData.GetValue(IDC_REPLYDLG_EVENTFILE))) return 0; diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 6a371aa8c4..43ca3d2e27 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -189,14 +189,6 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) commentFix = POPUP_COMMENT_MESSAGE; break; - case EVENTTYPE_URL: - // url - if (dbei->pBlob) comment2 = mir_a2u((char *)dbei->pBlob); - // comment - if (dbei->pBlob) comment1 = mir_a2u((char *)dbei->pBlob + mir_strlen((char *)dbei->pBlob) + 1); - commentFix = POPUP_COMMENT_URL; - break; - case EVENTTYPE_FILE: if (dbei->pBlob) { char *p = (char*)dbei->pBlob + sizeof(DWORD); @@ -398,15 +390,6 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType) sampleEvent = TranslateT("This is a sample message event :-)"); break; - case EVENTTYPE_URL: - if (!(g_plugin.maskNotify & MASK_URL)) return 1; - pudw.lchIcon = Skin_LoadIcon(SKINICON_EVENT_URL); - pudw.colorBack = g_plugin.bDefaultColorUrl ? 0 : g_plugin.colBackUrl; - pudw.colorText = g_plugin.bDefaultColorUrl ? 0 : g_plugin.colTextUrl; - iSeconds = g_plugin.iDelayUrl; - sampleEvent = TranslateT("This is a sample URL event ;-)"); - break; - case EVENTTYPE_FILE: if (!(g_plugin.maskNotify & MASK_FILE)) return 1; pudw.lchIcon = Skin_LoadIcon(SKINICON_EVENT_FILE); @@ -579,7 +562,6 @@ int PopupUpdate(MCONTACT hContact, MEVENT hEvent) int PopupPreview() { PopupShow(0, 0, EVENTTYPE_MESSAGE); - PopupShow(0, 0, EVENTTYPE_URL); PopupShow(0, 0, EVENTTYPE_FILE); PopupShow(0, 0, -1); return 0; diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 08802f84c7..2abee8259e 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1316,7 +1316,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) while (hDbEvent != 0) { DBEVENTINFO dbei = {}; db_event_get(hDbEvent, &dbei); - if (!(dbei.flags & DBEF_SENT) && (DbEventIsMessageOrCustom(&dbei) || dbei.eventType == EVENTTYPE_URL)) + if (!(dbei.flags & DBEF_SENT) && DbEventIsMessageOrCustom(&dbei)) g_clistApi.pfnRemoveEvent(m_hContact, hDbEvent); hDbEvent = db_event_next(m_hContact, hDbEvent); } diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index d7c5198347..b1f8d79df5 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -104,7 +104,6 @@ int DbEventIsShown(DBEVENTINFO &dbei) return 0; case EVENTTYPE_FILE: - case EVENTTYPE_URL: return 1; } @@ -126,7 +125,7 @@ EventData* getEventFromDB(CSrmmWindow *dat, MCONTACT hContact, MEVENT hDbEvent) EventData *evt = (EventData*)mir_calloc(sizeof(EventData)); evt->custom = DbEventIsCustomForMsgWindow(&dbei); - if (!(dbei.flags & DBEF_SENT) && (dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_URL || evt->custom)) { + if (!(dbei.flags & DBEF_SENT) && (dbei.eventType == EVENTTYPE_MESSAGE || evt->custom)) { db_event_markRead(hContact, hDbEvent); g_clistApi.pfnRemoveEvent(hContact, hDbEvent); } @@ -605,7 +604,6 @@ static char* CreateRTFFromEvent(CSrmmWindow *dat, EventData *evt, GlobalMessageD switch (evt->eventType) { case EVENTTYPE_JABBER_CHATSTATES: case EVENTTYPE_JABBER_PRESENCE: - case EVENTTYPE_URL: case EVENTTYPE_FILE: style = MSGFONTID_NOTICE; buf.AppendFormat("%s ", SetToStyle(style)); @@ -616,13 +614,6 @@ static char* CreateRTFFromEvent(CSrmmWindow *dat, EventData *evt, GlobalMessageD AppendUnicodeToBuffer(buf, TranslateT("File received")); AppendUnicodeToBuffer(buf, L":"); } - else if (evt->eventType == EVENTTYPE_URL) { - if (evt->dwFlags & IEEDF_SENT) - AppendUnicodeToBuffer(buf, TranslateT("URL sent")); - else - AppendUnicodeToBuffer(buf, TranslateT("URL received")); - AppendUnicodeToBuffer(buf, L":"); - } AppendUnicodeToBuffer(buf, L" "); if (evt->pszTextW != nullptr) { diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index 667bb3064b..9252ba7649 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -321,7 +321,6 @@ int CSend::OnSend(void *obj, WPARAM, LPARAM lParam) self->Unhook(); self->Exit(ack->result); // type=ACKTYPE_MESSAGE, result=success/failure, (char*)lParam=error message or NULL. - // type=ACKTYPE_URL, result=success/failure, (char*)lParam=error message or NULL. // type=ACKTYPE_FILE, result=ACKRESULT_FAILED then lParam=(LPARAM)(const char*)szReason break; case ACKRESULT_SUCCESS: @@ -332,9 +331,6 @@ int CSend::OnSend(void *obj, WPARAM, LPARAM lParam) case ACKTYPE_MESSAGE: self->DB_EventAdd((WORD)EVENTTYPE_MESSAGE); break; - case ACKTYPE_URL: - self->DB_EventAdd((WORD)EVENTTYPE_URL); - break; case ACKTYPE_FILE: self->m_szEventMsg.Insert(0, "aaaa"); self->m_cbEventMsg += sizeof(DWORD); diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp index 9ef57c5bb7..94dc2adf5c 100644 --- a/plugins/ShellExt/src/shlcom.cpp +++ b/plugins/ShellExt/src/shlcom.cpp @@ -274,7 +274,7 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode) // don't show people who are "Hidden" "NotOnList" or Ignored if (db_get_b(hContact, "CList", "Hidden", 0) == 1 || db_get_b(hContact, "CList", "NotOnList", 0) == 1 || - CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_MESSAGE | IGNOREEVENT_URL | IGNOREEVENT_FILE) != 0) + CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_MESSAGE | IGNOREEVENT_FILE) != 0) continue; } // is HIT2 off? diff --git a/plugins/StatusChange/src/main.cpp b/plugins/StatusChange/src/main.cpp index eff65a9c02..926095c98b 100644 --- a/plugins/StatusChange/src/main.cpp +++ b/plugins/StatusChange/src/main.cpp @@ -87,10 +87,6 @@ static int StatusChangeGetMessage(WPARAM, LPARAM hDbEvent) read = Options.MessageRead; send = Options.MessageSend; break; - case EVENTTYPE_URL: - read = Options.UrlRead; - send = Options.UrlSend; - break; case EVENTTYPE_FILE: read = Options.FileRead; send = Options.FileSend; diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index c400719946..a2f515e0e1 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -59,8 +59,7 @@ bool TSAPI IsStatusEvent(int eventType) bool TSAPI IsCustomEvent(int eventType) { - if (eventType == EVENTTYPE_MESSAGE || eventType == EVENTTYPE_URL || eventType == EVENTTYPE_CONTACTS || - eventType == EVENTTYPE_ADDED || eventType == EVENTTYPE_AUTHREQUEST || eventType == EVENTTYPE_FILE) + if (eventType == EVENTTYPE_MESSAGE || eventType == EVENTTYPE_CONTACTS || eventType == EVENTTYPE_ADDED || eventType == EVENTTYPE_AUTHREQUEST || eventType == EVENTTYPE_FILE) return false; return true; diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index f54472db9e..037cfd327e 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -401,7 +401,6 @@ static BOOL isValidDbEvent(DBEVENTINFO *dbe, int flags) BOOL bEventType, bEventFlags; bEventType = ((dbe->eventType == EVENTTYPE_MESSAGE) && (flags & DBE_MESSAGE)) || - ((dbe->eventType == EVENTTYPE_URL) && (flags & DBE_URL)) || ((dbe->eventType == EVENTTYPE_CONTACTS) && (flags & DBE_CONTACTS)) || ((dbe->eventType == EVENTTYPE_ADDED) && (flags & DBE_ADDED)) || ((dbe->eventType == EVENTTYPE_AUTHREQUEST) && (flags & DBE_AUTHREQUEST)) || diff --git a/plugins/Variables/src/parse_miranda.h b/plugins/Variables/src/parse_miranda.h index 2597be04b1..4637fff9ad 100644 --- a/plugins/Variables/src/parse_miranda.h +++ b/plugins/Variables/src/parse_miranda.h @@ -66,7 +66,6 @@ /* type */ #define DBE_MESSAGE 0x00000100 // event is a message, etc (pBlob = message) -#define DBE_URL 0x00000200 // pBlob = message #define DBE_CONTACTS 0x00000400 // pBlob = 'some format', no string #define DBE_ADDED 0x00000800 // pBlob = 'some format', no string #define DBE_AUTHREQUEST 0x00001000 // pBlob = message diff --git a/plugins/WinterSpeak/src/EventInformation.cpp b/plugins/WinterSpeak/src/EventInformation.cpp index f5c8e1ad9f..cb503f377a 100644 --- a/plugins/WinterSpeak/src/EventInformation.cpp +++ b/plugins/WinterSpeak/src/EventInformation.cpp @@ -9,7 +9,6 @@ EventInformation::EventInformation() : m_event_strings(), m_event_info() { // insert the event strings into a map for easy access m_event_strings[EVENTTYPE_MESSAGE] = TranslateT("incoming message from %u"); - m_event_strings[EVENTTYPE_URL] = TranslateT("incoming URL from %u"); m_event_strings[EVENTTYPE_ADDED] = TranslateT("you have been added to %u's contact list"); m_event_strings[EVENTTYPE_AUTHREQUEST] = TranslateT("%u requests your authorization"); m_event_strings[EVENTTYPE_FILE] = TranslateT("there is an incoming file from %u"); diff --git a/plugins/WinterSpeak/src/SpeakAnnounce.cpp b/plugins/WinterSpeak/src/SpeakAnnounce.cpp index 92eab57c48..e9b8160138 100644 --- a/plugins/WinterSpeak/src/SpeakAnnounce.cpp +++ b/plugins/WinterSpeak/src/SpeakAnnounce.cpp @@ -77,10 +77,6 @@ void SpeakAnnounce::incomingEvent(MCONTACT user, MEVENT event) speak = m_db.getEventFlag(AnnounceDatabase::EventFlag_Message); break; - case EVENTTYPE_URL: - speak = m_db.getEventFlag(AnnounceDatabase::EventFlag_Url); - break; - case EVENTTYPE_ADDED: speak = m_db.getEventFlag(AnnounceDatabase::EventFlag_Added); break; -- cgit v1.2.3