[DEV] change application URL loader
This commit is contained in:
parent
2ff07a736e
commit
4063a6178c
@ -1248,31 +1248,10 @@ class X11Interface : public ewol::Context {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void openURL(const std::string& _url) {
|
void openURL(const std::string& _url) {
|
||||||
// TODO : call user to select his browser
|
std::string req = "xdg-open ";
|
||||||
// TODO : try to find the prefered browser ...
|
req += _url;
|
||||||
std::vector<std::string> listBrowser;
|
system(req.c_str());
|
||||||
listBrowser.push_back("chrome");
|
return;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/****************************************************************************************/
|
/****************************************************************************************/
|
||||||
void clipBoardGet(enum ewol::context::clipBoard::clipboardListe _clipboardID) {
|
void clipBoardGet(enum ewol::context::clipBoard::clipboardListe _clipboardID) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user