mirror of
https://github.com/oleid/gnome-shell-teatime.git
synced 2022-04-29 18:53:50 +00:00
Hopefully make it work for gnome-shell 3.8 and older
This commit is contained in:
parent
dad8aa2733
commit
a113f7a859
@ -119,10 +119,16 @@ const PopupTeaMenuItem = new Lang.Class({
|
|||||||
_init: function (sTeaname, nBrewtime, params) {
|
_init: function (sTeaname, nBrewtime, params) {
|
||||||
this.parent(params);
|
this.parent(params);
|
||||||
|
|
||||||
this.tealabel = new St.Label({ text: sTeaname });
|
if (this.actor instanceof St.BoxLayout) {
|
||||||
this.timelabel = new St.Label({ text: Utils.formatTime(nBrewtime) });
|
// will be used for gnome-shell 3.10 and possibly above
|
||||||
this.actor.add(this.tealabel, { expand: true });
|
this.tealabel = new St.Label({ text: sTeaname });
|
||||||
this.actor.add(this.timelabel);
|
this.timelabel = new St.Label({ text: Utils.formatTime(nBrewtime) });
|
||||||
|
this.actor.add(this.tealabel, { expand: true });
|
||||||
|
this.actor.add(this.timelabel);
|
||||||
|
} else {
|
||||||
|
this.tealabel = new St.Label({ text: sTeaname + "\t\t" + Utils.formatTime(nBrewtime) });
|
||||||
|
this.actor.add(this.tealabel, { expand: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -164,12 +170,10 @@ const TeaTime = new Lang.Class({
|
|||||||
this.teaItemCont = new PopupMenu.PopupMenuSection();
|
this.teaItemCont = new PopupMenu.PopupMenuSection();
|
||||||
|
|
||||||
/*******************/
|
/*******************/
|
||||||
let head = new PopupMenu.PopupMenuSection();
|
// maybe one day the PopupImageMenuItem works^^
|
||||||
let settingsIcon = new St.Icon({ icon_name : 'gtk-preferences', icon_size: 15 });
|
let head = new PopupMenu.PopupMenuSection();
|
||||||
let item = new PopupMenu.PopupMenuItem(_("Show settings"));
|
let item = new PopupMenu.PopupMenuItem(_("Show settings")); //, 'gtk-preferences');
|
||||||
|
// item._icon.icon_size = 15;
|
||||||
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));
|
item.connect('activate', Lang.bind(this, this._showPreferences));
|
||||||
head.addMenuItem(item);
|
head.addMenuItem(item);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user