diff --git a/po/TeaTime.pot b/po/TeaTime.pot index 96c1a28..aa02bb3 100644 --- a/po/TeaTime.pot +++ b/po/TeaTime.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-03 17:59+0100\n" +"POT-Creation-Date: 2013-11-03 18:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,28 +17,32 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../src/extension.js:82 ../src/extension.js:228 +#: ../src/extension.js:82 ../src/extension.js:270 msgid "Your tea is ready!" msgstr "" -#: ../src/extension.js:170 +#: ../src/extension.js:169 msgid "Show settings" msgstr "" -#: ../src/extension.js:192 +#: ../src/extension.js:180 +msgid "min:sec" +msgstr "" + +#: ../src/extension.js:234 msgid "TeaTime applet" msgstr "" -#: ../src/extension.js:209 +#: ../src/extension.js:251 msgid "Timer set!" msgstr "" -#: ../src/extension.js:209 +#: ../src/extension.js:251 #, javascript-format msgid "%ss to go" msgstr "" -#: ../src/extension.js:229 +#: ../src/extension.js:271 msgid "Drink it, while it is hot!" msgstr "" diff --git a/po/de.po b/po/de.po index 285a154..7f89e1c 100644 --- a/po/de.po +++ b/po/de.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: TeaTime 7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-11-03 17:59+0100\n" +"POT-Creation-Date: 2013-11-03 18:16+0100\n" "PO-Revision-Date: 2013-10-31 09:38+0100\n" "Last-Translator: Olaf Leidinger \n" "Language-Team: German\n" @@ -19,27 +19,32 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 1.5.7\n" -#: ../src/extension.js:82 ../src/extension.js:228 +#: ../src/extension.js:82 ../src/extension.js:270 msgid "Your tea is ready!" msgstr "Dein Tee ist fertig!" -#: ../src/extension.js:170 +#: ../src/extension.js:169 msgid "Show settings" msgstr "Einstellungen" -#: ../src/extension.js:192 +#: ../src/extension.js:180 +msgid "min:sec" +msgstr "min:sec" + +#: ../src/extension.js:234 msgid "TeaTime applet" msgstr "TeaTime applet" -#: ../src/extension.js:209 +#: ../src/extension.js:251 msgid "Timer set!" msgstr "Die Zeit läuft!" -#: ../src/extension.js:209 +#: ../src/extension.js:251 +#, javascript-format msgid "%ss to go" msgstr "%ss verbleiben" -#: ../src/extension.js:229 +#: ../src/extension.js:271 msgid "Drink it, while it is hot!" msgstr "Trink ihn, solange er noch heiß ist!" diff --git a/src/extension.js b/src/extension.js index 43d0ff7..e377dd3 100644 --- a/src/extension.js +++ b/src/extension.js @@ -160,22 +160,43 @@ const TeaTime = new Lang.Class({ this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); this._settings.connect("changed::" + Utils.TEATIME_STEEP_TIMES_KEY, Lang.bind(this, this._updateTeaList)); + + this.teaItemCont = new PopupMenu.PopupMenuSection(); + + /*******************/ + let head = new PopupMenu.PopupMenuSection(); + let settingsIcon = new St.Icon({ icon_name : 'gtk-preferences', icon_size: 15 }); + let item = new PopupMenu.PopupMenuItem(_("Show settings")); + + item.actor.set_pack_start(true); // pack the icon in front of the text label + item.actor.add(settingsIcon); + item.connect('activate', Lang.bind(this, this._showPreferences)); + head.addMenuItem(item); + + /*******************/ + let bottom = new PopupMenu.PopupMenuSection(); + this._customEntry = new St.Entry({ style_class: 'teatime-custom-entry', + track_hover: true, + hint_text: _("min:sec") }); + this._customEntry.get_clutter_text().set_max_length(10); + this._customEntry.get_clutter_text().connect("key-press-event", Lang.bind(this, this._createCustomTimer)); + bottom.box.add(this._customEntry); + bottom.actor.set_style("padding: 0px 18px;") + + /*******************/ + + this.menu.addMenuItem(head); + this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); + this.menu.addMenuItem(this.teaItemCont); + this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); + this.menu.addMenuItem(bottom); + this._updateTeaList(); }, _updateTeaList : function(config, output) { // make sure the menu is empty - this.menu.removeAll(); - - settingsIcon = new St.Icon({ icon_name : 'gtk-preferences', icon_size: 15 }); - item = new PopupMenu.PopupMenuItem(_("Show settings")); - item.actor.set_pack_start(true); // pack the icon in front of the text label - item.actor.add(settingsIcon); - item.connect('activate', Lang.bind(this, this._showPreferences)); - this.menu.addMenuItem(item); - - item = new PopupMenu.PopupSeparatorMenuItem(); - this.menu.addMenuItem(item); - + this.teaItemCont.removeAll(); + // fill with new teas let list = this._settings.get_value(Utils.TEATIME_STEEP_TIMES_KEY).unpack(); for (let teaname in list) { @@ -185,17 +206,8 @@ const TeaTime = new Lang.Class({ menuItem.connect('activate', Lang.bind(this, function() { this._initCountdown(time); })); - this.menu.addMenuItem(menuItem); + this.teaItemCont.addMenuItem(menuItem); } - let bottom = new PopupMenu.PopupMenuSection(); - this._customEntry = new St.Entry({ style_class: 'teatime-custom-entry', - track_hover: true, - hint_text: "Custom..." }); - this._customEntry.get_clutter_text().set_max_length(10); - this._customEntry.get_clutter_text().connect("key-press-event", Lang.bind(this, this._createCustomTimer)); - bottom.box.add(this._customEntry); - bottom.actor.set_style("padding: 0px 20px;") - this.menu.addMenuItem(bottom); }, _createCustomTimer: function(text, event) { if (event.get_key_symbol() == Clutter.KEY_Enter ||