From 0e86a37dac2ba3c8efd671252deed9ee634896ba Mon Sep 17 00:00:00 2001 From: igor Ingultsov Date: Wed, 8 Jun 2011 01:24:53 +0800 Subject: [PATCH] added 'preferences' menu item to call preferences configurator tool --- src/extension.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/extension.js b/src/extension.js index 3e6dfeb..6c4aed2 100644 --- a/src/extension.js +++ b/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();