summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-02-18 13:33:24 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-02-18 13:33:24 +0000
commitc9bf09d88ffe7db1c2a3e2cdc3cc3085573cb23c (patch)
treea8e0c70e3e16d5898676024b8a9eaa4bcb2c0372 /plugins
parent22fa808cca12864de4a914e6f8de72b3cbcd46af (diff)
extended crypto provider selector
git-svn-id: http://svn.miranda-ng.org/main/trunk@16303 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Db3x_mmap/res/db3x_mmap.rc23
-rw-r--r--plugins/Db3x_mmap/src/resource.h5
-rw-r--r--plugins/Db3x_mmap/src/ui.h18
3 files changed, 32 insertions, 14 deletions
diff --git a/plugins/Db3x_mmap/res/db3x_mmap.rc b/plugins/Db3x_mmap/res/db3x_mmap.rc
index 3bd874bacf..2688ddcac2 100644
--- a/plugins/Db3x_mmap/res/db3x_mmap.rc
+++ b/plugins/Db3x_mmap/res/db3x_mmap.rc
@@ -30,7 +30,8 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,113,55,50,14
PUSHBUTTON "Cancel",IDCANCEL,172,55,50,14
- COMBOBOX IDC_SELECTCRYPT_COMBO,15,23,199,30,CBS_DROPDOWN | CBS_SORT | WS_TABSTOP
+ COMBOBOX IDC_SELECTCRYPT_COMBO,16,14,199,30,CBS_DROPDOWN | CBS_SORT | WS_TABSTOP
+ LTEXT "",IDC_CRYPTOPROVIDER_DESCR,18,34,197,14,NOT WS_GROUP
END
@@ -133,16 +134,6 @@ END
/////////////////////////////////////////////////////////////////////////////
//
-// Icon
-//
-
-// 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"
-
-/////////////////////////////////////////////////////////////////////////////
-//
// DESIGNINFO
//
@@ -164,6 +155,16 @@ END
#endif // APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// 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/src/resource.h b/plugins/Db3x_mmap/src/resource.h
index db0d501fcb..29345c6ddc 100644
--- a/plugins/Db3x_mmap/src/resource.h
+++ b/plugins/Db3x_mmap/src/resource.h
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Включаемый файл, созданный в Microsoft Visual C++.
-// Используется d:\Others\SVN\MirandaNG\trunk\plugins\Db3x_mmap\res\db3x_mmap.rc
+// Используется D:\Others\SVN\MirandaNG\trunk\plugins\Db3x_mmap\res\db3x_mmap.rc
//
#define IDREMOVE 3
#define IDI_ICONPASS 100
@@ -19,6 +19,7 @@
#define IDC_STANDARD 1007
#define IDC_TOTAL 1008
#define IDC_SELECTCRYPT_COMBO 1010
+#define IDC_CRYPTOPROVIDER_DESCR 1011
// Next default values for new objects
//
@@ -26,7 +27,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 107
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1011
+#define _APS_NEXT_CONTROL_VALUE 1012
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/plugins/Db3x_mmap/src/ui.h b/plugins/Db3x_mmap/src/ui.h
index b818b64adf..d723e684c0 100644
--- a/plugins/Db3x_mmap/src/ui.h
+++ b/plugins/Db3x_mmap/src/ui.h
@@ -3,6 +3,8 @@
class CSelectCryptoDialog : public CDlgBase
{
CCtrlCombo m_combo;
+ CCtrlData m_descr;
+ //CCtrlCustom m_descr;
CRYPTO_PROVIDER **m_provs;
size_t m_provscount;
CRYPTO_PROVIDER *m_selected;
@@ -10,11 +12,14 @@ public:
CSelectCryptoDialog(CRYPTO_PROVIDER **provs, size_t count) :
CDlgBase(g_hInst, IDD_SELECT_CRYPTOPROVIDER),
m_combo(this, IDC_SELECTCRYPT_COMBO),
+ m_descr(this, IDC_CRYPTOPROVIDER_DESCR),
m_provs(provs),
m_provscount(count),
m_selected(nullptr)
{
+ m_combo.OnChange = Callback(this, &CSelectCryptoDialog::OnComboChanged);
}
+
void OnInitDialog()
{
for (size_t i = 0; i < m_provscount; i++)
@@ -23,15 +28,26 @@ public:
m_combo.AddStringA(prov->pszName, i);
}
m_combo.SetCurSel(0);
+ SetDescr(m_provs[0]);
}
+
void OnClose()
{
m_selected = m_provs[ m_combo.GetItemData(m_combo.GetCurSel()) ];
}
+ void OnComboChanged(CCtrlCombo*)
+ {
+ SetDescr(m_provs[m_combo.GetItemData(m_combo.GetCurSel())]);
+ }
+
+ void SetDescr(CRYPTO_PROVIDER *prov)
+ {
+ m_descr.SetText(prov->ptszDescr);
+ }
+
inline CRYPTO_PROVIDER* GetSelected()
{
return m_selected;
}
-
}; \ No newline at end of file