From 445b64833b5aa1c649bc3e733f764f90836da843 Mon Sep 17 00:00:00 2001 From: simon04 Date: Tue, 7 Jun 2011 22:45:29 +0200 Subject: [PATCH] Inline spawn, add L10n for string. --- src/extension.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/extension.js b/src/extension.js index 2c50594..ab40e97 100644 --- a/src/extension.js +++ b/src/extension.js @@ -65,10 +65,6 @@ const WeatherPosition = { RIGHT: 1 } -function Open_Perference() { - Util.spawn(["weather-extension-configurator"]); -} - function WeatherMenuButton() { this._init(); } @@ -172,8 +168,10 @@ WeatherMenuButton.prototype = { this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); - let item = new PopupMenu.PopupMenuItem("Preferences..."); - item.connect('activate', Open_Perference); + let item = new PopupMenu.PopupMenuItem(_("Preferences...")); + item.connect('activate', function() { + Util.spawn(["weather-extension-configurator"]); + }); this.menu.addMenuItem(item); // Items