summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2017-08-23 14:08:43 +0300
committerKirill Volinsky <mataes2007@gmail.com>2017-08-23 14:08:43 +0300
commit22ddb8cad9845e24420fedd9d15c1d1cf487f932 (patch)
tree858cba74f8f3a5b42eb467742fd01329f3fddee8 /protocols
parent9f4d34389406e3dd7cf059ce649900d445e4ae6a (diff)
Jabber: all icons added to icolib (fixes #296)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp8
-rw-r--r--protocols/JabberG/src/jabber_iqid_muc.cpp5
-rwxr-xr-xprotocols/JabberG/src/jabber_userinfo.cpp2
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp11
4 files changed, 15 insertions, 11 deletions
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp
index 74d9dcd0bc..e522cb8fce 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -456,6 +456,7 @@ void CJabberProto::CheckAllContactsAreTransported()
static IconItem sharedIconList1[] =
{
+ { LPGEN("Jabber"), "jabber", IDI_JABBER },
{ LPGEN("Privacy Lists"), "privacylists", IDI_PRIVACY_LISTS },
{ LPGEN("Bookmarks"), "bookmarks", IDI_BOOKMARKS },
{ LPGEN("Notes"), "notes", IDI_NOTES },
@@ -472,7 +473,12 @@ static IconItem sharedIconList1[] =
{ LPGEN("Service Discovery"), "servicediscovery", IDI_SERVICE_DISCOVERY },
{ LPGEN("AdHoc Command"), "adhoc", IDI_COMMAND },
{ LPGEN("XML Console"), "xmlconsole", IDI_CONSOLE },
- { LPGEN("OpenID Request"), "openid", IDI_HTTP_AUTH }
+ { LPGEN("OpenID Request"), "openid", IDI_HTTP_AUTH },
+ { LPGEN("Add contact"), "addcontact", IDI_ADDCONTACT },
+ { LPGEN("Delete"), "delete", IDI_DELETE },
+ { LPGEN("Edit"), "edit", IDI_EDIT },
+ { LPGEN("Open"), "open", IDI_OPEN },
+ { LPGEN("Save"), "save", IDI_SAVE }
};
static IconItem sharedIconList2[] =
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp
index 38142c512b..b55b6fa61e 100644
--- a/protocols/JabberG/src/jabber_iqid_muc.cpp
+++ b/protocols/JabberG/src/jabber_iqid_muc.cpp
@@ -283,11 +283,10 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w
if (nm->iSubItem == 1) {
HICON hIcon;
if (nm->nmcd.lItemlParam == -1)
- hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_ADDCONTACT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
+ hIcon = g_LoadIconEx("addcontact");
else
- hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
+ hIcon = g_LoadIconEx("delete");
DrawIconEx(nm->nmcd.hdc, (rc.left + rc.right - GetSystemMetrics(SM_CXSMICON)) / 2, (rc.top + rc.bottom - GetSystemMetrics(SM_CYSMICON)) / 2, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, GetSysColorBrush(COLOR_WINDOW), DI_NORMAL);
- DestroyIcon(hIcon);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, CDRF_SKIPDEFAULT);
return TRUE;
}
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 92498413e5..d8aea4a2cb 100755
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -620,7 +620,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP
photoInfo->ppro = NULL;
photoInfo->hBitmap = NULL;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)photoInfo);
- SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_SAVE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
+ SendDlgItemMessage(hwndDlg, IDC_SAVE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_LoadIconEx("save"));
SendDlgItemMessage(hwndDlg, IDC_SAVE, BUTTONSETASFLATBTN, TRUE, 0);
ShowWindow(GetDlgItem(hwndDlg, IDC_LOAD), SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_DELETE), SW_HIDE);
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index 16e57c3817..4cbf98bf75 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -264,9 +264,9 @@ static INT_PTR CALLBACK PhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case WM_INITDIALOG:
if (!lParam) break; // Launched from userinfo
TranslateDialogDefault(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_LOAD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_OPEN), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
+ SendDlgItemMessage(hwndDlg, IDC_LOAD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_LoadIconEx("open"));
SendDlgItemMessage(hwndDlg, IDC_LOAD, BUTTONSETASFLATBTN, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_DELETE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadImage(hInst, MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
+ SendDlgItemMessage(hwndDlg, IDC_DELETE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_LoadIconEx("delete"));
SendDlgItemMessage(hwndDlg, IDC_DELETE, BUTTONSETASFLATBTN, TRUE, 0);
ShowWindow(GetDlgItem(hwndDlg, IDC_SAVE), SW_HIDE);
{
@@ -803,14 +803,13 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP
ListView_GetSubItemRect(nm->nmcd.hdr.hwndFrom, nm->nmcd.dwItemSpec, nm->iSubItem, LVIR_LABEL, &rc);
if (nm->nmcd.lItemlParam == -1 && nm->iSubItem == 3)
- hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_ADDCONTACT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
+ hIcon = g_LoadIconEx("addcontact");
else if (nm->iSubItem == 2 && nm->nmcd.lItemlParam != -1)
- hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_EDIT), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
+ hIcon = g_LoadIconEx("edit");
else if (nm->iSubItem == 3 && nm->nmcd.lItemlParam != -1)
- hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_DELETE), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
+ hIcon = g_LoadIconEx("delete");
else break;
DrawIconEx(nm->nmcd.hdc, (rc.left + rc.right - GetSystemMetrics(SM_CXSMICON)) / 2, (rc.top + rc.bottom - GetSystemMetrics(SM_CYSMICON)) / 2, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
- DestroyIcon(hIcon);
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, CDRF_SKIPDEFAULT);
return TRUE;
}