summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-05-29 14:12:44 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-05-29 14:12:44 +0300
commit56bdae442699a6defb1b783ed4d8e81824acf8de (patch)
treee07a7467d75b3d7c2bb247bbff791ab2e47fbb45
parent2610fee647614e9e13daef898b99315c26fa987c (diff)
all icons with keys replaced with skin password icon SKINICON_OTHER_KEYS
-rw-r--r--include/m_skin.h1
-rw-r--r--plugins/Db3x_mmap/res/db3x_mmap.rc1
-rw-r--r--plugins/Db3x_mmap/res/pass.icobin1150 -> 0 bytes
-rw-r--r--plugins/Db3x_mmap/src/resource.h1
-rw-r--r--plugins/Db3x_mmap/src/stdafx.h1
-rw-r--r--plugins/Db3x_mmap/src/ui.cpp5
-rw-r--r--plugins/Dbx_mdbx/res/dbx_mdbx.rc1
-rw-r--r--plugins/Dbx_mdbx/src/dbcrypt.cpp142
-rw-r--r--plugins/Dbx_mdbx/src/resource.h2
-rw-r--r--plugins/Dbx_mdbx/src/stdafx.h1
-rw-r--r--plugins/Dbx_mdbx/src/ui.cpp66
-rw-r--r--plugins/Dbx_mdbx/src/ui.h183
-rw-r--r--plugins/NewStory/src/history.cpp86
-rw-r--r--plugins/NewStory/src/icons.cpp62
-rw-r--r--plugins/NewStory/src/icons.h7
-rw-r--r--plugins/NewStory/src/main.cpp57
-rw-r--r--plugins/NewStory/src/opt_passwords.cpp10
-rw-r--r--plugins/NewStory/src/stdafx.h1
-rw-r--r--plugins/NewStory/src/templates.cpp22
-rw-r--r--plugins/UserInfoEx/IconPacks/default/res/icons.rc1
-rw-r--r--plugins/UserInfoEx/IconPacks/default/res/icons_z2.rc1
-rw-r--r--plugins/UserInfoEx/IconPacks/default/src/icons.h1
-rw-r--r--plugins/UserInfoEx/IconPacks/ice/res/icons.rc1
-rw-r--r--plugins/UserInfoEx/IconPacks/ice/res/icons_z2.rc1
-rw-r--r--plugins/UserInfoEx/IconPacks/ice/src/icons.h1
-rw-r--r--plugins/UserInfoEx/src/mir_icolib.cpp1
-rw-r--r--protocols/FacebookRM/res/key.icobin1150 -> 0 bytes
-rw-r--r--protocols/FacebookRM/src/captcha.cpp2
-rw-r--r--protocols/FacebookRM/src/resource.h1
-rw-r--r--protocols/FacebookRM/src/theme.cpp1
-rw-r--r--protocols/JabberG/res/jabber.rc1
-rw-r--r--protocols/JabberG/res/key.icobin1150 -> 0 bytes
-rw-r--r--protocols/JabberG/src/jabber_captcha.cpp2
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp48
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp1
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp2
-rw-r--r--protocols/JabberG/src/jabber_password.cpp2
-rw-r--r--protocols/JabberG/src/resource.h1
-rw-r--r--protocols/VKontakte/res/key.icobin1150 -> 0 bytes
-rw-r--r--protocols/VKontakte/res/resource.rc2
-rw-r--r--protocols/VKontakte/src/misc.cpp1
-rw-r--r--protocols/VKontakte/src/resource.h1
-rw-r--r--protocols/VKontakte/src/vk_dialogs.cpp2
-rw-r--r--src/mir_app/res/icon_password.icobin0 -> 1150 bytes
-rw-r--r--src/mir_app/res/resource.rc1
-rw-r--r--src/mir_app/src/resource.h1
-rw-r--r--src/mir_app/src/skinicons.cpp2
47 files changed, 322 insertions, 405 deletions
diff --git a/include/m_skin.h b/include/m_skin.h
index 740c555d04..8a9f27b1ca 100644
--- a/include/m_skin.h
+++ b/include/m_skin.h
@@ -89,6 +89,7 @@
#define SKINICON_OTHER_GROUPADD 247
#define SKINICON_OTHER_POPUP 248
#define SKINICON_OTHER_NOPOPUP 249
+#define SKINICON_OTHER_KEYS 250
/////////////////////////////////////////////////////////////////////////////////////////
// Miranda skin
diff --git a/plugins/Db3x_mmap/res/db3x_mmap.rc b/plugins/Db3x_mmap/res/db3x_mmap.rc
index 6e0e6b9916..7b810e2ded 100644
--- a/plugins/Db3x_mmap/res/db3x_mmap.rc
+++ b/plugins/Db3x_mmap/res/db3x_mmap.rc
@@ -162,7 +162,6 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ICONPASS ICON "pass.ico"
IDI_LOGO ICON "logo.ico"
#ifdef APSTUDIO_INVOKED
diff --git a/plugins/Db3x_mmap/res/pass.ico b/plugins/Db3x_mmap/res/pass.ico
deleted file mode 100644
index dc47a6ed4f..0000000000
--- a/plugins/Db3x_mmap/res/pass.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/Db3x_mmap/src/resource.h b/plugins/Db3x_mmap/src/resource.h
index fae04bf51b..f0734b5662 100644
--- a/plugins/Db3x_mmap/src/resource.h
+++ b/plugins/Db3x_mmap/src/resource.h
@@ -3,7 +3,6 @@
// Используется D:\Others\SVN\MirandaNG\trunk\plugins\Db3x_mmap\res\db3x_mmap.rc
//
#define IDREMOVE 3
-#define IDI_ICONPASS 100
#define IDI_LOGO 101
#define IDD_LOGIN 102
#define IDD_NEWPASS 103
diff --git a/plugins/Db3x_mmap/src/stdafx.h b/plugins/Db3x_mmap/src/stdafx.h
index e80a1d79db..1d469c058f 100644
--- a/plugins/Db3x_mmap/src/stdafx.h
+++ b/plugins/Db3x_mmap/src/stdafx.h
@@ -46,6 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_metacontacts.h>
#include <m_protocols.h>
#include <m_gui.h>
+#include <m_skin.h>
#include <m_netlib.h>
#include <m_import.h>
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp
index 270006ac20..610d378321 100644
--- a/plugins/Db3x_mmap/src/ui.cpp
+++ b/plugins/Db3x_mmap/src/ui.cpp
@@ -34,8 +34,7 @@ struct DlgChangePassParam
static IconItem iconList[] =
{
- { LPGEN("Logo"), "logo", IDI_LOGO },
- { LPGEN("Password"), "password", IDI_ICONPASS }
+ { LPGEN("Logo"), "logo", IDI_LOGO }
};
static HGENMENU hSetPwdMenu;
@@ -315,7 +314,7 @@ static int OnOptionsInit(PVOID obj, WPARAM wParam, LPARAM)
void CDb3Mmap::UpdateMenuItem()
{
- Menu_ModifyItem(hSetPwdMenu, GetMenuTitle(), iconList[1].hIcolib);
+ Menu_ModifyItem(hSetPwdMenu, GetMenuTitle(), Skin_GetIconHandle(SKINICON_OTHER_KEYS));
}
static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
diff --git a/plugins/Dbx_mdbx/res/dbx_mdbx.rc b/plugins/Dbx_mdbx/res/dbx_mdbx.rc
index 0f2318f884..81d739e697 100644
--- a/plugins/Dbx_mdbx/res/dbx_mdbx.rc
+++ b/plugins/Dbx_mdbx/res/dbx_mdbx.rc
@@ -106,7 +106,6 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ICONPASS ICON "pass.ico"
IDI_LOGO ICON "logo.ico"
IDI_COMPACT ICON "compact.ico"
diff --git a/plugins/Dbx_mdbx/src/dbcrypt.cpp b/plugins/Dbx_mdbx/src/dbcrypt.cpp
index 47bf3c3e34..eafbf7e6e8 100644
--- a/plugins/Dbx_mdbx/src/dbcrypt.cpp
+++ b/plugins/Dbx_mdbx/src/dbcrypt.cpp
@@ -23,7 +23,59 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-/////////////////////////////////////////////////////////////////////////////////////////
+class CSelectCryptoDialog : public CDlgBase
+{
+ CCtrlCombo m_combo;
+ CCtrlData m_descr;
+ CCtrlCheck m_chkTotalCrypt;
+ CRYPTO_PROVIDER **m_provs;
+ size_t m_provscount;
+ CRYPTO_PROVIDER *m_selected;
+ bool m_bTotalEncryption;
+
+ bool OnInitDialog() override
+ {
+ for (size_t i = 0; i < m_provscount; i++) {
+ CRYPTO_PROVIDER *prov = m_provs[i];
+ m_combo.AddStringA(prov->pszName, i);
+ }
+ m_combo.SetCurSel(0);
+ m_descr.SetText(m_provs[0]->szDescr.w);
+ return true;
+ }
+
+ bool OnClose() override
+ {
+ m_selected = m_provs[m_combo.GetItemData(m_combo.GetCurSel())];
+ m_bTotalEncryption = m_chkTotalCrypt.GetState() != 0;
+ return true;
+ }
+
+ void OnComboChanged(CCtrlCombo*)
+ {
+ m_descr.SetText(m_provs[m_combo.GetItemData(m_combo.GetCurSel())]->szDescr.w);
+ }
+
+public:
+ CSelectCryptoDialog(CRYPTO_PROVIDER **provs, size_t count) :
+ CDlgBase(g_plugin, IDD_SELECT_CRYPTOPROVIDER),
+ m_combo(this, IDC_SELECTCRYPT_COMBO),
+ m_descr(this, IDC_CRYPTOPROVIDER_DESCR),
+ m_chkTotalCrypt(this, IDC_CHECK_TOTALCRYPT),
+ m_provs(provs),
+ m_provscount(count),
+ m_selected(nullptr)
+ {
+ m_combo.OnChange = Callback(this, &CSelectCryptoDialog::OnComboChanged);
+ }
+
+ inline CRYPTO_PROVIDER* GetSelected()
+ { return m_selected;
+ }
+ inline bool TotalSelected()
+ { return m_bTotalEncryption;
+ }
+};
char DBKey_Crypto_Provider[] = "Provider";
char DBKey_Crypto_Key[] = "Key";
@@ -66,6 +118,85 @@ CRYPTO_PROVIDER* CDbxMDBX::SelectProvider()
return pProv;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+class CEnterPasswordDialog : public CDlgBase
+{
+ CCtrlData m_header;
+ CCtrlData m_language;
+ CCtrlEdit m_passwordEdit;
+ CCtrlButton m_buttonOK;
+
+ friend class CDbxMDBX;
+ CDbxMDBX *m_db;
+ TCHAR m_newPass[100];
+ unsigned short m_wrongPass = 0;
+
+ INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
+ {
+ if (msg == WM_TIMER) {
+ UINT_PTR LangID = (UINT_PTR)GetKeyboardLayout(0);
+ char Lang[3] = { 0 };
+ GetLocaleInfoA(MAKELCID((LangID & 0xffffffff), SORT_DEFAULT), LOCALE_SABBREVLANGNAME, Lang, 2);
+ Lang[0] = toupper(Lang[0]);
+ Lang[1] = tolower(Lang[1]);
+ m_language.SetTextA(Lang);
+ return FALSE;
+ }
+ else if (msg == WM_CTLCOLORSTATIC) {
+ if ((HWND)lParam == m_language.GetHwnd()) {
+ SetTextColor((HDC)wParam, GetSysColor(COLOR_HIGHLIGHTTEXT));
+ SetBkMode((HDC)wParam, TRANSPARENT);
+ return (INT_PTR)GetSysColorBrush(COLOR_HIGHLIGHT);
+ }
+ }
+ return CDlgBase::DlgProc(msg, wParam, lParam);
+ }
+
+ bool OnInitDialog() override
+ {
+ m_header.SendMsg(WM_SETICON, ICON_SMALL, (LPARAM)g_plugin.getIcon(IDI_LOGO, true));
+
+ if (m_wrongPass) {
+ if (m_wrongPass > 2) {
+ m_passwordEdit.Disable();
+ m_buttonOK.Disable();
+ m_header.SetText(TranslateT("Too many errors!"));
+ }
+ else m_header.SetText(TranslateT("Password is not correct!"));
+ }
+ else m_header.SetText(TranslateT("Please type in your password"));
+
+ SetTimer(m_hwnd, 1, 200, nullptr);
+ return true;
+ }
+
+ void OnDestroy() override
+ {
+ KillTimer(m_hwnd, 1);
+ Window_FreeIcon_IcoLib(m_header.GetHwnd());
+ }
+
+ void OnOK(CCtrlButton*)
+ {
+ m_passwordEdit.GetText(m_newPass, _countof(m_newPass));
+ EndDialog(m_hwnd, -128);
+ }
+
+public:
+ CEnterPasswordDialog(CDbxMDBX *db) :
+ CDlgBase(g_plugin, IDD_LOGIN),
+ m_header(this, IDC_HEADERBAR),
+ m_language(this, IDC_LANG),
+ m_passwordEdit(this, IDC_USERPASS),
+ m_buttonOK(this, IDOK),
+ m_db(db)
+ {
+ m_newPass[0] = 0;
+ m_buttonOK.OnClick = Callback(this, &CEnterPasswordDialog::OnOK);
+ }
+};
+
int CDbxMDBX::InitCrypt()
{
if (m_crypto != nullptr)
@@ -91,18 +222,17 @@ int CDbxMDBX::InitCrypt()
key.iov_len = sizeof(DBKey_Crypto_Key); key.iov_base = DBKey_Crypto_Key;
if (mdbx_get(txn, m_dbCrypto, &key, &value) == MDBX_SUCCESS && (value.iov_len == m_crypto->getKeyLength())) {
if (!m_crypto->setKey((const BYTE*)value.iov_base, value.iov_len)) {
- DlgChangePassParam param = { this };
- CEnterPasswordDialog dlg(&param);
+ CEnterPasswordDialog dlg(this);
while (true) {
if (-128 != dlg.DoModal())
return 4;
- m_crypto->setPassword(pass_ptrA(mir_utf8encodeW(param.newPass)));
+ m_crypto->setPassword(pass_ptrA(mir_utf8encodeW(dlg.m_newPass)));
if (m_crypto->setKey((const BYTE*)value.iov_base, value.iov_len)) {
m_bUsesPassword = true;
- SecureZeroMemory(&param, sizeof(param));
+ SecureZeroMemory(&dlg.m_newPass, sizeof(dlg.m_newPass));
break;
}
- param.wrongPass++;
+ dlg.m_wrongPass++;
}
}
}
diff --git a/plugins/Dbx_mdbx/src/resource.h b/plugins/Dbx_mdbx/src/resource.h
index ac0d874da2..dfc3ffc748 100644
--- a/plugins/Dbx_mdbx/src/resource.h
+++ b/plugins/Dbx_mdbx/src/resource.h
@@ -3,7 +3,6 @@
// Используется d:\Others\SVN\MirandaNG\trunk\plugins\Dbx_mdb\res\dbx_mdbx.rc
//
#define IDREMOVE 3
-#define IDI_ICONPASS 100
#define IDI_LOGO 101
#define IDD_LOGIN 102
#define IDD_NEWPASS 103
@@ -21,7 +20,6 @@
#define IDC_TOTAL 1008
#define IDC_SELECTCRYPT_COMBO 1010
#define IDC_CRYPTOPROVIDER_DESCR 1011
-#define IDC_CHECK1 1012
#define IDC_CHECK_TOTALCRYPT 1012
// Next default values for new objects
diff --git a/plugins/Dbx_mdbx/src/stdafx.h b/plugins/Dbx_mdbx/src/stdafx.h
index 1d01db9c12..f2e2c2f6e1 100644
--- a/plugins/Dbx_mdbx/src/stdafx.h
+++ b/plugins/Dbx_mdbx/src/stdafx.h
@@ -50,6 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_protocols.h>
#include <m_netlib.h>
#include <m_gui.h>
+#include <m_skin.h>
#include "../../Libs/libmdbx/src/mdbx.h"
diff --git a/plugins/Dbx_mdbx/src/ui.cpp b/plugins/Dbx_mdbx/src/ui.cpp
index 7740130a9c..aa32b95ccf 100644
--- a/plugins/Dbx_mdbx/src/ui.cpp
+++ b/plugins/Dbx_mdbx/src/ui.cpp
@@ -39,7 +39,6 @@ void LanguageChanged(HWND hwndDlg)
}
}
-
/////////////////////////////////////////////////////////////////////////////////////////
static bool CheckOldPassword(HWND hwndDlg, CDbxMDBX *db)
@@ -58,6 +57,13 @@ static bool CheckOldPassword(HWND hwndDlg, CDbxMDBX *db)
return true;
}
+struct DlgChangePassParam
+{
+ CDbxMDBX *db;
+ TCHAR newPass[100];
+ unsigned short wrongPass;
+};
+
static INT_PTR CALLBACK sttChangePassword(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
DlgChangePassParam *param = (DlgChangePassParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -66,7 +72,7 @@ static INT_PTR CALLBACK sttChangePassword(HWND hwndDlg, UINT uMsg, WPARAM wParam
switch (uMsg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_HEADERBAR, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIconByHandle(iconList[0].hIcolib, true));
+ SendDlgItemMessage(hwndDlg, IDC_HEADERBAR, WM_SETICON, ICON_SMALL, (LPARAM)g_plugin.getIcon(IDI_LOGO, true));
param = (DlgChangePassParam*)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
@@ -136,7 +142,7 @@ static INT_PTR CALLBACK sttChangePassword(HWND hwndDlg, UINT uMsg, WPARAM wParam
case WM_DESTROY:
KillTimer(hwndDlg, 1);
- IcoLib_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_GETICON, ICON_SMALL, 0));
+ Window_FreeIcon_IcoLib(GetDlgItem(hwndDlg, IDC_HEADERBAR));
}
return FALSE;
@@ -160,6 +166,48 @@ static INT_PTR CompactMe(void* obj, WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
+class COptionsDialog : public CDlgBase
+{
+ CCtrlCheck m_chkStandart;
+ CCtrlCheck m_chkTotal;
+ CCtrlButton m_btnChangePass;
+ CDbxMDBX *m_db;
+
+ bool OnInitDialog() override
+ {
+ m_chkStandart.SetState(!m_db->isEncrypted());
+ m_chkTotal.SetState(m_db->isEncrypted());
+ m_btnChangePass.SetTextA(Translate(m_db->GetMenuTitle()));
+ return true;
+ }
+
+ bool OnApply() override
+ {
+ SetCursor(LoadCursor(nullptr, IDC_WAIT));
+ m_db->EnableEncryption(m_chkTotal.GetState() != 0);
+ SetCursor(LoadCursor(nullptr, IDC_ARROW));
+ m_chkStandart.SetState(!m_db->isEncrypted());
+ m_chkTotal.SetState(m_db->isEncrypted());
+ return true;
+ }
+
+ void ChangePass(CCtrlButton*)
+ {
+ CallService(MS_DB_CHANGEPASSWORD, 0, 0);
+ }
+
+public:
+ COptionsDialog(CDbxMDBX *db) :
+ CDlgBase(g_plugin, IDD_OPTIONS),
+ m_chkStandart(this, IDC_STANDARD),
+ m_chkTotal(this, IDC_TOTAL),
+ m_btnChangePass(this, IDC_USERPASS),
+ m_db(db)
+ {
+ m_btnChangePass.OnClick = Callback(this, &COptionsDialog::ChangePass);
+ }
+};
+
static int OnOptionsInit(PVOID obj, WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
@@ -173,9 +221,15 @@ static int OnOptionsInit(PVOID obj, WPARAM wParam, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
+static IconItem iconList[] =
+{
+ { LPGEN("Logo"), "logo", IDI_LOGO },
+ { LPGEN("Compact"), "compact", IDI_COMPACT }
+};
+
void CDbxMDBX::UpdateMenuItem()
{
- Menu_ModifyItem(hSetPwdMenu, _A2T(GetMenuTitle()), iconList[1].hIcolib);
+ Menu_ModifyItem(hSetPwdMenu, _A2T(GetMenuTitle()), Skin_GetIconHandle(SKINICON_OTHER_KEYS));
}
static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
@@ -194,14 +248,14 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
SET_UID(mi, 0x50321866, 0xba1, 0x46dd, 0xb3, 0xa6, 0xc3, 0xcc, 0x55, 0xf2, 0x42, 0x9e);
mi.position = 1000000001;
- mi.hIcolibItem = iconList[1].hIcolib;
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_KEYS);
mi.name.a = db->GetMenuTitle();
mi.pszService = MS_DB_CHANGEPASSWORD;
hSetPwdMenu = Menu_AddMainMenuItem(&mi);
SET_UID(mi, 0x98c0caf3, 0xBfe5, 0x4e31, 0xac, 0xf0, 0xab, 0x95, 0xb2, 0x9b, 0x9f, 0x73);
mi.position++;
- mi.hIcolibItem = iconList[2].hIcolib;
+ mi.hIcolibItem = iconList[1].hIcolib;
mi.name.a = LPGEN("Compact");
mi.pszService = MS_DB_COMPACT;
hSetPwdMenu = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Dbx_mdbx/src/ui.h b/plugins/Dbx_mdbx/src/ui.h
index 8ed9c0b1c3..832146ea33 100644
--- a/plugins/Dbx_mdbx/src/ui.h
+++ b/plugins/Dbx_mdbx/src/ui.h
@@ -1,187 +1,4 @@
#pragma once
-static IconItem iconList[] =
-{
- { LPGEN("Logo"), "logo", IDI_LOGO },
- { LPGEN("Password"), "password", IDI_ICONPASS },
- { LPGEN("Compact"), "compact", IDI_COMPACT }
-};
-
#define MS_DB_CHANGEPASSWORD "DB/UI/ChangePassword"
#define MS_DB_COMPACT "DB/UI/Compact"
-
-class COptionsDialog : public CDlgBase
-{
- CCtrlCheck m_chkStandart;
- CCtrlCheck m_chkTotal;
- CCtrlButton m_btnChangePass;
- CDbxMDBX *m_db;
-
- bool OnInitDialog() override
- {
- m_chkStandart.SetState(!m_db->isEncrypted());
- m_chkTotal.SetState(m_db->isEncrypted());
- m_btnChangePass.SetTextA(Translate(m_db->GetMenuTitle()));
- return true;
- }
-
- bool OnApply() override
- {
- SetCursor(LoadCursor(nullptr, IDC_WAIT));
- m_db->EnableEncryption(m_chkTotal.GetState() != 0);
- SetCursor(LoadCursor(nullptr, IDC_ARROW));
- m_chkStandart.SetState(!m_db->isEncrypted());
- m_chkTotal.SetState(m_db->isEncrypted());
- return true;
- }
-
- void ChangePass(CCtrlButton*)
- {
- CallService(MS_DB_CHANGEPASSWORD, 0, 0);
- }
-
-public:
- COptionsDialog(CDbxMDBX *db) :
- CDlgBase(g_plugin, IDD_OPTIONS),
- m_chkStandart(this, IDC_STANDARD),
- m_chkTotal(this, IDC_TOTAL),
- m_btnChangePass(this, IDC_USERPASS),
- m_db(db)
- {
- m_btnChangePass.OnClick = Callback(this, &COptionsDialog::ChangePass);
- }
-};
-
-class CSelectCryptoDialog : public CDlgBase
-{
- CCtrlCombo m_combo;
- CCtrlData m_descr;
- CCtrlCheck m_chkTotalCrypt;
- CRYPTO_PROVIDER **m_provs;
- size_t m_provscount;
- CRYPTO_PROVIDER *m_selected;
- bool m_bTotalEncryption;
-
- bool OnInitDialog() override
- {
- for (size_t i = 0; i < m_provscount; i++) {
- CRYPTO_PROVIDER *prov = m_provs[i];
- m_combo.AddStringA(prov->pszName, i);
- }
- m_combo.SetCurSel(0);
- m_descr.SetText(m_provs[0]->szDescr.w);
- return true;
- }
-
- bool OnClose() override
- {
- m_selected = m_provs[m_combo.GetItemData(m_combo.GetCurSel())];
- m_bTotalEncryption = m_chkTotalCrypt.GetState() != 0;
- return true;
- }
-
- void OnComboChanged(CCtrlCombo*)
- {
- m_descr.SetText(m_provs[m_combo.GetItemData(m_combo.GetCurSel())]->szDescr.w);
- }
-
-public:
- CSelectCryptoDialog(CRYPTO_PROVIDER **provs, size_t count) :
- CDlgBase(g_plugin, IDD_SELECT_CRYPTOPROVIDER),
- m_combo(this, IDC_SELECTCRYPT_COMBO),
- m_descr(this, IDC_CRYPTOPROVIDER_DESCR),
- m_chkTotalCrypt(this, IDC_CHECK_TOTALCRYPT),
- m_provs(provs),
- m_provscount(count),
- m_selected(nullptr)
- {
- m_combo.OnChange = Callback(this, &CSelectCryptoDialog::OnComboChanged);
- }
-
- inline CRYPTO_PROVIDER* GetSelected()
- {
- return m_selected;
- }
- inline bool TotalSelected()
- {
- return m_bTotalEncryption;
- }
-};
-
-struct DlgChangePassParam
-{
- CDbxMDBX *db;
- TCHAR newPass[100];
- unsigned short wrongPass;
-};
-
-class CEnterPasswordDialog : public CDlgBase
-{
- CCtrlData m_header;
- CCtrlData m_language;
- CCtrlEdit m_passwordEdit;
- CCtrlButton m_buttonOK;
-
- DlgChangePassParam *m_param;
-
- INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
- {
- if (msg == WM_TIMER) {
- UINT_PTR LangID = (UINT_PTR)GetKeyboardLayout(0);
- char Lang[3] = { 0 };
- GetLocaleInfoA(MAKELCID((LangID & 0xffffffff), SORT_DEFAULT), LOCALE_SABBREVLANGNAME, Lang, 2);
- Lang[0] = toupper(Lang[0]);
- Lang[1] = tolower(Lang[1]);
- m_language.SetTextA(Lang);
- return FALSE;
- }
- else if (msg == WM_CTLCOLORSTATIC) {
- if ((HWND)lParam == m_language.GetHwnd()) {
- SetTextColor((HDC)wParam, GetSysColor(COLOR_HIGHLIGHTTEXT));
- SetBkMode((HDC)wParam, TRANSPARENT);
- return (INT_PTR)GetSysColorBrush(COLOR_HIGHLIGHT);
- }
- }
- return CDlgBase::DlgProc(msg, wParam, lParam);
- }
-
- bool OnInitDialog() override
- {
- m_header.SendMsg(WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(iconList[0].defIconID)));
- if (m_param->wrongPass) {
- if (m_param->wrongPass > 2) {
- m_passwordEdit.Disable();
- m_buttonOK.Disable();
- m_header.SetText(TranslateT("Too many errors!"));
- }
- else m_header.SetText(TranslateT("Password is not correct!"));
- }
- else m_header.SetText(TranslateT("Please type in your password"));
-
- SetTimer(m_hwnd, 1, 200, nullptr);
- return true;
- }
-
- void OnDestroy() override
- {
- KillTimer(m_hwnd, 1);
- }
-
- void OnOK(CCtrlButton*)
- {
- m_passwordEdit.GetText(m_param->newPass, _countof(m_param->newPass));
- EndDialog(m_hwnd, -128);
- }
-
-public:
- CEnterPasswordDialog(DlgChangePassParam *param) :
- CDlgBase(g_plugin, IDD_LOGIN),
- m_header(this, IDC_HEADERBAR),
- m_language(this, IDC_LANG),
- m_passwordEdit(this, IDC_USERPASS),
- m_buttonOK(this, IDOK),
- m_param(param)
- {
- m_buttonOK.OnClick = Callback(this, &CEnterPasswordDialog::OnOK);
- }
-};
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;
diff --git a/plugins/UserInfoEx/IconPacks/default/res/icons.rc b/plugins/UserInfoEx/IconPacks/default/res/icons.rc
index 7a7844370f..e79dc72f4c 100644
--- a/plugins/UserInfoEx/IconPacks/default/res/icons.rc
+++ b/plugins/UserInfoEx/IconPacks/default/res/icons.rc
@@ -16,7 +16,6 @@ IDI_CLOCK ICON "clock.ico"
IDI_FEMALE ICON "female.ico"
IDI_MALE ICON "male.ico"
IDI_MARITAL ICON "marital.ico"
-IDI_PASSWORD ICON "password.ico"
IDI_TREE_ADDRESS ICON "address.ico"
IDI_TREE_GENERAL ICON "treeGeneral.ico"
IDI_TREE_ADVANCED ICON "treeAdvanced.ico"
diff --git a/plugins/UserInfoEx/IconPacks/default/res/icons_z2.rc b/plugins/UserInfoEx/IconPacks/default/res/icons_z2.rc
index 6a8291a879..acb8f9fa7b 100644
--- a/plugins/UserInfoEx/IconPacks/default/res/icons_z2.rc
+++ b/plugins/UserInfoEx/IconPacks/default/res/icons_z2.rc
@@ -16,7 +16,6 @@ IDI_CLOCK ICON "clock.ico"
IDI_FEMALE ICON "female.ico"
IDI_MALE ICON "male.ico"
IDI_MARITAL ICON "marital.ico"
-IDI_PASSWORD ICON "password.ico"
IDI_TREE_ADDRESS ICON "address.ico"
IDI_TREE_GENERAL ICON "treeGeneral.ico"
IDI_TREE_ADVANCED ICON "treeAdvanced.ico"
diff --git a/plugins/UserInfoEx/IconPacks/default/src/icons.h b/plugins/UserInfoEx/IconPacks/default/src/icons.h
index 46871836bd..21a5bf78c4 100644
--- a/plugins/UserInfoEx/IconPacks/default/src/icons.h
+++ b/plugins/UserInfoEx/IconPacks/default/src/icons.h
@@ -17,7 +17,6 @@
// common icons of details dialog pages
#define IDI_MIRANDA 108
-#define IDI_PASSWORD 109
#define IDI_FEMALE 110
#define IDI_MALE 111
#define IDI_CLOCK 112
diff --git a/plugins/UserInfoEx/IconPacks/ice/res/icons.rc b/plugins/UserInfoEx/IconPacks/ice/res/icons.rc
index 7a7844370f..e79dc72f4c 100644
--- a/plugins/UserInfoEx/IconPacks/ice/res/icons.rc
+++ b/plugins/UserInfoEx/IconPacks/ice/res/icons.rc
@@ -16,7 +16,6 @@ IDI_CLOCK ICON "clock.ico"
IDI_FEMALE ICON "female.ico"
IDI_MALE ICON "male.ico"
IDI_MARITAL ICON "marital.ico"
-IDI_PASSWORD ICON "password.ico"
IDI_TREE_ADDRESS ICON "address.ico"
IDI_TREE_GENERAL ICON "treeGeneral.ico"
IDI_TREE_ADVANCED ICON "treeAdvanced.ico"
diff --git a/plugins/UserInfoEx/IconPacks/ice/res/icons_z2.rc b/plugins/UserInfoEx/IconPacks/ice/res/icons_z2.rc
index 6a8291a879..acb8f9fa7b 100644
--- a/plugins/UserInfoEx/IconPacks/ice/res/icons_z2.rc
+++ b/plugins/UserInfoEx/IconPacks/ice/res/icons_z2.rc
@@ -16,7 +16,6 @@ IDI_CLOCK ICON "clock.ico"
IDI_FEMALE ICON "female.ico"
IDI_MALE ICON "male.ico"
IDI_MARITAL ICON "marital.ico"
-IDI_PASSWORD ICON "password.ico"
IDI_TREE_ADDRESS ICON "address.ico"
IDI_TREE_GENERAL ICON "treeGeneral.ico"
IDI_TREE_ADVANCED ICON "treeAdvanced.ico"
diff --git a/plugins/UserInfoEx/IconPacks/ice/src/icons.h b/plugins/UserInfoEx/IconPacks/ice/src/icons.h
index 7c2dfa7971..c861b425ec 100644
--- a/plugins/UserInfoEx/IconPacks/ice/src/icons.h
+++ b/plugins/UserInfoEx/IconPacks/ice/src/icons.h
@@ -17,7 +17,6 @@
// common icons of details dialog pages
#define IDI_MIRANDA 108
-#define IDI_PASSWORD 109
#define IDI_FEMALE 110
#define IDI_MALE 111
#define IDI_CLOCK 112
diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp
index 8d13206a7c..311c01bca1 100644
--- a/plugins/UserInfoEx/src/mir_icolib.cpp
+++ b/plugins/UserInfoEx/src/mir_icolib.cpp
@@ -31,7 +31,6 @@ static IconItem icons1[] =
{
// common
{ "common_im", LPGEN("IM naming"), IDI_MIRANDA },
- { "common_password", LPGEN("Password"), IDI_PASSWORD },
{ "common_female", LPGEN("Female"), IDI_FEMALE },
{ "common_male", LPGEN("Male"), IDI_MALE },
{ "common_birthday", LPGEN("Birthday"), IDI_BIRTHDAY },
diff --git a/protocols/FacebookRM/res/key.ico b/protocols/FacebookRM/res/key.ico
deleted file mode 100644
index 44df000c12..0000000000
--- a/protocols/FacebookRM/res/key.ico
+++ /dev/null
Binary files differ
diff --git a/protocols/FacebookRM/src/captcha.cpp b/protocols/FacebookRM/src/captcha.cpp
index 6c9d2335a6..23226857c4 100644
--- a/protocols/FacebookRM/src/captcha.cpp
+++ b/protocols/FacebookRM/src/captcha.cpp
@@ -39,7 +39,7 @@ static INT_PTR CALLBACK CaptchaFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- Window_SetIcon_IcoLib(hwndDlg, g_plugin.getIconHandle(IDI_KEYS));
+ Window_SetIcon_IcoLib(hwndDlg, Skin_GetIconHandle(SKINICON_OTHER_KEYS));
params = (CAPTCHA_FORM_PARAMS*)lParam;
SetDlgItemText(hwndDlg, IDC_INSTRUCTION, TranslateT("Enter the text you see"));
diff --git a/protocols/FacebookRM/src/resource.h b/protocols/FacebookRM/src/resource.h
index f898412dfa..4044214338 100644
--- a/protocols/FacebookRM/src/resource.h
+++ b/protocols/FacebookRM/src/resource.h
@@ -18,7 +18,6 @@
#define IDI_FRIENDS 130
#define IDI_CONVERSATION 131
#define IDI_READ 132
-#define IDI_KEYS 133
#define IDD_GUARD 134
#define IDI_ANGRY 135
#define IDI_HAHA 136
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp
index be9a232bc1..9c0400456a 100644
--- a/protocols/FacebookRM/src/theme.cpp
+++ b/protocols/FacebookRM/src/theme.cpp
@@ -43,7 +43,6 @@ static IconItem icons[] =
{ LPGEN("Friendship details"), "friendship", IDI_FRIENDS },
{ LPGEN("Conversation"), "conversation", IDI_CONVERSATION },
{ LPGEN("Message read"), "read", IDI_READ },
- { LPGEN("Captcha form icon"), "key", IDI_KEYS },
{ LPGEN("Angry"), "angry", IDI_ANGRY },
{ LPGEN("Haha"), "haha", IDI_HAHA },
{ LPGEN("Like"), "like", IDI_LIKE },
diff --git a/protocols/JabberG/res/jabber.rc b/protocols/JabberG/res/jabber.rc
index 3083e80746..9eb385fca4 100644
--- a/protocols/JabberG/res/jabber.rc
+++ b/protocols/JabberG/res/jabber.rc
@@ -783,7 +783,6 @@ IDI_NODE_WEATHER ICON "weather.ico"
IDI_DISCO_OK ICON "disco_ok.ico"
IDI_DISCO_FAIL ICON "disco_fail.ico"
IDI_GROUP ICON "group.ico"
-IDI_KEYS ICON "key.ico"
IDI_ADDCONTACT ICON "addcontact.ico"
IDI_AGENTS ICON "roster.ico"
IDI_VCARD ICON "pages.ico"
diff --git a/protocols/JabberG/res/key.ico b/protocols/JabberG/res/key.ico
deleted file mode 100644
index 44df000c12..0000000000
--- a/protocols/JabberG/res/key.ico
+++ /dev/null
Binary files differ
diff --git a/protocols/JabberG/src/jabber_captcha.cpp b/protocols/JabberG/src/jabber_captcha.cpp
index 6ccecae9c8..a462b82f57 100644
--- a/protocols/JabberG/src/jabber_captcha.cpp
+++ b/protocols/JabberG/src/jabber_captcha.cpp
@@ -44,7 +44,7 @@ INT_PTR CALLBACK JabberCaptchaFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
switch (msg) {
case WM_INITDIALOG: {
TranslateDialogDefault(hwndDlg);
- Window_SetSkinIcon_IcoLib(hwndDlg, IDI_KEYS);
+ Window_SetIcon_IcoLib(hwndDlg, Skin_GetIconHandle(SKINICON_OTHER_KEYS));
params = (CAPTCHA_FORM_PARAMS*)lParam;
const char *hint = params->hint;
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index baba3a7fce..0b63c8b10d 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -63,39 +63,39 @@ struct
static sttNodeIcons[] =
{
// standard identities: http://www.xmpp.org/registrar/disco-categories.html#directory
- {nullptr, "account", nullptr, 0, SKINICON_STATUS_ONLINE},
- {nullptr, "auth", nullptr, IDI_KEYS, 0},
- {nullptr, "automation", nullptr, IDI_COMMAND, 0},
- {nullptr, "client", nullptr, 0, SKINICON_STATUS_ONLINE},
- {nullptr, "collaboration", nullptr, IDI_GROUP, 0},
- {nullptr, "conference", nullptr, IDI_GROUP, 0},
-
- {nullptr, "directory", "chatroom", IDI_GROUP, 0},
- {nullptr, "directory", "group", IDI_GROUP, 0},
- {nullptr, "directory", "user", 0, SKINICON_OTHER_FINDUSER},
- {nullptr, "directory", nullptr, 0, SKINICON_OTHER_SEARCHALL},
+ { nullptr, "account", nullptr, 0, SKINICON_STATUS_ONLINE },
+ { nullptr, "auth", nullptr, 0, SKINICON_OTHER_KEYS },
+ { nullptr, "automation", nullptr, IDI_COMMAND, 0 },
+ { nullptr, "client", nullptr, 0, SKINICON_STATUS_ONLINE },
+ { nullptr, "collaboration", nullptr, IDI_GROUP, 0 },
+ { nullptr, "conference", nullptr, IDI_GROUP, 0 },
- {nullptr, "gateway", nullptr, IDI_AGENTS, 0},
+ { nullptr, "directory", "chatroom", IDI_GROUP, 0 },
+ { nullptr, "directory", "group", IDI_GROUP, 0 },
+ { nullptr, "directory", "user", 0, SKINICON_OTHER_FINDUSER },
+ { nullptr, "directory", nullptr, 0, SKINICON_OTHER_SEARCHALL },
- {nullptr, "headline", "rss", IDI_NODE_RSS, 0},
- {nullptr, "headline", "weather", IDI_NODE_WEATHER, 0},
+ { nullptr, "gateway", nullptr, IDI_AGENTS, 0 },
- {nullptr, "proxy", nullptr, 0, SKINICON_EVENT_FILE},
+ { nullptr, "headline", "rss", IDI_NODE_RSS, 0 },
+ { nullptr, "headline", "weather", IDI_NODE_WEATHER, 0 },
- {nullptr, "server", nullptr, IDI_NODE_SERVER, 0},
+ { nullptr, "proxy", nullptr, 0, SKINICON_EVENT_FILE },
- {nullptr, "store", nullptr, IDI_NODE_STORE, 0},
+ { nullptr, "server", nullptr, IDI_NODE_SERVER, 0 },
+
+ { nullptr, "store", nullptr, IDI_NODE_STORE, 0 },
// icons for non-standard identities
- {nullptr, "x-service", "x-rss", IDI_NODE_RSS, 0},
- {nullptr, "application", "x-weather", IDI_NODE_WEATHER, 0},
- {nullptr, "user", nullptr, 0, SKINICON_STATUS_ONLINE},
+ { nullptr, "x-service", "x-rss", IDI_NODE_RSS, 0 },
+ { nullptr, "application", "x-weather", IDI_NODE_WEATHER, 0 },
+ { nullptr, "user", nullptr, 0, SKINICON_STATUS_ONLINE },
// icon suggestions based on supported features
- {"jabber:iq:gateway", nullptr, nullptr, IDI_AGENTS, 0},
- {"jabber:iq:search", nullptr, nullptr, 0, SKINICON_OTHER_FINDUSER},
- {JABBER_FEAT_COMMANDS, nullptr, nullptr, IDI_COMMAND, 0},
- {JABBER_FEAT_REGISTER, nullptr, nullptr, IDI_KEYS, 0},
+ { "jabber:iq:gateway", nullptr, nullptr, IDI_AGENTS, 0 },
+ { "jabber:iq:search", nullptr, nullptr, 0, SKINICON_OTHER_FINDUSER },
+ { JABBER_FEAT_COMMANDS, nullptr, nullptr, IDI_COMMAND, 0 },
+ { JABBER_FEAT_REGISTER, nullptr, nullptr, 0, SKINICON_OTHER_KEYS },
};
void CJabberProto::OnIqResultServiceDiscoveryInfo(const TiXmlElement *iqNode, CJabberIqInfo *pInfo)
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp
index 6143bfc146..620600bf0f 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -413,7 +413,6 @@ static IconItem sharedIconList1[] =
{ LPGEN("Agents list"), "Agents", IDI_AGENTS },
{ LPGEN("Transports"), "transport", IDI_TRANSPORT },
{ LPGEN("Registered transports"), "transport_loc", IDI_TRANSPORTL },
- { LPGEN("Change password"), "key", IDI_KEYS },
{ LPGEN("Personal vCard"), "vcard", IDI_VCARD },
{ LPGEN("Convert to room"), "convert", IDI_USER2ROOM },
{ LPGEN("Login/logout"), "trlogonoff", IDI_LOGIN },
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index bfb1250cd9..0f7fcf3409 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -592,7 +592,7 @@ void CJabberProto::OnBuildProtoMenu()
CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleChangePassword);
mi.name.a = LPGEN("Change Password");
mi.position = 2000050007;
- mi.hIcolibItem = g_plugin.getIconHandle(IDI_KEYS);
+ mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_KEYS);
m_hMenuChangePassword = Menu_AddProtoMenuItem(&mi, m_szModuleName);
// "Roster editor"
diff --git a/protocols/JabberG/src/jabber_password.cpp b/protocols/JabberG/src/jabber_password.cpp
index b80679f565..e69a1f444b 100644
--- a/protocols/JabberG/src/jabber_password.cpp
+++ b/protocols/JabberG/src/jabber_password.cpp
@@ -41,7 +41,7 @@ public:
bool OnInitDialog() override
{
m_proto->m_hwndJabberChangePassword = m_hwnd;
- Window_SetIcon_IcoLib(m_hwnd, g_plugin.getIconHandle(IDI_KEYS));
+ Window_SetIcon_IcoLib(m_hwnd, Skin_GetIconHandle(SKINICON_OTHER_KEYS));
if (m_proto->m_bJabberOnline && m_proto->m_ThreadInfo != nullptr) {
char text[1024];
diff --git a/protocols/JabberG/src/resource.h b/protocols/JabberG/src/resource.h
index 3a216aa680..20c587c95d 100644
--- a/protocols/JabberG/src/resource.h
+++ b/protocols/JabberG/src/resource.h
@@ -37,7 +37,6 @@
#define IDD_CHANGEPASSWORD 136
#define IDD_SEARCHUSER 138
#define IDD_OPT_JABBER2 140
-#define IDI_KEYS 144
#define IDI_GROUP 147
#define IDD_GROUPCHAT_JOIN 148
#define IDI_AGENTS 154
diff --git a/protocols/VKontakte/res/key.ico b/protocols/VKontakte/res/key.ico
deleted file mode 100644
index 44df000c12..0000000000
--- a/protocols/VKontakte/res/key.ico
+++ /dev/null
Binary files differ
diff --git a/protocols/VKontakte/res/resource.rc b/protocols/VKontakte/res/resource.rc
index 52f849a8b7..096a4649f0 100644
--- a/protocols/VKontakte/res/resource.rc
+++ b/protocols/VKontakte/res/resource.rc
@@ -41,8 +41,6 @@ IDI_VISITPROFILE ICON "home.ico"
IDI_HISTORY ICON "history.ico"
-IDI_KEYS ICON "key.ico"
-
IDI_BROADCAST ICON "broadcast.ico"
IDI_STATUS ICON "status.ico"
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 1c61b92f4d..d0b75e0e6f 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -62,7 +62,6 @@ bool wlstrstr(wchar_t *_s1, wchar_t *_s2)
static IconItem iconList[] =
{
- { LPGEN("Captcha form icon"), "key", IDI_KEYS },
{ LPGEN("Notification icon"), "notification", IDI_NOTIFICATION },
{ LPGEN("Read message icon"), "read", IDI_READMSG },
{ LPGEN("Visit profile icon"), "profile", IDI_VISITPROFILE },
diff --git a/protocols/VKontakte/src/resource.h b/protocols/VKontakte/src/resource.h
index fbe4aadc7d..a125e5184a 100644
--- a/protocols/VKontakte/src/resource.h
+++ b/protocols/VKontakte/src/resource.h
@@ -26,7 +26,6 @@
#define IDI_MARKMESSAGESASREAD 122
#define IDD_OPT_MENU 122
#define IDD_CONTACTDELETE 123
-#define IDI_KEYS 203
#define IDC_LOGIN 1001
#define IDC_PASSWORD 1002
#define IDC_URL 1003
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp
index 8616098d7f..3d37a066b5 100644
--- a/protocols/VKontakte/src/vk_dialogs.cpp
+++ b/protocols/VKontakte/src/vk_dialogs.cpp
@@ -34,7 +34,7 @@ CVkCaptchaForm::CVkCaptchaForm(CVkProto *proto, CAPTCHA_FORM_PARAMS *param) :
bool CVkCaptchaForm::OnInitDialog()
{
- Window_SetIcon_IcoLib(m_hwnd, g_plugin.getIconHandle(IDI_KEYS));
+ Window_SetIcon_IcoLib(m_hwnd, Skin_GetIconHandle(SKINICON_OTHER_KEYS));
m_btnOk.Disable();
m_btnOpenInBrowser.Enable((m_param->bmp != nullptr));
diff --git a/src/mir_app/res/icon_password.ico b/src/mir_app/res/icon_password.ico
new file mode 100644
index 0000000000..c19e671abe
--- /dev/null
+++ b/src/mir_app/res/icon_password.ico
Binary files differ
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc
index a6931e5905..3483969f3e 100644
--- a/src/mir_app/res/resource.rc
+++ b/src/mir_app/res/resource.rc
@@ -1178,6 +1178,7 @@ IDI_MCSETDEFAULT ICON "meta_set_as_default.ico"
IDI_ADDGROUP ICON "addgroup.ico"
IDI_POPUP ICON "icon_popup.ico"
IDI_NOPOPUP ICON "icon_popup_no.ico"
+IDI_PASSWORD ICON "icon_password.ico"
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h
index 98cd007f9e..38b3ed8ebe 100644
--- a/src/mir_app/src/resource.h
+++ b/src/mir_app/src/resource.h
@@ -18,6 +18,7 @@
#define IDD_OPT_PROTOCOLORDER 109
#define IDD_OPT_ICOLIB 110
#define IDD_ICOLIB_IMPORT 111
+#define IDI_PASSWORD 112
#define IDI_LOADED_GRAY 113
#define IDI_NOTLOADED_GRAY 114
#define IDD_ADDED 115
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp
index ce1d786010..f583de9562 100644
--- a/src/mir_app/src/skinicons.cpp
+++ b/src/mir_app/src/skinicons.cpp
@@ -82,7 +82,7 @@ static struct StandardIconDescription mainIcons[] =
{ SKINICON_OTHER_GROUP, LPGEN("Move to group"), -IDI_MOVETOGROUP, 0, nullptr }, // 41
{ SKINICON_OTHER_ON, LPGEN("On"), -IDI_ON, 0, nullptr }, // 42
{ SKINICON_OTHER_OFF, LPGEN("Off"), -IDI_OFF, 0, nullptr }, // 43
- { -1, LPGEN("Unused"), 0, 0, nullptr }, // 44
+ { SKINICON_OTHER_KEYS, LPGEN("Password"), -IDI_PASSWORD, 0, nullptr }, // 44
{ -1, LPGEN("Unused"), 0, 0, nullptr }, // 45
{ SKINICON_OTHER_FRAME, LPGEN("Frames"), -IDI_FRAME, 0, nullptr }, // 46
{ SKINICON_OTHER_GROUPADD, LPGEN("Add group"), -IDI_ADDGROUP, 0, nullptr }, // 47