diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-19 13:32:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-19 13:32:54 +0000 |
commit | efaf8aa8ece4518fa9912175d29d291a5ad6c06f (patch) | |
tree | 76a79200561df890feda969df04b1f3c77633cee /src | |
parent | 62fbdebc256aeeae0684bd765de6ce2e96aac1ff (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
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/utils/openurl.cpp | 11 |
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);
|