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 /src/core | |
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 'src/core')
-rw-r--r-- | src/core/stdchat/src/window.cpp | 17 | ||||
-rw-r--r-- | src/core/stdhelp/src/help.cpp | 6 | ||||
-rw-r--r-- | src/core/stdurl/urldialogs.cpp | 4 | ||||
-rw-r--r-- | src/core/stduserinfo/src/stdinfo.cpp | 4 |
4 files changed, 14 insertions, 17 deletions
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index 13dc4c0497..511c18c65b 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -2215,18 +2215,15 @@ LABEL_SHOWWINDOW: case ID_SEARCH_GOOGLE:
if (pszWord[0])
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR,
- (LPARAM)CMString(FORMAT, _T("http://www.google.com/search?q=%s"), pszWord).GetString());
+ 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[1024];
- 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;
@@ -2267,11 +2264,11 @@ 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:
@@ -2292,7 +2289,7 @@ LABEL_SHOWWINDOW: return TRUE;
}
- CallService(MS_UTILS_OPENURL, OUF_TCHAR|OUF_NEWWINDOW, (LPARAM) tr.lpstrText);
+ Utils_OpenUrlT(tr.lpstrText);
SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
mir_free(tr.lpstrText);
break;
diff --git a/src/core/stdhelp/src/help.cpp b/src/core/stdhelp/src/help.cpp index af276a413d..a6a09e1220 100644 --- a/src/core/stdhelp/src/help.cpp +++ b/src/core/stdhelp/src/help.cpp @@ -41,19 +41,19 @@ static INT_PTR AboutCommand(WPARAM wParam, LPARAM) static INT_PTR IndexCommand(WPARAM, LPARAM)
{
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)_T("http://wiki.miranda-ng.org"));
+ Utils_OpenUrl("http://wiki.miranda-ng.org");
return 0;
}
static INT_PTR WebsiteCommand(WPARAM, LPARAM)
{
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)_T("http://miranda-ng.org"));
+ Utils_OpenUrl("http://miranda-ng.org");
return 0;
}
static INT_PTR BugCommand(WPARAM, LPARAM)
{
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)_T("http://trac.miranda-ng.org/newticket"));
+ Utils_OpenUrl("http://trac.miranda-ng.org/newticket");
return 0;
}
diff --git a/src/core/stdurl/urldialogs.cpp b/src/core/stdurl/urldialogs.cpp index f654cae874..3fb66a7e25 100644 --- a/src/core/stdurl/urldialogs.cpp +++ b/src/core/stdurl/urldialogs.cpp @@ -168,10 +168,10 @@ INT_PTR CALLBACK DlgProcUrlRecv(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP GetDlgItemTextA(hwndDlg, IDC_URL, url, _countof(url));
switch(TrackPopupMenu(hSubMenu, TPM_RETURNCMD, rc.left, rc.bottom, 0, hwndDlg, NULL)) {
case IDM_OPENNEW:
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)url);
+ Utils_OpenUrl(url);
break;
case IDM_OPENEXISTING:
- CallService(MS_UTILS_OPENURL, 0, (LPARAM)url);
+ Utils_OpenUrl(url);
break;
case IDM_COPYLINK:
{
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index 0ac9910f84..d51607ad5c 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -345,7 +345,7 @@ static INT_PTR CALLBACK WorkDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_WEBPAGE))) {
char szPage[256];
GetDlgItemTextA(hwndDlg, IDC_WEBPAGE, szPage, _countof(szPage));
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szPage);
+ Utils_OpenUrl(szPage);
}
}
break;
@@ -483,7 +483,7 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_WEBPAGE))) {
char szPage[256];
GetDlgItemTextA(hwndDlg, IDC_WEBPAGE, szPage, _countof(szPage));
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szPage);
+ Utils_OpenUrl(szPage);
}
break;
}
|