From 9f4d34389406e3dd7cf059ce649900d445e4ae6a Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 23 Aug 2017 12:45:34 +0300 Subject: ICQ: icon added to icolib, not used icon removed (fixes #294) --- protocols/IcqOscarJ/res/icq.ico | Bin 5430 -> 0 bytes protocols/IcqOscarJ/res/resources.rc | 1 - protocols/IcqOscarJ/src/editstring.cpp | 2 +- protocols/IcqOscarJ/src/init.cpp | 7 +++++++ protocols/IcqOscarJ/src/resource.h | 1 - protocols/IcqOscarJ/src/stdafx.h | 1 + 6 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 protocols/IcqOscarJ/res/icq.ico (limited to 'protocols') diff --git a/protocols/IcqOscarJ/res/icq.ico b/protocols/IcqOscarJ/res/icq.ico deleted file mode 100644 index 2e33305a76..0000000000 Binary files a/protocols/IcqOscarJ/res/icq.ico and /dev/null differ diff --git a/protocols/IcqOscarJ/res/resources.rc b/protocols/IcqOscarJ/res/resources.rc index 348c465c1f..f26bf473ba 100644 --- a/protocols/IcqOscarJ/res/resources.rc +++ b/protocols/IcqOscarJ/res/resources.rc @@ -25,7 +25,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_ICQ ICON "icq.ico" IDI_EXPANDSTRINGEDIT ICON "expandst.ico" ///////////////////////////////////////////////////////////////////////////// diff --git a/protocols/IcqOscarJ/src/editstring.cpp b/protocols/IcqOscarJ/src/editstring.cpp index 8a77f86d52..64eb745fba 100644 --- a/protocols/IcqOscarJ/src/editstring.cpp +++ b/protocols/IcqOscarJ/src/editstring.cpp @@ -252,7 +252,7 @@ void ChangeInfoData::BeginStringEdit(int iItem, RECT *rc, int i, WORD wVKey) if ((si.displayType & LIM_TYPE) == LI_LONGSTRING) { rc->right -= rc->bottom - rc->top; hwndExpandButton = CreateWindowA("BUTTON", "", WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_ICON, rc->right, rc->top, rc->bottom - rc->top, rc->bottom - rc->top, hwndList, NULL, hInst, NULL); - SendMessage(hwndExpandButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_EXPANDSTRINGEDIT), IMAGE_ICON, 0, 0, LR_SHARED)); + SendMessage(hwndExpandButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(iconList[0].hIcolib)); mir_subclassWindow(hwndExpandButton, ExpandButtonSubclassProc); } diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp index 2cc6a457f3..e8ee23bc74 100644 --- a/protocols/IcqOscarJ/src/init.cpp +++ b/protocols/IcqOscarJ/src/init.cpp @@ -91,6 +91,11 @@ static int OnPreShutdown(WPARAM, LPARAM) return 0; } +IconItem iconList[] = +{ + { LPGEN("Expand string edit"), "ICO_EXPANDSTRINGEDIT", IDI_EXPANDSTRINGEDIT } +}; + extern "C" int __declspec(dllexport) Load(void) { mir_getLP(&pluginInfo); @@ -125,6 +130,8 @@ extern "C" int __declspec(dllexport) Load(void) hExtraXStatus = ExtraIcon_RegisterIcolib("xstatus", LPGEN("ICQ xStatus"), "icq_xstatus13"); + Icon_Register(hInst, "ICQ", iconList, _countof(iconList)); + g_MenuInit(); return 0; } diff --git a/protocols/IcqOscarJ/src/resource.h b/protocols/IcqOscarJ/src/resource.h index abc0b2f1db..2c7145236b 100644 --- a/protocols/IcqOscarJ/src/resource.h +++ b/protocols/IcqOscarJ/src/resource.h @@ -2,7 +2,6 @@ // Microsoft Visual C++ generated include file. // Used by D:\miranda-ng\protocols\IcqOscarJ\res\resources.rc // -#define IDI_ICQ 101 #define IDS_IDENTIFY 102 #define IDD_ICQACCOUNT 103 #define IDD_ASKAUTH 104 diff --git a/protocols/IcqOscarJ/src/stdafx.h b/protocols/IcqOscarJ/src/stdafx.h index 5558d1c1c9..ed9f95efa7 100644 --- a/protocols/IcqOscarJ/src/stdafx.h +++ b/protocols/IcqOscarJ/src/stdafx.h @@ -117,3 +117,4 @@ extern LIST g_Instances; extern bool g_bTerminated; +extern IconItem iconList[]; \ No newline at end of file -- cgit v1.2.3