summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-10-10 16:22:34 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-10-10 16:22:34 +0300
commitd3387c7307fa3f883e77c17e443874b3a085ded5 (patch)
tree7977c7fcbf427fdbb154f00376dd1a65888d65ed /plugins/TabSRMM
parentf6b9225bf5ccba811d7a24faf2e298361ed76649 (diff)
fixes #943 (TabSRMM: Add to highlight list doesn't work)
this feature has never worked and therefore removed
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/res/chat.rc13
-rw-r--r--plugins/TabSRMM/src/chat_main.cpp38
-rw-r--r--plugins/TabSRMM/src/chat_resource.h7
-rw-r--r--plugins/TabSRMM/src/muchighlight.cpp60
-rw-r--r--plugins/TabSRMM/src/muchighlight.h1
5 files changed, 0 insertions, 119 deletions
diff --git a/plugins/TabSRMM/res/chat.rc b/plugins/TabSRMM/res/chat.rc
index 85eed25154..98daf77d20 100644
--- a/plugins/TabSRMM/res/chat.rc
+++ b/plugins/TabSRMM/res/chat.rc
@@ -38,19 +38,6 @@ BEGIN
CONTROL "",IDC_PANELSPLITTER,"Static",SS_ENHMETAFILE,0,32,252,1,WS_EX_TRANSPARENT
END
-IDD_ADDHIGHLIGHT DIALOG 0, 0, 212, 97
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_BORDER
-FONT 8, "MS Shell Dlg"
-BEGIN
- LTEXT "",IDC_STATIC,0,0,211,97
- LTEXT "",IDC_ADDHIGHLIGHTTITLE,7,3,201,12,SS_CENTERIMAGE
- COMBOBOX IDC_ADDHIGHLIGHTNAME,17,24,178,17,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- LTEXT "You can add the user by user name or his ID. Wildcards are allowed and recommended.",IDC_ADDHIGHLIGHTEXPLAIN,15,49,179,21
- DEFPUSHBUTTON "OK",IDOK,152,76,55,14
- DEFPUSHBUTTON "Cancel",IDCANCEL,91,76,55,14
- EDITTEXT IDC_ADDHIGHLIGHTEDITLIST,9,18,192,47,ES_AUTOHSCROLL
-END
-
IDD_FILTER DIALOG 0, 0, 201, 126
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_BORDER
FONT 8, "MS Shell Dlg"
diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp
index ebf3ff452e..72d0e9c0a3 100644
--- a/plugins/TabSRMM/src/chat_main.cpp
+++ b/plugins/TabSRMM/src/chat_main.cpp
@@ -206,42 +206,6 @@ static void CheckUpdate()
/////////////////////////////////////////////////////////////////////////////////////////
-static gc_item tabItems[] =
-{
- { LPGENW("Highlight user..."), 20020, MENU_ITEM }
-};
-
-static int OnCreateGCMenu(WPARAM, LPARAM lParam)
-{
- GCMENUITEMS *gcitems = (GCMENUITEMS*)lParam;
- if (gcitems->Type == MENU_ON_NICKLIST)
- Chat_AddMenuItems(gcitems->hMenu, _countof(tabItems), tabItems);
-
- return 0;
-}
-
-static int OnHandleGCMenu(WPARAM, LPARAM lParam)
-{
- GCHOOK *gch = (GCHOOK*)lParam;
- if (!gch)
- return 1;
-
- if (gch->dwData == 20020) { // add to highlight...
- SESSION_INFO *si = pci->SM_FindSession(gch->ptszID, gch->pszModule);
- THighLightEdit the = { THighLightEdit::CMD_ADD, si, pci->UM_FindUser(si->pUsers, gch->ptszUID) };
- HWND hwndParent = si->pDlg->m_pContainer->m_hwnd;
- HWND hwndDlg = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_ADDHIGHLIGHT), hwndParent, CMUCHighlight::dlgProcAdd, (LPARAM)&the);
- TranslateDialogDefault(hwndDlg);
-
- RECT rc, rcWnd;
- GetClientRect(hwndParent, &rcWnd);
- GetWindowRect(hwndDlg, &rc);
- SetWindowPos(hwndDlg, HWND_TOP, (rcWnd.right - (rc.right - rc.left)) / 2, (rcWnd.bottom - (rc.bottom - rc.top)) / 2, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
- }
-
- return 0;
-}
-
static void stubShowRoom(SESSION_INFO *si)
{
ShowRoom(nullptr, si);
@@ -278,8 +242,6 @@ int Chat_Load()
pci->UM_CompareItem = UM_CompareItem;
pci->ReloadSettings();
- HookEvent(ME_GC_EVENT, OnHandleGCMenu);
- HookEvent(ME_GC_BUILDMENU, OnCreateGCMenu);
g_Settings.Highlight = new CMUCHighlight();
return 0;
}
diff --git a/plugins/TabSRMM/src/chat_resource.h b/plugins/TabSRMM/src/chat_resource.h
index cd6cb2064b..6a6d833b9e 100644
--- a/plugins/TabSRMM/src/chat_resource.h
+++ b/plugins/TabSRMM/src/chat_resource.h
@@ -9,7 +9,6 @@
#define IDD_OPTIONSPOPUP 405
#define IDD_OPTIONS3 407
#define IDD_OPTIONS4 408
-#define IDD_ADDHIGHLIGHT 409
#define IDC_CHECKBOXES 1021
#define IDC_NICKROW2 1023
#define IDC_NICKROW 1024
@@ -48,14 +47,8 @@
#define IDC_HIGHLIGHTNICKUID 1090
#define IDC_HIGHLIGHTNICKPATTERN 1091
#define IDC_HIGHLIGHTTEXTENABLE 1092
-#define IDC_COMBO1 1092
-#define IDC_ADDHIGHLIGHTNAME 1092
#define IDC_HIGHLIGHTTEXTPATTERN 1093
-#define IDC_ADDHIGHLIGHTTITLE 1093
-#define IDC_ADDHIGHLIGHTEXPLAIN 1094
-#define IDC_HIGHLIGHTNICKUID2 1094
#define IDC_HIGHLIGHTME 1094
-#define IDC_ADDHIGHLIGHTEDITLIST 1095
#define IDC_MUC_OPENLOGBASEDIR 1096
#define IDC_1 1200
#define IDC_2 1201
diff --git a/plugins/TabSRMM/src/muchighlight.cpp b/plugins/TabSRMM/src/muchighlight.cpp
index ec41786ff3..11a3a46e4d 100644
--- a/plugins/TabSRMM/src/muchighlight.cpp
+++ b/plugins/TabSRMM/src/muchighlight.cpp
@@ -274,63 +274,3 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
}
return FALSE;
}
-
-/**
- * dialog procedure for the small "add user to highlight list" dialog box
- * TODO: finish it
- */
-INT_PTR CALLBACK CMUCHighlight::dlgProcAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg) {
- case WM_INITDIALOG:
- {
- HFONT hFont = (HFONT)::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTTITLE, WM_GETFONT, 0, 0);
-
- THighLightEdit *the = reinterpret_cast<THighLightEdit *>(lParam);
- ::SetWindowLongPtr(hwndDlg, GWLP_USERDATA, the->uCmd);
-
- LOGFONT lf = { 0 };
- ::GetObject(hFont, sizeof(lf), &lf);
- lf.lfWeight = FW_BOLD;
- lf.lfHeight = (int)(lf.lfHeight * 1.2);
- hFont = ::CreateFontIndirect(&lf);
-
- ::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTTITLE, WM_SETFONT, (WPARAM)hFont, FALSE);
- if (the->uCmd == THighLightEdit::CMD_ADD) {
- Utils::showDlgControl(hwndDlg, IDC_ADDHIGHLIGHTEDITLIST, SW_HIDE);
- ::SetDlgItemText(hwndDlg, IDC_ADDHIGHLIGHTTITLE, TranslateT("Add user to highlight list"));
- ::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTNAME, CB_INSERTSTRING, -1, (LPARAM)the->ui->pszNick);
- if (mir_wstrcmp(the->ui->pszNick, the->ui->pszUID))
- ::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTNAME, CB_INSERTSTRING, -1, (LPARAM)the->ui->pszUID);
- ::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTNAME, CB_SETCURSEL, 0, 0);
- }
- else {
- Utils::showDlgControl(hwndDlg, IDC_ADDHIGHLIGHTNAME, SW_HIDE);
- Utils::showDlgControl(hwndDlg, IDC_ADDHIGHLIGHTEXPLAIN, SW_HIDE);
- ::SetDlgItemText(hwndDlg, IDC_ADDHIGHLIGHTTITLE, TranslateT("Edit user highlight list"));
- }
- }
- break;
-
- case WM_CTLCOLOREDIT:
- case WM_CTLCOLORSTATIC:
- {
- HWND hwndChild = (HWND)lParam;
- if (hwndChild == ::GetDlgItem(hwndDlg, IDC_ADDHIGHLIGHTTITLE))
- ::SetTextColor((HDC)wParam, RGB(60, 60, 150));
- ::SetBkColor((HDC)wParam, ::GetSysColor(COLOR_WINDOW));
- return (INT_PTR)::GetSysColorBrush(COLOR_WINDOW);
- }
-
- case WM_COMMAND:
- if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
- ::DestroyWindow(hwndDlg);
- break;
-
- case WM_DESTROY:
- HFONT hFont = (HFONT)::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTTITLE, WM_GETFONT, 0, 0);
- ::DeleteObject(hFont);
- break;
- }
- return FALSE;
-}
diff --git a/plugins/TabSRMM/src/muchighlight.h b/plugins/TabSRMM/src/muchighlight.h
index 9ca56c95d0..d6e124df04 100644
--- a/plugins/TabSRMM/src/muchighlight.h
+++ b/plugins/TabSRMM/src/muchighlight.h
@@ -57,7 +57,6 @@ public:
bool match(const GCEVENT *pgce, const SESSION_INFO *psi, DWORD dwFlags = MATCH_NICKNAME);
static INT_PTR CALLBACK dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); // option page dlg proc
- static INT_PTR CALLBACK dlgProcAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); // for the "add to" dialog
private:
void tokenize(wchar_t *tszString, wchar_t**& patterns, UINT& nr);