[DEV] change application URL loader

This commit is contained in:
Edouard DUPIN 2014-10-18 08:15:34 +02:00
parent 2ff07a736e
commit 4063a6178c

View File

@ -1248,31 +1248,10 @@ class X11Interface : public ewol::Context {
}
void openURL(const std::string& _url) {
// TODO : call user to select his browser
// TODO : try to find the prefered browser ...
std::vector<std::string> listBrowser;
listBrowser.push_back("chrome");
listBrowser.push_back("chromium-browser");
listBrowser.push_back("firefox");
listBrowser.push_back("opera");
listBrowser.push_back("konqueror");
listBrowser.push_back("epiphany");
for (auto browser : listBrowser) {
// heck if the browser is installed
std::string req = "which ";
req += browser;
if (system(req.c_str()) != 0) {
continue;
}
// call it to open the page ...
req = browser;
req += " ";
req += _url;
req += " &"; // disociate from this process ...
system(req.c_str());
return;
}
std::string req = "xdg-open ";
req += _url;
system(req.c_str());
return;
}
/****************************************************************************************/
void clipBoardGet(enum ewol::context::clipBoard::clipboardListe _clipboardID) {