First try gnome-open and use xdg-open as fallback, to open openweathermap.org in browser.

openweathermap
Jens Lody 11 years ago
parent 0e3c13f4b3
commit 7d2ce46757
  1. 11
      src/extension.js

@ -248,7 +248,16 @@ const WeatherMenuButton = new Lang.Class({
if (this._appid)
url += "?APPID=" + this._appid;
Util.spawn(["gnome-open", url]);
try {
Util.trySpawn(["gnome-open", url]);
} catch (err) {
try {
Util.trySpawn(["xdg-open", url]);
} catch (err) {
let title = _("Execution of 'gnome-open' and 'xdg-open' failed.\nCan not open %s").format(url);
Main.notifyError(title, err.message);
}
}
}));
this.menu.addMenuItem(item);

Loading…
Cancel
Save