added 'preferences' menu item to call preferences configurator tool

yahoo_weather
igor Ingultsov 14 years ago committed by simon04
parent bc0d2e8e1d
commit 0e86a37dac
  1. 11
      src/extension.js

@ -37,6 +37,7 @@ const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Soup = imports.gi.Soup;
const St = imports.gi.St;
const Util = imports.misc.util;
const _ = Gettext.gettext;
const Main = imports.ui.main;
@ -64,6 +65,10 @@ const WeatherPosition = {
RIGHT: 1
}
function Open_Perference() {
Util.spawn(["weather-extension-configurator"]);
}
function WeatherMenuButton() {
this._init();
}
@ -164,6 +169,12 @@ WeatherMenuButton.prototype = {
mainBox.add_actor(this._futureWeather);
this.menu.addActor(mainBox);
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
item = new PopupMenu.PopupMenuItem("Preferences...");
item.connect('activate', Open_Perference);
this.menu.addMenuItem(item);
// Items
this.showLoadingUi();

Loading…
Cancel
Save