From efaf8aa8ece4518fa9912175d29d291a5ad6c06f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 19 Sep 2012 13:32:54 +0000 Subject: fix for OpenURL service to open the chosen browser instead of the default one git-svn-id: http://svn.miranda-ng.org/main/trunk@1604 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/utils/openurl.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/modules/utils') diff --git a/src/modules/utils/openurl.cpp b/src/modules/utils/openurl.cpp index e2cf170359..4caa9fb022 100644 --- a/src/modules/utils/openurl.cpp +++ b/src/modules/utils/openurl.cpp @@ -52,7 +52,16 @@ static void OpenURLThread(void *arg) wsprintf(szResult, _T("http://%s"), hUrlInfo->szUrl); } } - ShellExecute(NULL, _T("open"), szResult, NULL, NULL, (hUrlInfo->newWindow) ? SW_NORMAL : SW_SHOWDEFAULT); + + // check user defined browser for opening urls + DBVARIANT dbv; + if (!DBGetContactSettingTString(NULL, "Miranda", "OpenUrlBrowser", &dbv)) { + ShellExecute(NULL, _T("open"), dbv.ptszVal, szResult, NULL, (hUrlInfo->newWindow) ? SW_NORMAL : SW_SHOWDEFAULT); + DBFreeVariant(&dbv); + } else { + ShellExecute(NULL, _T("open"), szResult, NULL, NULL, (hUrlInfo->newWindow) ? SW_NORMAL : SW_SHOWDEFAULT); + } + mir_free(szResult); mir_free(hUrlInfo->szUrl); mir_free(hUrlInfo); -- cgit v1.2.3