From 90ef506b95b3d42caaa773b144c6fa62fe9e8019 Mon Sep 17 00:00:00 2001 From: dartraiden Date: Thu, 24 Aug 2017 21:01:39 +0300 Subject: remove useless "About" dialog from clist_nicer (#903) --- plugins/Clist_nicer/res/resource.rc | 21 -------- plugins/Clist_nicer/src/clui.cpp | 92 -------------------------------- plugins/Clist_nicer/src/cluiservices.cpp | 12 ----- plugins/Clist_nicer/src/groupmenu.cpp | 6 --- plugins/Clist_nicer/src/resource.h | 7 --- 5 files changed, 138 deletions(-) diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc index f861f2e6b3..cb0c6a6d2a 100644 --- a/plugins/Clist_nicer/res/resource.rc +++ b/plugins/Clist_nicer/res/resource.rc @@ -38,23 +38,6 @@ BEGIN LTEXT "Although the exception was caught and you may continue working with Miranda, you should restart the program as soon as possible. The exception may have damaged internal data structures and can have a serious impact on stability.",IDC_STATIC,7,83,352,26 END -IDD_CLNABOUT DIALOGEX 0, 0, 228, 140 -STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_CONTROLPARENT -CAPTION "About Clist nicer" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - LTEXT "",IDC_WHITERECT,0,0,228,116 - DEFPUSHBUTTON "OK",IDOK,168,123,55,14 - LTEXT "Clist nicer",IDC_CLNICER,5,7,150,15 - CTEXT "Copyright © 2004-2010 by the Miranda IM project, 2012-2017 by the Miranda NG project.",IDC_COPYRIGHT,5,39,217,47 - ICON 0,IDC_LOGO,201,2,20,20 - LTEXT "Version",IDC_VERSION,5,19,150,15 - CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,117,228,1 - CONTROL "Support and latest version information",IDC_SUPPORT, - "Hyperlink",WS_TABSTOP | 0x1,18,91,192,12 -END - IDD_DELETECONTACT DIALOGEX 0, 0, 294, 101 STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_CONTROLPARENT @@ -612,10 +595,6 @@ BEGIN BEGIN END - IDD_CLNABOUT, DIALOG - BEGIN - END - IDD_DELETECONTACT, DIALOG BEGIN END diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 67a4714847..85bd05e0a4 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1791,97 +1791,6 @@ static int MetaChanged(WPARAM wParam, LPARAM lParam) return 0; } -static BOOL g_AboutDlgActive = 0; - -INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch (msg) { - case WM_INITDIALOG: - TranslateDialogDefault(hwndDlg); - { - int h; - HFONT hFont; - LOGFONT lf; - - g_AboutDlgActive = TRUE; - hFont = (HFONT)SendDlgItemMessage(hwndDlg, IDC_CLNICER, WM_GETFONT, 0, 0); - GetObject(hFont, sizeof(lf), &lf); - h = lf.lfHeight; - lf.lfHeight = (int)(lf.lfHeight * 1.5); - lf.lfWeight = FW_BOLD; - hFont = CreateFontIndirect(&lf); - SendDlgItemMessage(hwndDlg, IDC_CLNICER, WM_SETFONT, (WPARAM)hFont, 0); - lf.lfHeight = h; - hFont = CreateFontIndirect(&lf); - SendDlgItemMessage(hwndDlg, IDC_VERSION, WM_SETFONT, (WPARAM)hFont, 0); - } - { - wchar_t str[64]; - DWORD v = pluginInfo.version; - mir_snwprintf(str, L"%s %d.%d.%d.%d", TranslateT("Version"), HIBYTE(HIWORD(v)), LOBYTE(HIWORD(v)), HIBYTE(LOWORD(v)), LOBYTE(LOWORD(v))); - SetDlgItemText(hwndDlg, IDC_VERSION, str); - } - { - HICON hIcon = LoadIcon(GetModuleHandleA("miranda32.exe"), MAKEINTRESOURCE(102)); - SendDlgItemMessage(hwndDlg, IDC_LOGO, STM_SETICON, (WPARAM)hIcon, 0); - SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); - DestroyIcon(hIcon); - } - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDOK: - case IDCANCEL: - DestroyWindow(hwndDlg); - return TRUE; - case IDC_SUPPORT: - Utils_OpenUrl("https://miranda-ng.org/"); - break; - } - break; - - case WM_CTLCOLOREDIT: - case WM_CTLCOLORSTATIC: - if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_WHITERECT) - || (HWND)lParam == GetDlgItem(hwndDlg, IDC_CLNICER) - || (HWND)lParam == GetDlgItem(hwndDlg, IDC_VERSION) - || (HWND)lParam == GetDlgItem(hwndDlg, IDC_COPYRIGHT) - || (HWND)lParam == GetDlgItem(hwndDlg, IDC_SUPPORT) - || (HWND)lParam == GetDlgItem(hwndDlg, IDC_LOGO)) { - if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_CLNICER)) - SetTextColor((HDC)wParam, RGB(180, 10, 10)); - else if ((HWND)lParam == GetDlgItem(hwndDlg, IDC_VERSION)) - SetTextColor((HDC)wParam, RGB(70, 70, 70)); - else - SetTextColor((HDC)wParam, RGB(0, 0, 0)); - SetBkColor((HDC)wParam, RGB(255, 255, 255)); - return (INT_PTR)GetStockObject(WHITE_BRUSH); - } - break; - - case WM_DESTROY: - { - HFONT hFont = (HFONT)SendDlgItemMessage(hwndDlg, IDC_CLNICER, WM_GETFONT, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_CLNICER, WM_SETFONT, SendDlgItemMessage(hwndDlg, IDOK, WM_GETFONT, 0, 0), 0); - DeleteObject(hFont); - hFont = (HFONT)SendDlgItemMessage(hwndDlg, IDC_VERSION, WM_GETFONT, 0, 0); - SendDlgItemMessage(hwndDlg, IDC_VERSION, WM_SETFONT, SendDlgItemMessage(hwndDlg, IDOK, WM_GETFONT, 0, 0), 0); - DeleteObject(hFont); - g_AboutDlgActive = FALSE; - } - break; - } - return FALSE; -} - -static INT_PTR CLN_ShowAbout(WPARAM, LPARAM) -{ - if (!g_AboutDlgActive) - CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CLNABOUT), 0, DlgProcAbout, 0); - return 0; -} - static INT_PTR CLN_ShowMainMenu(WPARAM, LPARAM) { POINT pt; @@ -1927,7 +1836,6 @@ void LoadCLUIModule(void) LoadExtraIconModule(); LoadCLUIFramesModule(); - CreateServiceFunction("CLN/About", CLN_ShowAbout); CreateServiceFunction(MS_CLUI_SHOWMAINMENU, CLN_ShowMainMenu); CreateServiceFunction(MS_CLUI_SHOWSTATUSMENU, CLN_ShowStatusMenu); diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index 1368c911a1..7e8b5c8c56 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -27,18 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern ButtonItem *g_ButtonItems; -static INT_PTR GetClistVersion(WPARAM, LPARAM lParam) -{ - static char g_szVersionString[256]; - - mir_snprintf(g_szVersionString, "%s, %d.%d.%d.%d", pluginInfo.shortName, HIBYTE(HIWORD(pluginInfo.version)), LOBYTE(HIWORD(pluginInfo.version)), HIBYTE(LOWORD(pluginInfo.version)), LOBYTE(LOBYTE(pluginInfo.version))); - if (!IsBadWritePtr((LPVOID)lParam, 4)) - *((DWORD *)lParam) = pluginInfo.version; - - return (INT_PTR)g_szVersionString; -} - - void FreeProtocolData(void) { // free protocol data diff --git a/plugins/Clist_nicer/src/groupmenu.cpp b/plugins/Clist_nicer/src/groupmenu.cpp index 81fae70e2a..9ba48eac12 100644 --- a/plugins/Clist_nicer/src/groupmenu.cpp +++ b/plugins/Clist_nicer/src/groupmenu.cpp @@ -152,10 +152,4 @@ void InitGroupMenus(void) mi.name.a = LPGEN("&Options..."); Menu_AddGroupMenuItem(&mi); - SET_UID(mi, 0x44ec5e76, 0xa5cc, 0x4e72, 0xb9, 0xa7, 0x5e, 0x41, 0xef, 0x99, 0x13, 0x19); - mi.position = 1000000; - mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA); - mi.pszService = "CLN/About"; - mi.name.a = LPGEN("&About the contact list..."); - Menu_AddGroupMenuItem(&mi); } diff --git a/plugins/Clist_nicer/src/resource.h b/plugins/Clist_nicer/src/resource.h index 6f09070cb1..e230037c47 100644 --- a/plugins/Clist_nicer/src/resource.h +++ b/plugins/Clist_nicer/src/resource.h @@ -8,7 +8,6 @@ #define IDD_OPT 6 #define IDD_EXCEPTION 20 #define IDD_OPTIONSDIALOG 101 -#define IDD_CLNABOUT 102 #define IDD_OPT_CLIST 126 #define IDI_CLIST 146 #define IDI_OPTIONS 163 @@ -118,8 +117,6 @@ #define IDC_SHOWMETA 1172 #define IDC_CENTERGROUPNAMES 1173 #define IDC_APPLYINDENTBG 1174 -#define IDC_COPYRIGHT 1178 -#define IDC_VERSION 1179 #define IDC_SHOWSTATUSICONS 1180 #define IDC_BROWSE 1184 #define IDC_INACTIVEPERC 1187 @@ -131,7 +128,6 @@ #define IDC_COPY_EXCEPTION 1201 #define IDC_EX_REASON 1202 #define IDC_TILEH 1208 -#define IDC_WHITERECT 1225 #define IDC_AUTOHIDE 1235 #define IDC_HIDETIME 1236 #define IDC_ALWAYSHIDEONTASKBAR 1237 @@ -192,7 +188,6 @@ #define IDC_HIDE 1534 #define IDC_TOPLINE 1535 #define IDC_BRINGTOFRONT 1579 -#define IDC_LOGO 1591 #define IDC_BLINKTIME 1607 #define IDC_BLINKSPIN 1608 #define IDC_DISABLEBLINK 1609 @@ -260,8 +255,6 @@ #define IDC_TBACCOUNTS 1817 #define IDC_TBFIRSTUID 1820 #define IDC_NOTIFYBUTTON 1900 -#define IDC_CLNICER 2002 -#define IDC_SUPPORT 2003 #define IDI_OVL_OFFLINE 2050 #define IDI_OVL_ONLINE 2051 #define IDI_OVL_AWAY 2052 -- cgit v1.2.3