mirror of
https://github.com/oleid/gnome-shell-teatime.git
synced 2022-04-29 18:53:50 +00:00
add entry for applet settings
This commit is contained in:
parent
4fffb16ced
commit
e0152332c2
@ -166,6 +166,16 @@ const TeaTime = new Lang.Class({
|
||||
// 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);
|
||||
|
||||
// fill with new teas
|
||||
let list = this._settings.get_value(Utils.TEATIME_STEEP_TIMES_KEY).unpack();
|
||||
for (let teaname in list) {
|
||||
@ -250,6 +260,10 @@ const TeaTime = new Lang.Class({
|
||||
cr.moveTo(0, 0);
|
||||
cr.arc(0, 0, r, 3 / 2 * pi, 3 / 2 * pi + 2 * pi * this._progress);
|
||||
cr.fill();
|
||||
},
|
||||
_showPreferences : function() {
|
||||
imports.misc.util.spawn(["gnome-shell-extension-prefs", ExtensionUtils.getCurrentExtension().metadata['uuid']]);
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user