summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2017-09-14 17:20:18 +0300
committerdartraiden <wowemuh@gmail.com>2017-09-14 17:20:18 +0300
commit6056ed3959bd5edf99b53b9ed9e25beb315a45bc (patch)
tree59186895388d42da73ae98be074c6d95e3a7d3d9 /plugins
parent91d85052ba54d5c93eb5ec3fffe283f664777b60 (diff)
remove ModernOpt support completely
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewAwaySysMod/res/NewAwaySys.rc33
-rw-r--r--plugins/NewAwaySysMod/src/AwayOpt.cpp203
-rw-r--r--plugins/NewAwaySysMod/src/resource.h5
3 files changed, 0 insertions, 241 deletions
diff --git a/plugins/NewAwaySysMod/res/NewAwaySys.rc b/plugins/NewAwaySysMod/res/NewAwaySys.rc
index e95c33762c..c441dbd6fb 100644
--- a/plugins/NewAwaySysMod/res/NewAwaySys.rc
+++ b/plugins/NewAwaySysMod/res/NewAwaySys.rc
@@ -158,32 +158,6 @@ BEGIN
CONTROL "V",IDC_MESSAGEDLG_VARS,"MButtonClass",WS_TABSTOP,288,166,16,14,WS_EX_NOACTIVATE | 0x10000000L
END
-IDD_MODERNOPT_MESSAGES DIALOG 0, 0, 373, 154
-STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CONTROL | DS_CENTER | WS_CHILD
-FONT 8, "MS Shell Dlg"
-BEGIN
- CONTROL "",IDC_MESSAGEDLG_MSGTREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | TVS_SHOWSELALWAYS | TVS_TRACKSELECT | WS_BORDER | WS_TABSTOP,6,13,126,128
- LTEXT "Title:",IDC_TXT_TITLE2,138,14,51,8
- EDITTEXT IDC_MESSAGEDLG_MSGTITLE,194,13,172,12,ES_AUTOHSCROLL
- EDITTEXT IDC_MESSAGEDLG_MSGDATA,138,30,228,57,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
- GROUPBOX "Use this message as default for",IDC_TXT_TITLE3,138,111,228,30,BS_LEFT
- CONTROL "On&line",IDC_MESSAGEDLG_DEF_ONL,"MButtonClass",WS_TABSTOP,144,122,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "&Away",IDC_MESSAGEDLG_DEF_AWAY,"MButtonClass",WS_TABSTOP,160,122,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "&Not available",IDC_MESSAGEDLG_DEF_NA,"MButtonClass",WS_TABSTOP,176,122,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "Occ&upied",IDC_MESSAGEDLG_DEF_OCC,"MButtonClass",WS_TABSTOP,192,122,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "&Do not disturb",IDC_MESSAGEDLG_DEF_DND,"MButtonClass",WS_TABSTOP,208,122,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "&Free for chat",IDC_MESSAGEDLG_DEF_FFC,"MButtonClass",WS_TABSTOP,224,122,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "&Invisible",IDC_MESSAGEDLG_DEF_INV,"MButtonClass",WS_TABSTOP,240,122,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "On the &phone",IDC_MESSAGEDLG_DEF_OTP,"MButtonClass",WS_TABSTOP,256,122,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "Out to &lunch",IDC_MESSAGEDLG_DEF_OTL,"MButtonClass",WS_TABSTOP,272,122,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "New message",IDC_MESSAGEDLG_NEWMSG,"MButtonClass",WS_TABSTOP,138,95,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "New category",IDC_MESSAGEDLG_NEWCAT,"MButtonClass",WS_TABSTOP,154,95,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "Delete",IDC_MESSAGEDLG_DEL,"MButtonClass",WS_TABSTOP,170,95,16,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "V",IDC_MESSAGEDLG_VARS,"MButtonClass",WS_TABSTOP,350,95,16,14,WS_EX_NOACTIVATE | 0x10000000L
- LTEXT "Status messages:",IDC_TXT_TITLE1,0,2,99,9
- CONTROL "Configure autoaway",IDC_LNK_AUTOAWAY,"Hyperlink",WS_TABSTOP,6,142,126,11
-END
-
IDD_MOREOPTDIALOG DIALOGEX 0, 0, 311, 235
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
@@ -306,13 +280,6 @@ BEGIN
BOTTOMMARGIN, 164
END
- IDD_MODERNOPT_MESSAGES, DIALOG
- BEGIN
- RIGHTMARGIN, 366
- VERTGUIDE, 138
- HORZGUIDE, 13
- END
-
IDD_MOREOPTDIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp
index abb0e0516a..b0b313b999 100644
--- a/plugins/NewAwaySysMod/src/AwayOpt.cpp
+++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp
@@ -675,209 +675,6 @@ Dlg4Buttons[] = {
IDC_MESSAGEDLG_VARS, ILI_NOICON, LPGENW("Open Variables help dialog"),
};
-INT_PTR CALLBACK MessagesModernOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static int ChangeLock = 0;
- static CMsgTree* MsgTree = NULL;
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- MySetPos(hwndDlg);
- ChangeLock++;
- g_MessagesOptPage.SetWnd(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, EM_LIMITTEXT, TREEITEMTITLE_MAXLEN, 0);
- SendDlgItemMessage(hwndDlg, IDC_MESSAGEDLG_MSGDATA, EM_LIMITTEXT, AWAY_MSGDATA_MAX, 0);
-
- // init image buttons
- for (int i = 0; i < _countof(Dlg4Buttons); i++) {
- HWND hButton = GetDlgItem(hwndDlg, Dlg4Buttons[i].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)TranslateW(Dlg4Buttons[i].Text), BATF_UNICODE);
- SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
- }
- // now default status message buttons
- for (int i = 0; i < _countof(Dlg4DefMsgDlgItems); i++) {
- HWND hButton = GetDlgItem(hwndDlg, Dlg4DefMsgDlgItems[i].DlgItem);
- SendMessage(hButton, BUTTONADDTOOLTIP, (WPARAM)pcli->pfnGetStatusModeDescription(Dlg4DefMsgDlgItems[i].Status, 0), BATF_UNICODE);
- SendMessage(hButton, BUTTONSETASPUSHBTN, TRUE, 0);
- SendMessage(hButton, BUTTONSETASFLATBTN, TRUE, 0);
- g_OrigDefStatusButtonMsgProc = (WNDPROC)SetWindowLongPtr(hButton, GWLP_WNDPROC, (LONG_PTR)DefStatusButtonSubclassProc);
- }
- SendMessage(hwndDlg, UM_ICONSCHANGED, 0, 0);
- g_MessagesOptPage.DBToMemToPage();
- _ASSERT(!MsgTree);
- MsgTree = new CMsgTree(GetDlgItem(hwndDlg, IDC_MESSAGEDLG_MSGTREE));
- if (!MsgTree->SetSelection(MsgTree->GetDefMsg(ID_STATUS_AWAY), MTSS_BYID))
- MsgTree->SetSelection(g_Messages_PredefinedRootID, MTSS_BYID);
-
- ChangeLock--;
- return true;
-
- case UM_ICONSCHANGED:
- for (int i = 0; i < _countof(Dlg4DefMsgDlgItems); i++)
- SendDlgItemMessage(hwndDlg, Dlg4DefMsgDlgItems[i].DlgItem, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_IconList[Dlg4DefMsgDlgItems[i].IconIndex]);
-
- for (int i = 0; i < _countof(Dlg4Buttons); i++)
- if (Dlg4Buttons[i].IconIndex != ILI_NOICON)
- SendDlgItemMessage(hwndDlg, Dlg4Buttons[i].DlgItem, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_IconList[Dlg4Buttons[i].IconIndex]);
-
- variables_skin_helpbutton(hwndDlg, IDC_MESSAGEDLG_VARS);
- break;
-
- case WM_NOTIFY:
- if (((NMHDR*)lParam)->code == PSN_APPLY) {
- HWND hTreeView = GetDlgItem(hwndDlg, IDC_MESSAGEDLG_MSGTREE);
- HTREEITEM hSelectedItem = TreeView_GetSelection(hTreeView);
- ChangeLock++;
- TreeView_SelectItem(hTreeView, NULL);
- TreeView_SelectItem(hTreeView, hSelectedItem);
- ChangeLock--;
- MsgTree->Save();
- return true;
- }
-
- if (((LPNMHDR)lParam)->idFrom == IDC_MESSAGEDLG_MSGTREE) {
- PNMMSGTREE pnm = (PNMMSGTREE)lParam;
- switch (((LPNMHDR)lParam)->code) {
- case MTN_SELCHANGED:
- if (pnm->ItemOld && !(pnm->ItemOld->Flags & (TIF_ROOTITEM | TIF_GROUP))) {
- TCString Msg;
- GetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, Msg.GetBuffer(AWAY_MSGDATA_MAX), AWAY_MSGDATA_MAX);
- Msg.ReleaseBuffer();
- if (((CTreeItem*)pnm->ItemOld)->User_Str1 != (const wchar_t*)Msg) {
- ((CTreeItem*)pnm->ItemOld)->User_Str1 = Msg;
- MsgTree->SetModified(true);
- }
- }
- if (pnm->ItemNew) {
- ChangeLock++;
- if (!(pnm->ItemNew->Flags & TIF_ROOTITEM)) {
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, pnm->ItemNew->Title);
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, (pnm->ItemNew->Flags & TIF_GROUP) ? L"" : ((CTreeItem*)pnm->ItemNew)->User_Str1);
- }
- else {
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, L"");
- if (pnm->ItemNew->ID == g_Messages_RecentRootID)
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, TranslateT("Your most recent status messages are placed in this category. It's not recommended that you put your messages manually here, as they'll be replaced by your recent messages."));
- else {
- _ASSERT(pnm->ItemNew->ID == g_Messages_PredefinedRootID);
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGDATA, TranslateT("You can put your frequently used and favorite messages in this category."));
- }
- }
- for (int i = 0; i < _countof(Dlg4DefMsgDlgItems); i++) {
- COptItem_Checkbox *Checkbox = (COptItem_Checkbox*)g_MessagesOptPage.Find(Dlg4DefMsgDlgItems[i].DlgItem);
- Checkbox->SetWndValue(g_MessagesOptPage.GetWnd(), MsgTree->GetDefMsg(Dlg4DefMsgDlgItems[i].Status) == pnm->ItemNew->ID);
- }
- ChangeLock--;
- }
- EnableMessagesOptDlgControls(MsgTree);
- return 0;
-
- case MTN_DEFMSGCHANGED:
- if (!ChangeLock) {
- CBaseTreeItem* SelectedItem = MsgTree->GetSelection();
- _ASSERT(SelectedItem);
- if ((pnm->ItemOld && pnm->ItemOld->ID == SelectedItem->ID) || (pnm->ItemNew && pnm->ItemNew->ID == SelectedItem->ID)) { // SelectedItem contains the same info as one of ItemOld or ItemNew - so we'll just use SelectedItem and won't bother with identifying which of ItemOld or ItemNew is currently selected
- for (int i = 0; i < _countof(Dlg4DefMsgDlgItems); i++) {
- COptItem_Checkbox *Checkbox = (COptItem_Checkbox*)g_MessagesOptPage.Find(Dlg4DefMsgDlgItems[i].DlgItem);
- Checkbox->SetWndValue(g_MessagesOptPage.GetWnd(), MsgTree->GetDefMsg(Dlg4DefMsgDlgItems[i].Status) == SelectedItem->ID);
- }
- }
- }
- if (!ChangeLock)
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- return 0;
-
- case MTN_ITEMRENAMED:
- {
- CBaseTreeItem *SelectedItem = MsgTree->GetSelection();
- _ASSERT(SelectedItem);
- if (pnm->ItemNew->ID == SelectedItem->ID && !ChangeLock) {
- ChangeLock++;
- SetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, pnm->ItemNew->Title);
- ChangeLock--;
- }
- } // go through
- case MTN_ENDDRAG:
- case MTN_NEWCATEGORY:
- case MTN_NEWMESSAGE:
- case MTN_DELETEITEM:
- case TVN_ITEMEXPANDED:
- if (!ChangeLock)
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- return 0;
- }
- }
- break;
-
- case WM_COMMAND:
- switch (HIWORD(wParam)) {
- case BN_CLICKED:
- switch (LOWORD(wParam)) {
- case IDC_MESSAGEDLG_DEF_ONL:
- case IDC_MESSAGEDLG_DEF_AWAY:
- case IDC_MESSAGEDLG_DEF_NA:
- case IDC_MESSAGEDLG_DEF_OCC:
- case IDC_MESSAGEDLG_DEF_DND:
- case IDC_MESSAGEDLG_DEF_FFC:
- case IDC_MESSAGEDLG_DEF_INV:
- case IDC_MESSAGEDLG_DEF_OTP:
- case IDC_MESSAGEDLG_DEF_OTL:
- for (int i = 0; i < _countof(Dlg4DefMsgDlgItems); i++) {
- if (LOWORD(wParam) == Dlg4DefMsgDlgItems[i].DlgItem) {
- // PSM_CHANGED is sent here through MTN_DEFMSGCHANGED, so we don't need to send it once more
- MsgTree->SetDefMsg(Dlg4DefMsgDlgItems[i].Status, MsgTree->GetSelection()->ID);
- break;
- }
- }
- break;
- case IDC_MESSAGEDLG_VARS:
- my_variables_showhelp(hwndDlg, IDC_MESSAGEDLG_MSGDATA);
- break;
- case IDC_MESSAGEDLG_DEL:
- MsgTree->EnsureVisible(MsgTree->GetSelection()->hItem);
- MsgTree->DeleteSelectedItem();
- break;
- case IDC_MESSAGEDLG_NEWCAT:
- MsgTree->AddCategory();
- SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGEDLG_MSGTITLE));
- break;
- case IDC_MESSAGEDLG_NEWMSG:
- MsgTree->AddMessage();
- SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGEDLG_MSGTITLE));
- break;
- case IDC_LNK_AUTOAWAY:
- Options_OpenPage(NULL, L"Status", L"Autoreply");
- }
- break;
- case EN_CHANGE:
- if (LOWORD(wParam) == IDC_MESSAGEDLG_MSGDATA || LOWORD(wParam) == IDC_MESSAGEDLG_MSGTITLE) {
- if (!ChangeLock) {
- if (LOWORD(wParam) == IDC_MESSAGEDLG_MSGTITLE) {
- CBaseTreeItem* TreeItem = MsgTree->GetSelection();
- if (TreeItem && !(TreeItem->Flags & TIF_ROOTITEM)) {
- GetDlgItemText(hwndDlg, IDC_MESSAGEDLG_MSGTITLE, TreeItem->Title.GetBuffer(TREEITEMTITLE_MAXLEN), TREEITEMTITLE_MAXLEN);
- TreeItem->Title.ReleaseBuffer();
- ChangeLock++;
- MsgTree->UpdateItem(TreeItem->ID);
- ChangeLock--;
- }
- }
- MsgTree->SetModified(true);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
- }
- }
- }
- break;
-
- case WM_DESTROY:
- delete MsgTree;
- MsgTree = NULL;
- g_MessagesOptPage.SetWnd(NULL);
- }
- return 0;
-}
-
// ================================================ Contact list ================================================
// Based on the code from built-in Miranda ignore module
diff --git a/plugins/NewAwaySysMod/src/resource.h b/plugins/NewAwaySysMod/src/resource.h
index 17b0647bce..422bf2f0d0 100644
--- a/plugins/NewAwaySysMod/src/resource.h
+++ b/plugins/NewAwaySysMod/src/resource.h
@@ -4,7 +4,6 @@
//
#define IDD_OPTDIALOGMAIN 101
#define IDD_MESSAGES 101
-#define IDD_MODERNOPT_MESSAGES 102
#define IDI_MSGICON 109
#define IDI_SOE_ENABLED 110
#define IDD_READAWAYMSG 111
@@ -50,7 +49,6 @@
#define IDC_SAWAYMSG_MSGDATA 1008
#define IDC_MOREOPTDLG_USEDEFMSG 1008
#define IDC_OPTDLG_SAVE 1010
-#define IDC_LNK_AUTOAWAY 1010
#define IDC_OPTDLG_RESET 1012
#define IDC_OPTDLG_VARSLIST 1013
#define IDC_MESSAGEDLG_VARS 1013
@@ -208,9 +206,6 @@
#define IDC_POPUPOPTDLG_LOGONLYWITHPOPUP 1177
#define IDC_POPUPOPTDLG_STATIC_EXTRATEXT 1178
#define IDC_REPLYDLG_STATIC_EXTRATEXT 1179
-#define IDC_TXT_TITLE1 1181
-#define IDC_TXT_TITLE2 1182
-#define IDC_TXT_TITLE3 1183
#define IDC_SAWAYMSG_STATIC_COUNTER 1202
#define IDC_READAWAYMSG_RETRIEVE 3453
#define IDS_MESSAGEDLG_DEF_ONL 20000