summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-13 08:40:22 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-13 08:40:22 +0000
commita85d3756ce4eb0257025b005deb795ba05fd4fda (patch)
tree20a417a340172bf9a7ad0ec34322246b91864801 /plugins
parent303e6b483aff4126701ca375dd085e9ae1d18b43 (diff)
arg fixes for MS_UTILS_OPENURL service
git-svn-id: http://svn.miranda-ng.org/main/trunk@11362 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/BASS_interface/src/Main.cpp2
-rw-r--r--plugins/Clist_nicer/src/clui.cpp2
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_dlg.cpp9
-rwxr-xr-xplugins/Msg_Export/src/FileViewer.cpp2
-rw-r--r--plugins/Non-IM Contact/src/main.cpp4
-rw-r--r--plugins/PackUpdater/Src/Notifications.cpp4
-rw-r--r--plugins/Scriver/src/utils.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/msgbox.cpp4
-rw-r--r--plugins/SpellChecker/src/options.cpp2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp2
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp8
-rw-r--r--plugins/UserInfoEx/src/ctrl_edit.cpp4
-rw-r--r--plugins/UserInfoEx/src/svc_email.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_homepage.cpp2
-rw-r--r--plugins/WebView/src/webview_datawnd.cpp2
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3opt.cpp2
19 files changed, 31 insertions, 28 deletions
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index 351a48b868..f9c3fdf188 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -286,7 +286,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
break;
case IDC_GETBASS:
- CallService(MS_UTILS_OPENURL , 1, (LPARAM)"http://www.un4seen.com/");
+ CallService(MS_UTILS_OPENURL , OUF_NEWWINDOW, (LPARAM)"http://www.un4seen.com/");
break;
}
break;
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 17e455a182..be3f3fedf4 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -1869,7 +1869,7 @@ INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
DestroyWindow(hwndDlg);
return TRUE;
case IDC_SUPPORT:
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://miranda-ng.org/");
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://miranda-ng.org/");
break;
}
break;
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index 53334e5b9b..446e5bcaea 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -931,7 +931,7 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara
CloseClipboard();
} else {
- CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)sLink.c_str());
+ CallService(MS_UTILS_OPENURL, 0, (LPARAM)sLink.c_str());
}
} else {
MessageBox(hwndDlg, TranslateT("ListView_GetItem failed"), MSG_BOX_TITEL, MB_OK);
diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
index 2836925d22..5e48513c0b 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp
@@ -129,7 +129,10 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
openNewWindow = db_get_b(NULL, LINKLIST_MODULE, LINKLIST_OPEN_WINDOW, 0xFF);
if (openNewWindow == 0xFF)
openNewWindow = 0;
- CallService(MS_UTILS_OPENURL, openNewWindow, (LPARAM)link);
+ else
+ openNewWindow = OUF_NEWWINDOW;
+
+ CallService(MS_UTILS_OPENURL, openNewWindow | OUF_TCHAR, (LPARAM)link);
}
mir_free(link);
break;
@@ -159,13 +162,13 @@ INT_PTR CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
if (_tcsstr(link, _T("mailto:")) != NULL)
ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
else
- CallService(MS_UTILS_OPENURL, 0, (LPARAM)link);
+ CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)link);
break;
case IDM_LINK_OPENNEW:
if (_tcsstr(link, _T("mailto:")) != NULL)
ShellExecute(HWND_TOP, NULL, link, NULL, NULL, SW_SHOWNORMAL);
else
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)link);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)link);
break;
case IDM_LINK_COPY: {
size_t dataLen;
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp
index b807e71557..c9d868dc49 100755
--- a/plugins/Msg_Export/src/FileViewer.cpp
+++ b/plugins/Msg_Export/src/FileViewer.cpp
@@ -1204,7 +1204,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam,
stToGet.chrg = pstLink->chrg;
stToGet.lpstrText = szUrl;
if (SendMessage( pstLink->nmhdr.hwndFrom, EM_GETTEXTRANGE, 0, (LPARAM)&stToGet) > 0 )
- CallService(MS_UTILS_OPENURL,1,(LPARAM)szUrl);
+ CallService(MS_UTILS_OPENURL,OUF_NEWWINDOW,(LPARAM)szUrl);
return TRUE;
}
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index 3962379e05..0d5247dc58 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -37,10 +37,10 @@ INT_PTR doubleClick(WPARAM wParam,LPARAM lParam)
if (!db_get_static(wParam, MODNAME, "ProgramParams", params) )
strcpy(params, "");
if (strstr(program, "http://") || strstr(program, "https://"))
- CallService(MS_UTILS_OPENURL,1,(LPARAM)program);
+ CallService(MS_UTILS_OPENURL,OUF_NEWWINDOW,(LPARAM)program);
else shellEXEerror = (int)ShellExecuteA(NULL, NULL, program, params, NULL, SW_SHOW); //ignore the warning, its M$'s backwards compatabilty screwup :)
if (shellEXEerror == ERROR_FILE_NOT_FOUND || shellEXEerror == ERROR_PATH_NOT_FOUND)
- CallService(MS_UTILS_OPENURL,1,(LPARAM)program);
+ CallService(MS_UTILS_OPENURL,OUF_NEWWINDOW,(LPARAM)program);
}
else editContact((WPARAM)(HANDLE)wParam, (LPARAM)NULL);
return 1;
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp
index 76f687eaee..25ea203e73 100644
--- a/plugins/PackUpdater/Src/Notifications.cpp
+++ b/plugins/PackUpdater/Src/Notifications.cpp
@@ -381,7 +381,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
tszExt = &todo[i].File.tszDownloadURL[mir_tstrlen(todo[i].File.tszDownloadURL)-5];
if (mir_tstrcmp(tszExt, _T(".html")) == 0) {
char* szUrl = mir_t2a(todo[i].File.tszDownloadURL);
- CallService(MS_UTILS_OPENURL, TRUE, (LPARAM)szUrl);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szUrl);
mir_free(szUrl);
}
else {
@@ -530,7 +530,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
int sel = ListView_GetSelectionMark(hwndList);
vector<FILEINFO> &todo = *(vector<FILEINFO> *)GetWindowLongPtr(hDlg, GWLP_USERDATA);
char* szUrl = mir_t2a(todo[sel].tszInfoURL);
- CallService(MS_UTILS_OPENURL, TRUE, (LPARAM)szUrl);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szUrl);
mir_free(szUrl);
}
break;
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index 1f6b99e682..0ac1589bc7 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -414,7 +414,7 @@ void SearchWord(TCHAR * word, int engine)
break;
}
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)szURL);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szURL);
}
}
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 3f7c677730..0a3f41e755 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -352,7 +352,7 @@ static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam)
char *szMsgURL = (char *)mir_alloc(i + 1);
if (szMsgURL) {
mir_strncpy(szMsgURL, szURL, i + 1);
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)szMsgURL);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szMsgURL);
mir_free(szMsgURL);
}
}
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp
index 77079b465e..7777fdfc71 100644
--- a/plugins/SimpleStatusMsg/src/msgbox.cpp
+++ b/plugins/SimpleStatusMsg/src/msgbox.cpp
@@ -445,11 +445,11 @@ VOID APIENTRY HandlePopupMenu(HWND hwnd, POINT pt, HWND edit_control)
break;
case ID__FORTUNEAWAYMSG:
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://miranda-ng.org/");
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://miranda-ng.org/");
break;
case ID__VARIABLES:
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://miranda-ng.org/");
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://miranda-ng.org/");
break;
case ID__VARIABLES_MOREVARIABLES:
diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp
index 9325387e43..a9ab63df8b 100644
--- a/plugins/SpellChecker/src/options.cpp
+++ b/plugins/SpellChecker/src/options.cpp
@@ -197,7 +197,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case WM_COMMAND:
if (LOWORD(wParam) == IDC_GETMORE)
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://wiki.services.openoffice.org/wiki/Dictionaries");
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://wiki.services.openoffice.org/wiki/Dictionaries");
if (LOWORD(wParam) == IDC_DEF_LANG && (HIWORD(wParam) == CBN_SELCHANGE && (HWND)lParam == GetFocus())) {
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 2ddf7b3d2a..1fe0c33f41 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -636,7 +636,7 @@ static INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
DestroyWindow(hwndDlg);
return TRUE;
case IDC_SUPPORT:
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://miranda.or.at/");
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://miranda.or.at/");
break;
}
break;
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index cb1bf3e719..a7218aa491 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -2100,7 +2100,7 @@ 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, 1 + OUF_TCHAR, (LPARAM)tr.lpstrText);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)tr.lpstrText);
break;
case IDM_OPENEXISTING:
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 6a1071ae89..8278c24e7b 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -337,7 +337,7 @@ static INT_PTR CALLBACK DlgProcSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
break;
case IDC_HELP_GENERAL:
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/UsingSkins");
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/UsingSkins");
break;
case IDC_SKIN_CLOSENOW:
@@ -448,7 +448,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
break;
case IDC_HELP_GENERAL:
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/GeneralSettings");
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/GeneralSettings");
break;
case IDC_RESETWARNINGS:
@@ -912,7 +912,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, 1, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/TypingNotifications");
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/TypingNotifications");
return 0;
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -1150,7 +1150,7 @@ static INT_PTR CALLBACK DlgProcContainerSettings(HWND hwndDlg, UINT msg, WPARAM
Utils::enableDlgControl(hwndDlg, IDC_TABLIMIT, IsDlgButtonChecked(hwndDlg, IDC_LIMITTABS));
break;
case IDC_HELP_CONTAINERS:
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/Containers");
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)"http://wiki.miranda.or.at/TabSRMM/Containers");
break;
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp
index 2a7d65fede..837517c7ab 100644
--- a/plugins/UserInfoEx/src/ctrl_edit.cpp
+++ b/plugins/UserInfoEx/src/ctrl_edit.cpp
@@ -303,7 +303,7 @@ void CEditCtrl::OpenUrl()
}
if (szUrl && (GetWindowTextA(_hwnd, szUrl, lenUrl) > 0))
{
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)szUrl);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szUrl);
}
if (need_free)
{
@@ -356,7 +356,7 @@ LRESULT CEditCtrl::LinkNotificationHandler(ENLINK* lnk)
LPSTR pszUrl = mir_t2a(tr.lpstrText);
if (pszUrl)
{
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)pszUrl);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)pszUrl);
mir_free(pszUrl);
}
}
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp
index dec21cfcf4..b32516bd20 100644
--- a/plugins/UserInfoEx/src/svc_email.cpp
+++ b/plugins/UserInfoEx/src/svc_email.cpp
@@ -96,7 +96,7 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam)
mir_snprintf(szUrl, len + 1, "mailto:%s", val);
mir_free(val);
- result = CallService(MS_UTILS_OPENURL, 1, (LPARAM)szUrl);
+ result = CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szUrl);
}
else {
result = 1;
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp
index 63c6f6afb2..1d3d9205dc 100644
--- a/plugins/UserInfoEx/src/svc_homepage.cpp
+++ b/plugins/UserInfoEx/src/svc_homepage.cpp
@@ -70,7 +70,7 @@ static INT_PTR MenuCommand(WPARAM wParam, LPARAM lParam)
{
LPSTR szUrl = Get(wParam);
if (szUrl) {
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)szUrl);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)szUrl);
mir_free(szUrl);
}
else MessageBox((HWND)lParam, TranslateT("User has no valid homepage"), TranslateT("View Homepage"), MB_OK);
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp
index 5af34f604a..77d4a3d325 100644
--- a/plugins/WebView/src/webview_datawnd.cpp
+++ b/plugins/WebView/src/webview_datawnd.cpp
@@ -325,7 +325,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
CopyMemory(tr.lpstrText, "mailto:", 7);
}
- CallService(MS_UTILS_OPENURL, 1, (LPARAM) tr.lpstrText);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM) tr.lpstrText);
SetFocus(GetDlgItem(hwndDlg, IDC_DATA));
free(tr.lpstrText);
diff --git a/plugins/YAMN/src/proto/pop3/pop3opt.cpp b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
index 83fc6b93ce..0f580ad863 100644
--- a/plugins/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3opt.cpp
@@ -120,7 +120,7 @@ INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lParam
{
char str[1024];
GetDlgItemTextA(hDlg,IDC_STWWW,str,SIZEOF(str));
- CallService(MS_UTILS_OPENURL,1,(LPARAM)str);
+ CallService(MS_UTILS_OPENURL,OUF_NEWWINDOW,(LPARAM)str);
break;
}