diff options
Diffstat (limited to 'plugins/NewStory')
-rw-r--r-- | plugins/NewStory/src/history.cpp | 86 | ||||
-rw-r--r-- | plugins/NewStory/src/icons.cpp | 62 | ||||
-rw-r--r-- | plugins/NewStory/src/icons.h | 7 | ||||
-rw-r--r-- | plugins/NewStory/src/main.cpp | 57 | ||||
-rw-r--r-- | plugins/NewStory/src/opt_passwords.cpp | 10 | ||||
-rw-r--r-- | plugins/NewStory/src/stdafx.h | 1 | ||||
-rw-r--r-- | plugins/NewStory/src/templates.cpp | 22 |
7 files changed, 89 insertions, 156 deletions
diff --git a/plugins/NewStory/src/history.cpp b/plugins/NewStory/src/history.cpp index cb1dd3d2c3..16ef59df54 100644 --- a/plugins/NewStory/src/history.cpp +++ b/plugins/NewStory/src/history.cpp @@ -569,21 +569,15 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara SetWindowText(hwnd, title); free(title); } - else - if (data->hContact == INVALID_CONTACT_ID) { + else { + if (data->hContact == INVALID_CONTACT_ID) SetWindowText(hwnd, TranslateT("Newstory Search Results")); - } - else { + else SetWindowText(hwnd, TranslateT("System Newstory")); - } + } - if (data->hContact != INVALID_CONTACT_ID) { - // ShowWindow(GetDlgItem(hwnd, IDC_TIMETREE), SW_HIDE); - // ShowWindow(GetDlgItem(hwnd, IDC_ITEMS), SW_HIDE); - // ShowWindow(GetDlgItem(hwnd, IDC_ITEMS2), SW_HIDE); - // ShowWindow(GetDlgItem(hwnd, IDC_SEARCHICON), SW_HIDE); + if (data->hContact != INVALID_CONTACT_ID) PostMessage(GetDlgItem(hwnd, IDC_ITEMS2), WM_USER, (WPARAM)data->hContact, 0); - } SendMessage(hwnd, UM_UPDATEICONS, 0, 0); SetFocus(GetDlgItem(hwnd, IDC_ITEMS2)); @@ -601,49 +595,41 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara return TRUE; } - /*case WM_MOUSEWHEEL: - SendMessage(GetDlgItem(hwnd, IDC_CUSTOM1), msg, wParam, lParam); - return TRUE;*/ - - /*case WM_SETFOCUS: - SetFocus(GetDlgItem(hwnd, IDC_CUSTOM1)); - return TRUE;*/ - case UM_UPDATEICONS: - SendMessage(hwnd, WM_SETICON, (WPARAM)ICON_SMALL, (LPARAM)GetIcon(ICO_NEWSTORY)); - - SendMessage(GetDlgItem(hwnd, IDC_SEARCHICON), STM_SETICON, (WPARAM)GetIcon(ICO_SEARCH), 0); - - SendMessage(GetDlgItem(hwnd, IDC_USERINFO), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_USERINFO)); - SendMessage(GetDlgItem(hwnd, IDC_MESSAGE), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_SENDMSG)); - SendMessage(GetDlgItem(hwnd, IDC_USERMENU), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_USERMENU)); - SendMessage(GetDlgItem(hwnd, IDC_COPY), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_COPY)); - SendMessage(GetDlgItem(hwnd, IDC_LOGOPTIONS), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_OPTIONS)); - SendMessage(GetDlgItem(hwnd, IDC_FILTER), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_FILTER)); - SendMessage(GetDlgItem(hwnd, IDC_DATEPOPUP), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_CALENDAR)); - SendMessage(GetDlgItem(hwnd, IDC_SEARCH), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_SEARCH)); - SendMessage(GetDlgItem(hwnd, IDC_EXPORT), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_EXPORT)); - SendMessage(GetDlgItem(hwnd, IDC_CLOSE), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_CLOSE)); - SendMessage(GetDlgItem(hwnd, IDC_FINDPREV), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_FINDPREV)); - SendMessage(GetDlgItem(hwnd, IDC_FINDNEXT), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_FINDNEXT)); - - SendMessage(data->ibMessages.hwndIco, STM_SETICON, (LPARAM)GetIcon(ICO_SENDMSG), 0); - SendMessage(data->ibMessages.hwndIcoIn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_MSGIN)); - SendMessage(data->ibMessages.hwndIcoOut, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_MSGOUT)); - SendMessage(data->ibFiles.hwndIco, STM_SETICON, (LPARAM)GetIcon(ICO_FILE), 0); - SendMessage(data->ibFiles.hwndIcoIn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_MSGIN)); - SendMessage(data->ibFiles.hwndIcoOut, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_MSGOUT)); - SendMessage(data->ibUrls.hwndIco, STM_SETICON, (LPARAM)GetIcon(ICO_URL), 0); - SendMessage(data->ibUrls.hwndIcoIn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_MSGIN)); - SendMessage(data->ibUrls.hwndIcoOut, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_MSGOUT)); - SendMessage(data->ibTotal.hwndIco, STM_SETICON, (LPARAM)GetIcon(ICO_UNKNOWN), 0); - SendMessage(data->ibTotal.hwndIcoIn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_MSGIN)); - SendMessage(data->ibTotal.hwndIcoOut, BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_MSGOUT)); + SendMessage(hwnd, WM_SETICON, (WPARAM)ICON_SMALL, (LPARAM)g_plugin.getIcon(ICO_NEWSTORY)); + + SendMessage(GetDlgItem(hwnd, IDC_SEARCHICON), STM_SETICON, (WPARAM)g_plugin.getIcon(ICO_SEARCH), 0); + + SendMessage(GetDlgItem(hwnd, IDC_USERINFO), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_USERINFO)); + SendMessage(GetDlgItem(hwnd, IDC_MESSAGE), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_SENDMSG)); + SendMessage(GetDlgItem(hwnd, IDC_USERMENU), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_USERMENU)); + SendMessage(GetDlgItem(hwnd, IDC_COPY), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_COPY)); + SendMessage(GetDlgItem(hwnd, IDC_LOGOPTIONS), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_OPTIONS)); + SendMessage(GetDlgItem(hwnd, IDC_FILTER), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_FILTER)); + SendMessage(GetDlgItem(hwnd, IDC_DATEPOPUP), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_CALENDAR)); + SendMessage(GetDlgItem(hwnd, IDC_SEARCH), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_SEARCH)); + SendMessage(GetDlgItem(hwnd, IDC_EXPORT), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_EXPORT)); + SendMessage(GetDlgItem(hwnd, IDC_CLOSE), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_CLOSE)); + SendMessage(GetDlgItem(hwnd, IDC_FINDPREV), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_FINDPREV)); + SendMessage(GetDlgItem(hwnd, IDC_FINDNEXT), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_FINDNEXT)); + + SendMessage(data->ibMessages.hwndIco, STM_SETICON, (LPARAM)g_plugin.getIcon(ICO_SENDMSG), 0); + SendMessage(data->ibMessages.hwndIcoIn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_MSGIN)); + SendMessage(data->ibMessages.hwndIcoOut, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_MSGOUT)); + SendMessage(data->ibFiles.hwndIco, STM_SETICON, (LPARAM)g_plugin.getIcon(ICO_FILE), 0); + SendMessage(data->ibFiles.hwndIcoIn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_MSGIN)); + SendMessage(data->ibFiles.hwndIcoOut, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_MSGOUT)); + SendMessage(data->ibUrls.hwndIco, STM_SETICON, (LPARAM)g_plugin.getIcon(ICO_URL), 0); + SendMessage(data->ibUrls.hwndIcoIn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_MSGIN)); + SendMessage(data->ibUrls.hwndIcoOut, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_MSGOUT)); + SendMessage(data->ibTotal.hwndIco, STM_SETICON, (LPARAM)g_plugin.getIcon(ICO_UNKNOWN), 0); + SendMessage(data->ibTotal.hwndIcoIn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_MSGIN)); + SendMessage(data->ibTotal.hwndIcoOut, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_MSGOUT)); if (CheckPassword(data->hContact, "")) - SendMessage(GetDlgItem(hwnd, IDC_SECURITY), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_NOPASSWORD)); + SendMessage(GetDlgItem(hwnd, IDC_SECURITY), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_NOPASSWORD)); else - SendMessage(GetDlgItem(hwnd, IDC_SECURITY), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_PASSWORD)); + SendMessage(GetDlgItem(hwnd, IDC_SECURITY), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_PASSWORD)); break; diff --git a/plugins/NewStory/src/icons.cpp b/plugins/NewStory/src/icons.cpp deleted file mode 100644 index b7dc2a9adb..0000000000 --- a/plugins/NewStory/src/icons.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include "stdafx.h" - -static IconItem icons[] = -{ - { LPGEN("Main Icon"), "main", ICO_NEWSTORY }, - { LPGEN("User Info"), "userinfo", ICO_USERINFO }, - { LPGEN("User Menu"), "usermenu", ICO_USERMENU }, - { LPGEN("Search"), "search", ICO_SEARCH }, - { LPGEN("Options"), "options", ICO_OPTIONS }, - { LPGEN("Filter"), "filter", ICO_FILTER }, - { LPGEN("Export"), "export", ICO_EXPORT }, - { LPGEN("Copy"), "copy", ICO_COPY }, - { LPGEN("Send Message"), "message", ICO_SENDMSG }, - { LPGEN("Close"), "close", ICO_CLOSE }, - - { LPGEN("Incoming Message"), "msgin", ICO_MSGIN }, - { LPGEN("Outgoing Message"), "msgout", ICO_MSGOUT }, - { LPGEN("User Signed In"), "signin", ICO_SIGNIN }, - { LPGEN("File"), "file", ICO_FILE }, - { LPGEN("URL"), "url", ICO_URL }, - { LPGEN("Unknown Event"), "unknown", ICO_UNKNOWN }, - - { LPGEN("Find Previous"), "findprev", ICO_FINDPREV }, - { LPGEN("Find Next"), "findnext", ICO_FINDNEXT }, - { LPGEN("Password disabled"), "nopassword",ICO_NOPASSWORD }, - { LPGEN("Password enabled"), "password", ICO_PASSWORD }, - { LPGEN("Jump to Date"), "calendar", ICO_CALENDAR }, - - { LPGEN("Template Group"), "tplgroup", ICO_TPLGROUP }, - { LPGEN("Reset"), "reset", ICO_RESET }, - { LPGEN("Update Preview"), "preview", ICO_PREVIEW }, - { LPGEN("Help"), "varhelp", ICO_VARHELP }, - { LPGEN("Save Password"), "savepass", ICO_SAVEPASS } -}; - -int evtIconsChanged(WPARAM, LPARAM) -{ - //RefreshIcons(icons, ICO_COUNT); - //WindowList_Broadcast(hNewstoryWindows, UM_UPDATEICONS, 0, 0); - return 0; -} - -void InitIcons() -{ - g_plugin.registerIcon(MODULETITLE, icons); - HookEvent(ME_SKIN_ICONSCHANGED, evtIconsChanged); -} - -/*void RefreshIcons(IconItem *icons, int count) -{ - //if (ServiceExists(MS_SKIN2_ADDICON)) - // for (int i = 0; i < count; i++) - // icons[i].hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)icons[i].szId); -}*/ - -HICON GetIcon(int iconId) -{ - for (auto &it : icons) - if (it.defIconID == iconId) - return IcoLib_GetIconByHandle(it.hIcolib); - return nullptr; -} diff --git a/plugins/NewStory/src/icons.h b/plugins/NewStory/src/icons.h deleted file mode 100644 index 0d74e6c977..0000000000 --- a/plugins/NewStory/src/icons.h +++ /dev/null @@ -1,7 +0,0 @@ -//extern IconItem icons[]; -//extern int iconCount; - -HICON GetIcon(int iconId); - -void InitIcons(); -void RefreshIcons(IconItem *icons, int count);
\ No newline at end of file diff --git a/plugins/NewStory/src/main.cpp b/plugins/NewStory/src/main.cpp index ebce994534..7bdfb36713 100644 --- a/plugins/NewStory/src/main.cpp +++ b/plugins/NewStory/src/main.cpp @@ -42,9 +42,41 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHIST ///////////////////////////////////////////////////////////////////////////////////////// +static IconItem icons[] = +{ + { LPGEN("Main Icon"), "main", ICO_NEWSTORY }, + { LPGEN("User Info"), "userinfo", ICO_USERINFO }, + { LPGEN("User Menu"), "usermenu", ICO_USERMENU }, + { LPGEN("Search"), "search", ICO_SEARCH }, + { LPGEN("Options"), "options", ICO_OPTIONS }, + { LPGEN("Filter"), "filter", ICO_FILTER }, + { LPGEN("Export"), "export", ICO_EXPORT }, + { LPGEN("Copy"), "copy", ICO_COPY }, + { LPGEN("Send Message"), "message", ICO_SENDMSG }, + { LPGEN("Close"), "close", ICO_CLOSE }, + + { LPGEN("Incoming Message"), "msgin", ICO_MSGIN }, + { LPGEN("Outgoing Message"), "msgout", ICO_MSGOUT }, + { LPGEN("User Signed In"), "signin", ICO_SIGNIN }, + { LPGEN("File"), "file", ICO_FILE }, + { LPGEN("URL"), "url", ICO_URL }, + { LPGEN("Unknown Event"), "unknown", ICO_UNKNOWN }, + + { LPGEN("Find Previous"), "findprev", ICO_FINDPREV }, + { LPGEN("Find Next"), "findnext", ICO_FINDNEXT }, + { LPGEN("Password disabled"), "nopassword",ICO_NOPASSWORD }, + { LPGEN("Password enabled"), "password", ICO_PASSWORD }, + { LPGEN("Jump to Date"), "calendar", ICO_CALENDAR }, + + { LPGEN("Template Group"), "tplgroup", ICO_TPLGROUP }, + { LPGEN("Reset"), "reset", ICO_RESET }, + { LPGEN("Update Preview"), "preview", ICO_PREVIEW }, + { LPGEN("Help"), "varhelp", ICO_VARHELP }, + { LPGEN("Save Password"), "savepass", ICO_SAVEPASS } +}; + int evtModulesLoaded(WPARAM, LPARAM) { - InitIcons(); InitFonts(); InitNewstoryControl(); InitHistory(); @@ -57,46 +89,31 @@ int evtModulesLoaded(WPARAM, LPARAM) mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY; mi.name.w = L"User Newstory"; mi.position = 1999990000; - mi.hIcon = GetIcon(ICO_NEWSTORY); + mi.hIcon = g_plugin.getIcon(ICO_NEWSTORY); Menu_AddContactMenuItem(&mi); mi.pszService = "Newstory/System"; mi.name.w = L"System Newstory"; mi.position = 1999990000; - mi.hIcon = GetIcon(ICO_NEWSTORY); + mi.hIcon = g_plugin.getIcon(ICO_NEWSTORY); Menu_AddMainMenuItem(&mi); - return 0; } int CMPlugin::Load() { + g_plugin.registerIcon(MODULETITLE, icons); + CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY, svcShowNewstory); CreateServiceFunction("Newstory/System", svcShowSystemNewstory); hhkModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, evtModulesLoaded); - /* - hhkOptInitialise = HookEvent(ME_OPT_INITIALISE, OptInitialise); - - options.fnup = options.fndown = 0; - options.flags = 0; - LoadOptions(); - */ return 0; } -//void DoCleanup(); - int CMPlugin::Unload() { UnhookEvent(hhkModulesLoaded); - /* - UnhookEvent(hhkOptInitialise); - if (hhkTTBLoaded) - UnhookEvent(hhkTTBLoaded); - - DoCleanup(); - */ FreeHistory(); return 0; } diff --git a/plugins/NewStory/src/opt_passwords.cpp b/plugins/NewStory/src/opt_passwords.cpp index 3427def74d..46b280ba98 100644 --- a/plugins/NewStory/src/opt_passwords.cpp +++ b/plugins/NewStory/src/opt_passwords.cpp @@ -29,8 +29,8 @@ INT_PTR CALLBACK OptPasswordsDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) case WM_INITDIALOG: HIMAGELIST himg; himg = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 3, 3); - icoidNoPassword = ImageList_AddIcon(himg, GetIcon(ICO_NOPASSWORD)); - icoidPassword = ImageList_AddIcon(himg, GetIcon(ICO_PASSWORD)); + icoidNoPassword = ImageList_AddIcon(himg, g_plugin.getIcon(ICO_NOPASSWORD)); + icoidPassword = ImageList_AddIcon(himg, g_plugin.getIcon(ICO_PASSWORD)); SendDlgItemMessage(hwnd, IDC_LIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)himg); SendDlgItemMessage(hwnd, IDC_LIST, CLM_SETEXTRACOLUMNS, 1, 0); @@ -50,12 +50,12 @@ INT_PTR CALLBACK OptPasswordsDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) SetAllContactIcons(GetDlgItem(hwnd, IDC_LIST)); ResetListOptions(GetDlgItem(hwnd, IDC_LIST)); - SendMessage(GetDlgItem(hwnd, IDC_ICO_NOPASSWORD), STM_SETICON, (WPARAM)GetIcon(ICO_NOPASSWORD), 0); - SendMessage(GetDlgItem(hwnd, IDC_ICO_PASSWORD), STM_SETICON, (WPARAM)GetIcon(ICO_PASSWORD), 0); + SendMessage(GetDlgItem(hwnd, IDC_ICO_NOPASSWORD), STM_SETICON, (WPARAM)g_plugin.getIcon(ICO_NOPASSWORD), 0); + SendMessage(GetDlgItem(hwnd, IDC_ICO_PASSWORD), STM_SETICON, (WPARAM)g_plugin.getIcon(ICO_PASSWORD), 0); SendMessage(GetDlgItem(hwnd, IDC_SAVEPASSWORD), BUTTONSETASFLATBTN, 0, 0); SendMessage(GetDlgItem(hwnd, IDC_SAVEPASSWORD), BUTTONADDTOOLTIP, (WPARAM)Translate("Save Password"), 0); - SendMessage(GetDlgItem(hwnd, IDC_SAVEPASSWORD), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_SAVEPASS)); + SendMessage(GetDlgItem(hwnd, IDC_SAVEPASSWORD), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_SAVEPASS)); return TRUE; case WM_NOTIFY: diff --git a/plugins/NewStory/src/stdafx.h b/plugins/NewStory/src/stdafx.h index 1d86e347f2..d58baf48d0 100644 --- a/plugins/NewStory/src/stdafx.h +++ b/plugins/NewStory/src/stdafx.h @@ -68,7 +68,6 @@ Boston, MA 02111-1307, USA. #include "utils.h" #include "opt_passwords.h" #include "options.h" -#include "icons.h" #include "fonts.h" #include "password.h" #include "calendartool.h" diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index da74186b59..76d2b9ea27 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -268,16 +268,16 @@ void vfEvent(int, TemplateVars *vars, MCONTACT, HistoryArray::ItemData *item) // %I: Icon switch (item->dbe.eventType) { case EVENTTYPE_MESSAGE: - hIcon = GetIcon(ICO_SENDMSG); + hIcon = g_plugin.getIcon(ICO_SENDMSG); break; case EVENTTYPE_FILE: - hIcon = GetIcon(ICO_FILE); + hIcon = g_plugin.getIcon(ICO_FILE); break; case EVENTTYPE_STATUSCHANGE: - hIcon = GetIcon(ICO_SIGNIN); + hIcon = g_plugin.getIcon(ICO_SIGNIN); break; default: - hIcon = GetIcon(ICO_UNKNOWN); + hIcon = g_plugin.getIcon(ICO_UNKNOWN); break; } s = (TCHAR *)calloc(64, sizeof(TCHAR)); @@ -286,9 +286,9 @@ void vfEvent(int, TemplateVars *vars, MCONTACT, HistoryArray::ItemData *item) // %i: Direction icon if (item->dbe.flags & DBEF_SENT) - hIcon = GetIcon(ICO_MSGOUT); + hIcon = g_plugin.getIcon(ICO_MSGOUT); else - hIcon = GetIcon(ICO_MSGIN); + hIcon = g_plugin.getIcon(ICO_MSGIN); s = (TCHAR *)calloc(64, sizeof(TCHAR)); wsprintf(s, _T("[$hicon=%d$]"), hIcon); @@ -431,7 +431,7 @@ INT_PTR CALLBACK OptTemplatesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HIMAGELIST himgTree = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 1, 1); TreeView_SetImageList(GetDlgItem(hwnd, IDC_TEMPLATES), himgTree, TVSIL_NORMAL); - ImageList_AddIcon(himgTree, GetIcon(ICO_TPLGROUP)); + ImageList_AddIcon(himgTree, g_plugin.getIcon(ICO_TPLGROUP)); for (int i = 0; i < TPL_COUNT; i++) { if (!i || lstrcmp(templates[i].group, templates[i - 1].group)) { @@ -457,7 +457,7 @@ INT_PTR CALLBACK OptTemplatesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM tvis.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE; tvis.item.pszText = templates[i].title; tvis.item.iSelectedImage = tvis.item.iImage = - ImageList_AddIcon(himgTree, GetIcon(templates[i].icon)); + ImageList_AddIcon(himgTree, g_plugin.getIcon(templates[i].icon)); tvis.item.lParam = i; TreeView_InsertItem(GetDlgItem(hwnd, IDC_TEMPLATES), &tvis); } @@ -476,9 +476,9 @@ INT_PTR CALLBACK OptTemplatesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SendMessage(GetDlgItem(hwnd, IDC_UPDATEPREVIEW), BUTTONADDTOOLTIP, (WPARAM)Translate("Update Preview"), 0); SendMessage(GetDlgItem(hwnd, IDC_VARHELP), BUTTONADDTOOLTIP, (WPARAM)Translate("Help on Variables"), 0); - SendMessage(GetDlgItem(hwnd, IDC_DISCARD), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_RESET)); - SendMessage(GetDlgItem(hwnd, IDC_UPDATEPREVIEW), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_PREVIEW)); - SendMessage(GetDlgItem(hwnd, IDC_VARHELP), BM_SETIMAGE, IMAGE_ICON, (LPARAM)GetIcon(ICO_VARHELP)); + SendMessage(GetDlgItem(hwnd, IDC_DISCARD), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_RESET)); + SendMessage(GetDlgItem(hwnd, IDC_UPDATEPREVIEW), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_PREVIEW)); + SendMessage(GetDlgItem(hwnd, IDC_VARHELP), BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(ICO_VARHELP)); return TRUE; |