summaryrefslogtreecommitdiff
path: root/plugins/FileAsMessage
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FileAsMessage')
-rw-r--r--plugins/FileAsMessage/src/dialog.cpp11
-rw-r--r--plugins/FileAsMessage/src/main.cpp5
-rw-r--r--plugins/FileAsMessage/src/main.h1
3 files changed, 5 insertions, 12 deletions
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp
index 5c2329fcc5..8092c804a8 100644
--- a/plugins/FileAsMessage/src/dialog.cpp
+++ b/plugins/FileAsMessage/src/dialog.cpp
@@ -994,12 +994,9 @@ INT_PTR CALLBACK DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
hwndStatus = CreateStatusWindow(WS_CHILD | WS_VISIBLE, "", hDlg, IDC_STATUS);
SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)dat);
WindowList_Add(hFileList, hDlg, dat->hContact);
- SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)hIcons[ICON_MAIN]);
- SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcons[ICON_MAIN]);
+ Window_SetIcon_IcoLib(hDlg, iconList[ICON_MAIN].hIcolib);
SendDlgItemMessage(hDlg, IDC_STOP, BUTTONADDTOOLTIP, (WPARAM)Translate(hint_controls[ICON_STOP]), 0);
- //SetDlgItemText(hDlg, IDC_FILENAME, "C:\\!Developer\\!Miranda\\miranda\\bin\\release\\emo\\biggrin.gif");
-
mir_subclassWindow(GetDlgItem(hDlg, IDC_PROGRESS), ProgressWndProc);
SendDlgItemMessage(hDlg, IDC_PLAY, BUTTONSETASFLATBTN, 0, 0);
@@ -1008,9 +1005,6 @@ INT_PTR CALLBACK DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
SendDlgItemMessage(hDlg, IDC_STOP, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcons[ICON_STOP]);
dat->setState(STATE_IDLE);
- //ShowWindow(hDlg, SW_HIDE);
- //UpdateWindow(hDlg);
-
if (dat->inSend)
PostMessage(hDlg, WM_COMMAND, IDC_BROWSE, NULL);
@@ -1024,8 +1018,7 @@ INT_PTR CALLBACK DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TRUE;
}
case WM_FE_SKINCHANGE:
- SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM)hIcons[ICON_MAIN]);
- SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcons[ICON_MAIN]);
+ Window_SetIcon_IcoLib(hDlg, iconList[ICON_MAIN].hIcolib);
dat->setState(dat->iState);
SendDlgItemMessage(hDlg, IDC_STOP, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcons[ICON_STOP]);
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index 71adae048a..3345635863 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -26,7 +26,7 @@ HANDLE hHookDbSettingChange, hHookContactAdded, hHookSkinIconsChanged;
HICON hIcons[5];
-static IconItem iconList[] =
+IconItem iconList[] =
{
{ LPGEN("Play"), "FePlay", IDI_PLAY },
{ LPGEN("Pause"), "FePause", IDI_PAUSE },
@@ -47,7 +47,6 @@ int OnSkinIconsChanged(WPARAM wParam, LPARAM lParam)
hIcons[indx] = IcoLib_GetIconByHandle(iconList[indx].hIcolib);
WindowList_Broadcast(hFileList, WM_FE_SKINCHANGE, 0, 0);
-
return 0;
}
@@ -181,7 +180,7 @@ static int OnModulesLoaded(WPARAM wparam, LPARAM lparam)
CMenuItem mi;
SET_UID(mi, 0xe4a98d2a, 0xa54a, 0x4db1, 0x8d, 0x29, 0xd, 0x5c, 0xf1, 0x10, 0x69, 0x35);
mi.position = 200011;
- mi.hIcolibItem = hIcons[ICON_MAIN];
+ mi.hIcolibItem = iconList[ICON_MAIN].hIcolib;
mi.name.a = LPGEN("File As Message...");
mi.pszService = SERVICE_NAME "/FESendFile";
mi.flags = CMIF_NOTOFFLINE;
diff --git a/plugins/FileAsMessage/src/main.h b/plugins/FileAsMessage/src/main.h
index 1063fb8668..f828789264 100644
--- a/plugins/FileAsMessage/src/main.h
+++ b/plugins/FileAsMessage/src/main.h
@@ -45,6 +45,7 @@ extern MWindowList hFileList;
extern HANDLE hEventNewFile;
extern HICON hIcons[5];
+extern IconItem iconList[];
ulong memcrc32(uchar *ptr, int size, ulong crc);
INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);