diff options
Diffstat (limited to 'plugins/Popup')
-rw-r--r-- | plugins/Popup/res/popup.ico | bin | 1150 -> 0 bytes | |||
-rw-r--r-- | plugins/Popup/res/popup_no.ico | bin | 1150 -> 0 bytes | |||
-rw-r--r-- | plugins/Popup/res/resource.rc | 2 | ||||
-rw-r--r-- | plugins/Popup/src/icons.cpp | 2 | ||||
-rw-r--r-- | plugins/Popup/src/main.cpp | 14 | ||||
-rw-r--r-- | plugins/Popup/src/opt_skins.cpp | 4 | ||||
-rw-r--r-- | plugins/Popup/src/opttree.cpp | 2 | ||||
-rw-r--r-- | plugins/Popup/src/popup_thread.cpp | 2 | ||||
-rw-r--r-- | plugins/Popup/src/popup_wnd2.cpp | 4 | ||||
-rw-r--r-- | plugins/Popup/src/resource.h | 2 | ||||
-rw-r--r-- | plugins/Popup/src/srmm_menu.cpp | 4 |
11 files changed, 15 insertions, 21 deletions
diff --git a/plugins/Popup/res/popup.ico b/plugins/Popup/res/popup.ico Binary files differdeleted file mode 100644 index 5b3fe4e65b..0000000000 --- a/plugins/Popup/res/popup.ico +++ /dev/null diff --git a/plugins/Popup/res/popup_no.ico b/plugins/Popup/res/popup_no.ico Binary files differdeleted file mode 100644 index cac10ab068..0000000000 --- a/plugins/Popup/res/popup_no.ico +++ /dev/null diff --git a/plugins/Popup/res/resource.rc b/plugins/Popup/res/resource.rc index 75cd04bd35..8beb28511f 100644 --- a/plugins/Popup/res/resource.rc +++ b/plugins/Popup/res/resource.rc @@ -26,10 +26,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_POPUP ICON "popup.ico"
IDI_PU_FULLSCREEN ICON "popup_fs.ico"
IDI_PU_FAVOURITE ICON "popup_fav.ico"
-IDI_NOPOPUP ICON "popup_no.ico"
IDI_HISTORY ICON "popup_history.ico"
IDI_RELOAD ICON "reload.ico"
IDI_ACT_INFO ICON "info.ico"
diff --git a/plugins/Popup/src/icons.cpp b/plugins/Popup/src/icons.cpp index de1de4b60f..c3aa00fab2 100644 --- a/plugins/Popup/src/icons.cpp +++ b/plugins/Popup/src/icons.cpp @@ -26,8 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static IconItem iconList1[] =
{
// common popup
- { LPGEN("Popups are enabled"), "enabled", IDI_POPUP },
- { LPGEN("Popups are disabled"), "disabled", IDI_NOPOPUP },
{ LPGEN("With \"favorite\" overlay"), "favourite", IDI_PU_FAVOURITE },
{ LPGEN("With \"fullscreen\" overlay"), "fullscreen", IDI_PU_FULLSCREEN },
{ LPGEN("Popup History"), "history", IDI_HISTORY },
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 6f7348bb01..f9d4ccbb78 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -109,7 +109,7 @@ static int IconsChanged(WPARAM, LPARAM) {
LoadActions();
- HANDLE hIcon = Popup_Enabled() ? GetIconHandle(IDI_POPUP) : GetIconHandle(IDI_NOPOPUP);
+ HANDLE hIcon = Popup_Enabled() ? Skin_GetIconHandle(SKINICON_OTHER_POPUP) : Skin_GetIconHandle(SKINICON_OTHER_NOPOPUP);
Menu_ModifyItem(hMenuItem, nullptr, hIcon);
Menu_ModifyItem(hMenuRoot, nullptr, hIcon);
@@ -127,8 +127,8 @@ static int TTBLoaded(WPARAM, LPARAM) if (Popup_Enabled())
ttb.dwFlags |= TTBBF_PUSHED;
ttb.name = LPGEN("Toggle Popups");
- ttb.hIconHandleUp = GetIconHandle(IDI_NOPOPUP);
- ttb.hIconHandleDn = GetIconHandle(IDI_POPUP);
+ ttb.hIconHandleUp = Skin_GetIconHandle(SKINICON_OTHER_NOPOPUP);
+ ttb.hIconHandleDn = Skin_GetIconHandle(SKINICON_OTHER_POPUP);
ttb.pszTooltipUp = LPGEN("Enable Popups");
ttb.pszTooltipDn = LPGEN("Disable Popups");
hTTButton = g_plugin.addTTB(&ttb);
@@ -143,19 +143,19 @@ INT_PTR svcEnableDisableMenuCommand(WPARAM, LPARAM) // The module is enabled.
// The action to do is "disable popups" (show disabled) and we must write "enable popup" in the new item.
Popup_Enable(false);
- Menu_ModifyItem(hMenuItem, LPGENW("Enable Popups"), hIcon = GetIconHandle(IDI_NOPOPUP));
+ Menu_ModifyItem(hMenuItem, LPGENW("Enable Popups"), hIcon = Skin_GetIconHandle(SKINICON_OTHER_NOPOPUP));
}
else {
// The module is disabled.
// The action to do is enable popups (show enabled), then write "disable popup" in the new item.
Popup_Enable(true);
- Menu_ModifyItem(hMenuItem, LPGENW("Disable Popups"), hIcon = GetIconHandle(IDI_POPUP));
+ Menu_ModifyItem(hMenuItem, LPGENW("Disable Popups"), hIcon = Skin_GetIconHandle(SKINICON_OTHER_POPUP));
}
Menu_ModifyItem(hMenuRoot, nullptr, hIcon);
if (hTTButton)
- CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, (Popup_Enabled()) ? TTBST_PUSHED : 0);
+ CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, Popup_Enabled() ? TTBST_PUSHED : 0);
return 0;
}
@@ -171,7 +171,7 @@ void InitMenuItems(void) CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
- HANDLE hIcon = GetIconHandle(Popup_Enabled() ? IDI_POPUP : IDI_NOPOPUP);
+ HANDLE hIcon = Skin_GetIconHandle(Popup_Enabled() ? SKINICON_OTHER_POPUP : SKINICON_OTHER_NOPOPUP);
// Build main menu
hMenuRoot = mi.root = g_plugin.addRootMenu(MO_MAIN, MODULNAME_PLUW, -1000000000, hIcon);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 45418a6e6a..810e1f285c 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -43,7 +43,7 @@ void RegisterOptPrevBox() wcl.hbrBackground = nullptr; // (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszMenuName = nullptr;
wcl.lpszClassName = BOXPREVIEW_WNDCLASS;
- wcl.hIconSm = (HICON)LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
+ wcl.hIconSm = Skin_LoadIcon(SKINICON_OTHER_POPUP);
g_wndClass.cPopupPreviewBoxWndclass = RegisterClassEx(&wcl);
err = GetLastError();
if (!g_wndClass.cPopupPreviewBoxWndclass) {
@@ -545,7 +545,7 @@ static void BoxPreview_OnPaint(HWND hwnd, HDC mydc, int mode) HFONT hfnt = (HFONT)SelectObject(mydc, fonts.title);
GetClientRect(hwnd, &rc);
FillRect(mydc, &rc, hbr);
- DrawIconEx(mydc, 10, (rc.bottom - rc.top - 16) / 2, LoadIconEx(IDI_POPUP), 16, 16, 0, hbr, DI_NORMAL);
+ DrawIconEx(mydc, 10, (rc.bottom - rc.top - 16) / 2, Skin_LoadIcon(SKINICON_OTHER_POPUP), 16, 16, 0, hbr, DI_NORMAL);
SetBkMode(mydc, TRANSPARENT);
GetClientRect(hwnd, &rc);
rc.left += 30; // 10+16+4 -- icon
diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index 9a6c61fd59..a1c827d81d 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -161,7 +161,7 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, int *res TreeView_DeleteAllItems(hwndTree);
hImgLst = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR | ILC_COLOR32 | ILC_MASK, 5, 1);
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR | LR_SHARED));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_POPUP));
ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_TICK));
ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_NOTICK));
ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_TICK));
diff --git a/plugins/Popup/src/popup_thread.cpp b/plugins/Popup/src/popup_thread.cpp index 6d86c83432..4a3d6a6f47 100644 --- a/plugins/Popup/src/popup_thread.cpp +++ b/plugins/Popup/src/popup_thread.cpp @@ -228,7 +228,7 @@ static unsigned __stdcall PopupThread(void *) wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszMenuName = nullptr;
wcl.lpszClassName = L"PopupThreadManagerWnd";
- wcl.hIconSm = (HICON)LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
+ wcl.hIconSm = Skin_LoadIcon(SKINICON_OTHER_POPUP);
g_wndClass.cPopupThreadManagerWnd = RegisterClassExW(&wcl);
err = GetLastError();
if (!g_wndClass.cPopupThreadManagerWnd) {
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index e2dcc6bfce..c3b0ab1db1 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -55,7 +55,7 @@ bool LoadPopupWnd2() wcl.hCursor = LoadCursor(nullptr, IDC_ARROW);
wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszClassName = POPUP_WNDCLASS;
- wcl.hIconSm = (HICON)LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
+ wcl.hIconSm = Skin_LoadIcon(SKINICON_OTHER_POPUP);
g_wndClass.cPopupWnd2 = RegisterClassEx(&wcl);
DWORD err = GetLastError();
if (!g_wndClass.cPopupWnd2) {
@@ -95,7 +95,7 @@ bool LoadPopupWnd2() wcl.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH);
wcl.lpszMenuName = nullptr;
wcl.lpszClassName = L"PopupMenuHostWnd";
- wcl.hIconSm = (HICON)LoadImage(g_plugin.getInst(), MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
+ wcl.hIconSm = Skin_LoadIcon(SKINICON_OTHER_POPUP);
g_wndClass.cPopupMenuHostWnd = RegisterClassEx(&wcl);
err = GetLastError();
if (!g_wndClass.cPopupMenuHostWnd) {
diff --git a/plugins/Popup/src/resource.h b/plugins/Popup/src/resource.h index e13b597fed..9609d49527 100644 --- a/plugins/Popup/src/resource.h +++ b/plugins/Popup/src/resource.h @@ -13,8 +13,6 @@ #define IDD_POSITION 109
#define IDB_NOAVATAR 110
#define IDR_WHATSNEW 111
-#define IDI_POPUP 118
-#define IDI_NOPOPUP 120
#define IDI_HISTORY 184
#define IDI_RELOAD 185
#define IDI_MB_STOP 189
diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index 62f1d1403a..633532f477 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -109,7 +109,7 @@ void SrmmMenu_Load() sid.dwId = 0;
sid.szTooltip = LPGEN("Popup Mode: Auto");
- sid.hIcon = sid.hIconDisabled = LoadIconEx(IDI_POPUP);
+ sid.hIcon = sid.hIconDisabled = Skin_LoadIcon(SKINICON_OTHER_POPUP);
Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = 1;
@@ -124,7 +124,7 @@ void SrmmMenu_Load() sid.dwId = 3;
sid.szTooltip = LPGEN("Popup Mode: Block contact");
- sid.hIcon = sid.hIconDisabled = LoadIconEx(IDI_NOPOPUP);
+ sid.hIcon = sid.hIconDisabled = Skin_LoadIcon(SKINICON_OTHER_NOPOPUP);
Srmm_AddIcon(&sid, &g_plugin);
HookEvent(ME_MSG_ICONPRESSED, SrmmMenu_ProcessIconClick);
|