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. 8
      src/extension.js

@ -253,15 +253,11 @@ 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]);
} catch (err) {
let title = _("Execution of 'gnome-open' and 'xdg-open' failed.\nCan not open %s").format(url);
Main.notifyError(title, err.message); Main.notifyError(title, err.message);
} }
}
})); }));
this.menu.addMenuItem(item); this.menu.addMenuItem(item);

Loading…
Cancel
Save