Use Gtk.show_uri instead of spawning gnome-open/xdg-open to show actual weather in browser.

multiprovider
Jens Lody 11 years ago
parent 5050cbbbd1
commit 4f2f51bf2b
  1. 10
      src/extension.js

@ -253,14 +253,10 @@ const WeatherMenuButton = new Lang.Class({
url += "?APPID=" + this._appid; url += "?APPID=" + this._appid;
try { try {
Util.trySpawn(["gnome-open", url]); Gtk.show_uri(null, url, global.get_current_time());
} catch (err) { } catch (err) {
try { let title = _("Can not open %s").format(url);
Util.trySpawn(["xdg-open", url]); Main.notifyError(title, err.message);
} catch (err) {
let title = _("Execution of 'gnome-open' and 'xdg-open' failed.\nCan not open %s").format(url);
Main.notifyError(title, err.message);
}
} }
})); }));

Loading…
Cancel
Save