diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-15 12:52:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-15 12:52:24 +0300 |
commit | 3868296f242d7595347e99beb9c239279de4bfff (patch) | |
tree | b11396e44633e059860195a3376f84dfa60eb1b5 /src | |
parent | cdfee30cb545e43dac6d44ac6aab60859aefe5aa (diff) |
CCtrlButton + OnClick => CCtrlHyperlink
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/pluginopts.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/proto_opts.cpp | 3 | ||||
-rw-r--r-- | src/mir_app/src/skin2opts.cpp | 39 |
3 files changed, 14 insertions, 32 deletions
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 4c66d17033..9ce4923e2a 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -223,12 +223,10 @@ public: CPluginOptDlg() :
CDlgBase(g_hInst, IDD_OPT_PLUGINS),
m_link(this, IDC_GETMOREPLUGINS),
- m_plugUrl(this, IDC_PLUGINURL),
+ m_plugUrl(this, IDC_PLUGINURL, "https://miranda-ng.org/downloads/"),
m_plugList(this, IDC_PLUGLIST),
m_timer(this, 1)
{
- m_link.SetUrl("https://miranda-ng.org/downloads/");
-
m_timer.OnEvent = Callback(this, &CPluginOptDlg::onTimer);
m_plugList.OnItemChanged = Callback(this, &CPluginOptDlg::list_ItemChanged);
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp index 15349f6595..239de7fbeb 100644 --- a/src/mir_app/src/proto_opts.cpp +++ b/src/mir_app/src/proto_opts.cpp @@ -254,7 +254,7 @@ public: CDlgBase(g_hInst, IDD_ACCMGR),
m_accList(this, IDC_ACCLIST),
m_name(this, IDC_NAME),
- m_link(this, IDC_LNK_ADDONS),
+ m_link(this, IDC_LNK_ADDONS, "https://miranda-ng.org/"),
m_btnOk(this, IDOK),
m_btnAdd(this, IDC_ADD),
m_btnEdit(this, IDC_EDIT),
@@ -265,7 +265,6 @@ public: m_btnNetwork(this, IDC_LNK_NETWORK)
{
m_name.UseSystemColors();
- m_link.SetUrl("https://miranda-ng.org/");
m_accList.OnDblClick = Callback(this, &CAccountManagerDlg::OnListDblClick);
m_accList.OnSelChange = Callback(this, &CAccountManagerDlg::OnListSelChange);
diff --git a/src/mir_app/src/skin2opts.cpp b/src/mir_app/src/skin2opts.cpp index b1401cc07f..2537ea6a6c 100644 --- a/src/mir_app/src/skin2opts.cpp +++ b/src/mir_app/src/skin2opts.cpp @@ -153,29 +153,26 @@ static wchar_t* OpenFileDlg(HWND hParent, const wchar_t *szFile, BOOL bAll) class CIconImportDlg : public CDlgBase
{
HWND m_hwndDragOver;
- int m_iDragItem, m_iDropHiLite;
- bool m_bDragging;
+ int m_iDragItem = 0, m_iDropHiLite = 0;
+ bool m_bDragging = false;
class CIcoLibOptsDlg *m_pParent;
+ CCtrlHyperlink m_urlGetMore;
CCtrlListView m_preview;
- CCtrlButton m_btnGetMore, m_btnBrowse;
+ CCtrlButton m_btnBrowse;
CCtrlEdit m_iconSet;
public:
CIconImportDlg(CIcoLibOptsDlg *_parent) :
CDlgBase(g_hInst, IDD_ICOLIB_IMPORT),
+ m_pParent(_parent),
m_preview(this, IDC_PREVIEW),
m_iconSet(this, IDC_ICONSET),
m_btnBrowse(this, IDC_BROWSE),
- m_btnGetMore(this, IDC_GETMORE),
- m_pParent(_parent),
- m_bDragging(false),
- m_iDragItem(0),
- m_iDropHiLite(0)
+ m_urlGetMore(this, IDC_GETMORE, "https://miranda-ng.org/")
{
m_btnBrowse.OnClick = Callback(this, &CIconImportDlg::OnBrowseClick);
- m_btnGetMore.OnClick = Callback(this, &CIconImportDlg::OnGetMoreClick);
m_iconSet.OnChange = Callback(this, &CIconImportDlg::OnEditChange);
m_preview.OnBeginDrag = Callback(this, &CIconImportDlg::OnBeginDragPreview);
}
@@ -206,11 +203,6 @@ public: RebuildIconsPreview();
}
- void OnGetMoreClick(void*)
- {
- Utils_OpenUrl("https://miranda-ng.org/");
- }
-
void OnBrowseClick(void*)
{
wchar_t str[MAX_PATH];
@@ -340,12 +332,13 @@ class CIcoLibOptsDlg : public CDlgBase {
friend class CIconImportDlg;
- CIconImportDlg *m_pDialog;
- HTREEITEM m_hPrevItem;
+ CIconImportDlg *m_pDialog = nullptr;
+ HTREEITEM m_hPrevItem = nullptr;
+ CCtrlButton m_btnImport, m_btnLoadIcons;
CCtrlTreeView m_categoryList;
CCtrlListView m_preview;
- CCtrlButton m_btnGetMore, m_btnImport, m_btnLoadIcons;
+ CCtrlHyperlink m_urlGetMore;
HTREEITEM FindNamedTreeItemAt(HTREEITEM hItem, const wchar_t *name)
{
@@ -555,14 +548,11 @@ public: CDlgBase(g_hInst, IDD_OPT_ICOLIB),
m_preview(this, IDC_PREVIEW),
m_btnImport(this, IDC_IMPORT),
- m_btnGetMore(this, IDC_GETMORE),
+ m_urlGetMore(this, IDC_GETMORE, "https://miranda-ng.org/"),
m_btnLoadIcons(this, IDC_LOADICONS),
- m_categoryList(this, IDC_CATEGORYLIST),
- m_hPrevItem(nullptr),
- m_pDialog(nullptr)
+ m_categoryList(this, IDC_CATEGORYLIST)
{
m_btnImport.OnClick = Callback(this, &CIcoLibOptsDlg::OnImport);
- m_btnGetMore.OnClick = Callback(this, &CIcoLibOptsDlg::OnGetMore);
m_btnLoadIcons.OnClick = Callback(this, &CIcoLibOptsDlg::OnLoadIcons);
m_preview.OnGetInfoTip = Callback(this, &CIcoLibOptsDlg::OnGetInfoTip);
@@ -617,11 +607,6 @@ public: m_btnImport.Disable();
}
- void OnGetMore(void*)
- {
- Utils_OpenUrl("https://miranda-ng.org/");
- }
-
void OnLoadIcons(void*)
{
wchar_t filetmp[1] = { 0 };
|