summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-09-19 13:32:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-09-19 13:32:54 +0000
commitefaf8aa8ece4518fa9912175d29d291a5ad6c06f (patch)
tree76a79200561df890feda969df04b1f3c77633cee
parent62fbdebc256aeeae0684bd765de6ce2e96aac1ff (diff)
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
-rw-r--r--src/modules/utils/openurl.cpp11
1 files changed, 10 insertions, 1 deletions
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);