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 | |
parent | cdfee30cb545e43dac6d44ac6aab60859aefe5aa (diff) |
CCtrlButton + OnClick => CCtrlHyperlink
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 87 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/templates.cpp | 8 | ||||
-rw-r--r-- | protocols/IRCG/src/irc_dlg.h | 1 | ||||
-rw-r--r-- | protocols/IRCG/src/options.cpp | 6 | ||||
-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 |
8 files changed, 46 insertions, 106 deletions
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 3924e7968c..c3e302df02 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -43,18 +43,13 @@ static fontOptionsList[] = { { RGB(0, 0, 0), "Tahoma", 0, -10 }
};
-
-
HIMAGELIST CreateStateImageList()
{
- HIMAGELIST himlStates;
-
- himlStates = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 4, 0);
+ HIMAGELIST himlStates = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 4, 0);
ImageList_AddIcon(himlStates, PluginConfig.g_IconUnchecked); /* IMG_NOCHECK */
ImageList_AddIcon(himlStates, PluginConfig.g_IconChecked); /* IMG_CHECK */
ImageList_AddIcon(himlStates, PluginConfig.g_IconGroupOpen); /* IMG_GRPOPEN */
ImageList_AddIcon(himlStates, PluginConfig.g_IconGroupClose); /* IMG_GRPCLOSED */
-
return himlStates;
}
@@ -574,19 +569,19 @@ BOOL TreeViewHandleClick(HWND hwndDlg, HWND hwndTree, WPARAM, LPARAM lParam) class COptMainDlg : public CDlgBase
{
- CCtrlSpin spnAvaSize;
- CCtrlButton btnHelp, btnReset;
- CCtrlCheck chkAvaPreserve;
+ CCtrlSpin spnAvaSize;
+ CCtrlCheck chkAvaPreserve;
+ CCtrlButton btnReset;
+ CCtrlHyperlink urlHelp;
public:
- COptMainDlg()
- : CDlgBase(g_hInst, IDD_OPT_MSGDLG),
- btnHelp(this, IDC_HELP_GENERAL),
+ COptMainDlg() :
+ CDlgBase(g_hInst, IDD_OPT_MSGDLG),
+ urlHelp(this, IDC_HELP_GENERAL, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/General_settings"),
btnReset(this, IDC_RESETWARNINGS),
spnAvaSize(this, IDC_AVATARSPIN),
chkAvaPreserve(this, IDC_PRESERVEAVATARSIZE)
{
- btnHelp.OnClick = Callback(this, &COptMainDlg::onClick_Help);
btnReset.OnClick = Callback(this, &COptMainDlg::onClick_Reset);
}
@@ -616,11 +611,6 @@ public: TreeViewDestroy(GetDlgItem(m_hwnd, IDC_WINDOWOPTIONS));
}
- void onClick_Help(CCtrlButton*)
- {
- Utils_OpenUrl("https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/General_settings");
- }
-
void onClick_Reset(CCtrlButton*)
{
db_set_dw(0, SRMSGMOD_T, "cWarningsL", 0);
@@ -642,10 +632,10 @@ static UINT __ctrls[] = { IDC_INDENTSPIN, IDC_RINDENTSPIN, IDC_INDENTAMOUNT, IDC class COptLogDlg : public CDlgBase
{
+ CCtrlSpin spnLeft, spnRight, spnLoadCount, spnLoadTime, spnTrim;
+ CCtrlCheck chkAlwaysTrim, chkLoadUnread, chkLoadCount, chkLoadTime;
+ CCtrlCombo cmbLogDisplay;
CCtrlButton btnModify, btnRtlModify;
- CCtrlCheck chkAlwaysTrim, chkLoadUnread, chkLoadCount, chkLoadTime;
- CCtrlSpin spnLeft, spnRight, spnLoadCount, spnLoadTime, spnTrim;
- CCtrlCombo cmbLogDisplay;
bool have_ieview, have_hpp;
@@ -861,7 +851,7 @@ class COptTypingDlg : public CDlgBase CCtrlCheck chkWin, chkNoWin;
CCtrlCheck chkNotifyPopup, chkNotifyTray, chkShowNotify;
- CCtrlButton btnHelp;
+ CCtrlHyperlink urlHelp;
void ResetCList()
{
@@ -906,15 +896,13 @@ class COptTypingDlg : public CDlgBase public:
COptTypingDlg()
: CDlgBase(g_hInst, IDD_OPT_MSGTYPE),
- btnHelp(this, IDC_MTN_HELP),
+ urlHelp(this, IDC_MTN_HELP, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Advanced_tweaks"),
chkWin(this, IDC_TYPEWIN),
chkNoWin(this, IDC_TYPENOWIN),
chkNotifyTray(this, IDC_NOTIFYTRAY),
chkShowNotify(this, IDC_SHOWNOTIFY),
chkNotifyPopup(this, IDC_NOTIFYPOPUP)
{
- btnHelp.OnClick = Callback(this, &COptTypingDlg::onClick_Help);
-
chkWin.OnChange = chkNoWin.OnChange = Callback(this, &COptTypingDlg::onCheck_Win);
chkNotifyTray.OnChange = Callback(this, &COptTypingDlg::onCheck_NotifyTray);
@@ -1020,11 +1008,6 @@ public: Utils::enableDlgControl(m_hwnd, IDC_NOTIFYBALLOON, IsDlgButtonChecked(m_hwnd, IDC_NOTIFYTRAY) &&
(IsDlgButtonChecked(m_hwnd, IDC_TYPEWIN) || IsDlgButtonChecked(m_hwnd, IDC_TYPENOWIN)));
}
-
- void onClick_Help(CCtrlButton*)
- {
- Utils_OpenUrl("https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Typing_notifications");
- }
};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1032,15 +1015,15 @@ public: class COptTabbedDlg : public CDlgBase
{
- CCtrlEdit edtLimit;
- CCtrlCheck chkLimit;
- CCtrlSpin spnLimit;
- CCtrlCombo cmbEscMode;
+ CCtrlEdit edtLimit;
+ CCtrlSpin spnLimit;
+ CCtrlCombo cmbEscMode;
+ CCtrlCheck chkLimit;
CCtrlButton btnSetup;
public:
- COptTabbedDlg()
- : CDlgBase(g_hInst, IDD_OPT_TABBEDMSG),
+ COptTabbedDlg() :
+ CDlgBase(g_hInst, IDD_OPT_TABBEDMSG),
chkLimit(this, IDC_CUT_TABTITLE),
edtLimit(this, IDC_CUT_TITLEMAX),
spnLimit(this, IDC_CUT_TITLEMAXSPIN),
@@ -1114,15 +1097,10 @@ public: class COptContainersDlg : public CDlgBase
{
- CCtrlButton btnHelp;
- CCtrlCombo cmbAeroEffect;
- CCtrlCheck chkUseAero, chkUseAeroPeek, chkLimits, chkSingle, chkGroup, chkDefault;
- CCtrlSpin spnNumFlash, spnTabLimit, spnFlashDelay;
-
- void onHelp(CCtrlButton*)
- {
- Utils_OpenUrl("https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Containers");
- }
+ CCtrlSpin spnNumFlash, spnTabLimit, spnFlashDelay;
+ CCtrlCombo cmbAeroEffect;
+ CCtrlCheck chkUseAero, chkUseAeroPeek, chkLimits, chkSingle, chkGroup, chkDefault;
+ CCtrlHyperlink urlHelp;
void onChangeAero(CCtrlCheck*)
{
@@ -1137,7 +1115,7 @@ class COptContainersDlg : public CDlgBase public:
COptContainersDlg()
: CDlgBase(g_hInst, IDD_OPT_CONTAINERS),
- btnHelp(this, IDC_HELP_CONTAINERS),
+ urlHelp(this, IDC_HELP_CONTAINERS, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Containers"),
spnNumFlash(this, IDC_NRFLASHSPIN),
spnTabLimit(this, IDC_TABLIMITSPIN),
spnFlashDelay(this, IDC_FLASHINTERVALSPIN),
@@ -1149,8 +1127,6 @@ public: chkGroup(this, IDC_CONTAINERGROUPMODE),
chkDefault(this, IDC_DEFAULTCONTAINERMODE)
{
- btnHelp.OnClick = Callback(this, &COptContainersDlg::onHelp);
-
chkUseAero.OnChange = Callback(this, &COptContainersDlg::onChangeAero);
chkLimits.OnChange = chkSingle.OnChange = chkGroup.OnChange = chkDefault.OnChange = Callback(this, &COptContainersDlg::onChangeLimits);
}
@@ -1215,17 +1191,17 @@ public: class COptAdvancedDlg : public CDlgBase
{
CCtrlSpin spnTimeout, spnHistSize;
- CCtrlButton btnHelp, btnRevert;
+ CCtrlButton btnRevert;
+ CCtrlHyperlink urlHelp;
public:
- COptAdvancedDlg()
- : CDlgBase(g_hInst, IDD_OPTIONS_PLUS),
- btnHelp(this, IDC_PLUS_HELP),
+ COptAdvancedDlg() :
+ CDlgBase(g_hInst, IDD_OPTIONS_PLUS),
+ urlHelp(this, IDC_PLUS_HELP, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Typing_notifications"),
btnRevert(this, IDC_PLUS_REVERT),
spnTimeout(this, IDC_TIMEOUTSPIN),
spnHistSize(this, IDC_HISTORYSIZESPIN)
{
- btnHelp.OnClick = Callback(this, &COptAdvancedDlg::onClick_Help);
btnRevert.OnClick = Callback(this, &COptAdvancedDlg::onClick_Revert);
}
@@ -1265,11 +1241,6 @@ public: return CDlgBase::DlgProc(msg, wParam, lParam);
}
- void onClick_Help(CCtrlButton*)
- {
- Utils_OpenUrl("https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Advanced_tweaks");
- }
-
void onClick_Revert(CCtrlButton*)
{
TOptionListItem *lvItems = CTranslator::getTree(CTranslator::TREE_MODPLUS);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 6ca5ebbaba..5939a31633 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -568,8 +568,9 @@ class CTemplateEditDlg : public CTabBaseDlg TTemplateSet *tSet;
CCtrlEdit edtText;
- CCtrlButton btnResetAll, btnHelp, btnSave, btnForget, btnRevert, btnPreview;
+ CCtrlButton btnResetAll, btnSave, btnForget, btnRevert, btnPreview;
CCtrlListBox listTemplates;
+ CCtrlHyperlink urlHelp;
virtual CThumbBase* tabCreateThumb(CProxyWindow*) const override { return nullptr; }
virtual void tabClearLog() override {}
@@ -586,7 +587,6 @@ public: void onChange_Text(CCtrlEdit*);
void onClick_Forget(CCtrlButton*);
- void onClick_Help(CCtrlButton*);
void onClick_Preview(CCtrlButton*);
void onClick_Reset(CCtrlButton*);
void onClick_Revert(CCtrlButton*);
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index 870d9ae07a..b24b4412e5 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -117,7 +117,7 @@ CTemplateEditDlg::CTemplateEditDlg(BOOL _rtl, HWND hwndParent) : CSuper(IDD_TEMPLATEEDIT), rtl(_rtl), edtText(this, IDC_EDITTEMPLATE), - btnHelp(this, IDC_VARIABLESHELP), + urlHelp(this, IDC_VARIABLESHELP, "https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Templates"), btnSave(this, IDC_SAVETEMPLATE), btnForget(this, IDC_FORGET), btnRevert(this, IDC_REVERT), @@ -136,7 +136,6 @@ CTemplateEditDlg::CTemplateEditDlg(BOOL _rtl, HWND hwndParent) : edtText.OnChange = Callback(this, &CTemplateEditDlg::onChange_Text); - btnHelp.OnClick = Callback(this, &CTemplateEditDlg::onClick_Help); btnSave.OnClick = Callback(this, &CTemplateEditDlg::onClick_Save); btnForget.OnClick = Callback(this, &CTemplateEditDlg::onClick_Forget); btnRevert.OnClick = Callback(this, &CTemplateEditDlg::onClick_Revert); @@ -230,11 +229,6 @@ void CTemplateEditDlg::onClick_Forget(CCtrlButton*) SendDlgItemMessage(m_hwnd, IDC_EDITTEMPLATE, EM_SETREADONLY, TRUE, 0); } -void CTemplateEditDlg::onClick_Help(CCtrlButton*) -{ - Utils_OpenUrl("https://wiki.miranda-ng.org/index.php?title=Plugin:TabSRMM/en/Templates"); -} - void CTemplateEditDlg::onClick_Preview(CCtrlButton*) { int iIndex = SendDlgItemMessage(m_hwnd, IDC_TEMPLATELIST, LB_GETCURSEL, 0, 0); diff --git a/protocols/IRCG/src/irc_dlg.h b/protocols/IRCG/src/irc_dlg.h index 75a4d341e5..c84cde8aac 100644 --- a/protocols/IRCG/src/irc_dlg.h +++ b/protocols/IRCG/src/irc_dlg.h @@ -261,7 +261,6 @@ struct COtherPrefsDlg : public CProtoDlgBase < CIrcProto > virtual void OnApply();
virtual void OnDestroy();
- void OnUrl(CCtrlButton*);
void OnPerformCombo(CCtrlData*);
void OnCodePage(CCtrlData*);
void OnPerformEdit(CCtrlData*);
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 137bd722cc..bbe588c88a 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -985,7 +985,6 @@ COtherPrefsDlg::COtherPrefsDlg(CIrcProto* _pro) m_delete(this, IDC_DELETE, LoadIconEx(IDI_DELETE), LPGEN("Click to delete the commands for this event")),
m_performlistModified(false)
{
- m_url.OnClick = Callback(this, &COtherPrefsDlg::OnUrl);
m_performCombo.OnChange = Callback(this, &COtherPrefsDlg::OnPerformCombo);
m_codepage.OnChange = Callback(this, &COtherPrefsDlg::OnCodePage);
m_pertormEdit.OnChange = Callback(this, &COtherPrefsDlg::OnPerformEdit);
@@ -1042,11 +1041,6 @@ void COtherPrefsDlg::OnInitDialog() m_autodetect.SetState(m_proto->m_utfAutodetect);
}
-void COtherPrefsDlg::OnUrl(CCtrlButton*)
-{
- Utils_OpenUrl("http://members.chello.se/matrix/index.html");
-}
-
void COtherPrefsDlg::OnPerformCombo(CCtrlData*)
{
int i = m_performCombo.GetCurSel();
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 };
|