diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-21 19:09:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-21 19:09:56 +0000 |
commit | ba456be50d3b780e4accf075ba78d5badf282b05 (patch) | |
tree | a1e4a2df606b21f814306f7c0bfdef15d6de419b /plugins/TabSRMM | |
parent | a08db3aa08808c6adec9891d429f262126faca80 (diff) |
MS_UTIL_OPENURL -> mir_core::Utils_OpenUrl
git-svn-id: http://svn.miranda-ng.org/main/trunk@14306 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 22 | ||||
-rw-r--r-- | plugins/TabSRMM/src/containeroptions.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/infopanel.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendlater.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/templates.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/utils.cpp | 2 |
9 files changed, 24 insertions, 27 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 05a476ec16..acd55b81c9 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -2562,20 +2562,16 @@ LABEL_SHOWWINDOW: break; case ID_SEARCH_GOOGLE: - if (pszWord[0]) { - TCHAR szURL[4096]; - mir_sntprintf(szURL, _countof(szURL), _T("http://www.google.com/search?q=%s"), pszWord); - CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)szURL); - } + if (pszWord[0]) + Utils_OpenUrlT(CMString(FORMAT, _T("http://www.google.com/search?q=%s"), pszWord)); + PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0); break; case ID_SEARCH_WIKIPEDIA: - if (pszWord[0]) { - TCHAR szURL[4096]; - mir_sntprintf(szURL, _countof(szURL), _T("http://en.wikipedia.org/wiki/%s"), pszWord); - CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)szURL); - } + if (pszWord[0]) + Utils_OpenUrlT(CMString(FORMAT, _T("http://en.wikipedia.org/wiki/%s"), pszWord)); + PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0); break; @@ -2633,10 +2629,10 @@ LABEL_SHOWWINDOW: ClientToScreen(((NMHDR*)lParam)->hwndFrom, &pt); switch (TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL)) { case ID_NEW: - CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)tr.lpstrText); + Utils_OpenUrlT(tr.lpstrText); break; case ID_CURR: - CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)tr.lpstrText); + Utils_OpenUrlT(tr.lpstrText); break; case ID_COPY: Utils::CopyToClipBoard(tr.lpstrText, hwndDlg); @@ -2647,7 +2643,7 @@ LABEL_SHOWWINDOW: return TRUE; } if (((ENLINK*)lParam)->msg == WM_LBUTTONUP) { - CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)tr.lpstrText); + Utils_OpenUrlT(tr.lpstrText); SetFocus(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE)); mir_free(tr.lpstrText); return TRUE; diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index 6e3a6f8583..8cf6f571ed 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -308,7 +308,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, }
case IDC_O_HELP_TITLEFORMAT:
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)_T("http://miranda.or.at/TabSRMM/TitleBarFormatting"));
+ Utils_OpenUrl("http://miranda.or.at/TabSRMM/TitleBarFormatting");
break;
case IDOK:
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 0b0fcc1ac8..5075eaef36 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -626,8 +626,9 @@ static INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case IDCANCEL: DestroyWindow(hwndDlg); return TRUE; + case IDC_SUPPORT: - CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://miranda.or.at/"); + Utils_OpenUrl("http://miranda.or.at/"); break; } break; diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 97c73680fe..69d93b24a2 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -1574,7 +1574,7 @@ INT_PTR CALLBACK CTip::WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ENLINK *e = reinterpret_cast<ENLINK *>(lParam);
ptrT tszUrl(Utils::extractURLFromRichEdit(e, m_hRich));
if (tszUrl)
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, tszUrl);
+ Utils_OpenUrlT(tszUrl);
::DestroyWindow(hwnd);
}
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index a280a1b173..464b9dda62 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2021,7 +2021,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break;
if (pLink->msg != WM_RBUTTONDOWN) {
- CallService(MS_UTILS_OPENURL, OUF_TCHAR, tszUrl);
+ Utils_OpenUrlT(tszUrl);
SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
break;
}
@@ -2033,11 +2033,11 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ClientToScreen(((NMHDR*)lParam)->hwndFrom, &pt);
switch (TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL)) {
case IDM_OPENNEW:
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, tszUrl);
+ Utils_OpenUrlT(tszUrl);
break;
case IDM_OPENEXISTING:
- CallService(MS_UTILS_OPENURL, OUF_TCHAR, tszUrl);
+ Utils_OpenUrlT(tszUrl);
break;
case IDM_COPYLINK:
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 7888c5067b..24337f7518 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -331,7 +331,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case IDC_HELP_GENERAL:
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/UsingSkins");
+ Utils_OpenUrl("http://wiki.miranda.or.at/TabSRMM/UsingSkins");
break;
case IDC_SKIN_CLOSENOW:
@@ -594,7 +594,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
case IDC_HELP_GENERAL:
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/GeneralSettings");
+ Utils_OpenUrl("http://wiki.miranda.or.at/TabSRMM/GeneralSettings");
break;
case IDC_RESETWARNINGS:
@@ -953,7 +953,7 @@ static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam (IsDlgButtonChecked(hwndDlg, IDC_TYPEWIN) || IsDlgButtonChecked(hwndDlg, IDC_TYPENOWIN)));
break;
case IDC_MTN_HELP:
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/TypingNotifications");
+ Utils_OpenUrl("http://wiki.miranda.or.at/TabSRMM/TypingNotifications");
return 0;
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -1123,7 +1123,7 @@ static INT_PTR CALLBACK DlgProcContainerSettings(HWND hwndDlg, UINT msg, WPARAM Utils::enableDlgControl(hwndDlg, IDC_TABLIMIT, IsDlgButtonChecked(hwndDlg, IDC_LIMITTABS) != 0);
break;
case IDC_HELP_CONTAINERS:
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/Containers");
+ Utils_OpenUrl("http://wiki.miranda.or.at/TabSRMM/Containers");
break;
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -1203,7 +1203,7 @@ INT_PTR CALLBACK PlusOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case WM_COMMAND:
if (LOWORD(wParam) == IDC_PLUS_HELP) {
- CallService(MS_UTILS_OPENURL, 0, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/AdvancedTweaks");
+ Utils_OpenUrl("http://wiki.miranda.or.at/TabSRMM/AdvancedTweaks");
break;
}
else if (LOWORD(wParam) == IDC_PLUS_REVERT) { // revert to defaults...
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index 4110f1dc15..53fb83a61e 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -783,7 +783,7 @@ INT_PTR CALLBACK CSendLater::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
case IDC_QMGR_HELP:
- CallService(MS_UTILS_OPENURL, 0, LPARAM("http://wiki.miranda.or.at/TabSRMM/SendLater"));
+ Utils_OpenUrl("http://wiki.miranda.or.at/TabSRMM/SendLater");
break;
// this handles all commands sent by the context menu
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index 364f423795..b0ae015ba4 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -234,7 +234,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP break; case IDC_VARIABLESHELP: - CallService(MS_UTILS_OPENURL, 0, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/Templates"); + Utils_OpenUrl("http://wiki.miranda.or.at/TabSRMM/Templates"); break; case IDC_EDITTEMPLATE: diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 8bb8a41109..68844d70d1 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -1400,7 +1400,7 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP const wchar_t *wszUrl = Utils::extractURLFromRichEdit(e, ::GetDlgItem(hwnd, IDC_WARNTEXT));
if (wszUrl) {
- CallService(MS_UTILS_OPENURL, OUF_UNICODE, (LPARAM)wszUrl);
+ Utils_OpenUrlW(wszUrl);
mir_free(const_cast<TCHAR *>(wszUrl));
}
}
|