mirror of
https://github.com/oleid/gnome-shell-teatime.git
synced 2022-04-29 18:53:50 +00:00
Drop compatibility with 3.10 and older
With all the recent changes to fix warnings about using deprecated APIs I'm pretty sure that the code will no longer work with something like GNOME 3.10 or the even older 3.4. Drop all the code which specifically deals with older version. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
e46368b084
commit
883b6a65bb
@ -42,21 +42,9 @@ class PopupTeaMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.actor instanceof St.BoxLayout) {
|
this.add(this.tealabel);
|
||||||
// will be used for gnome-shell 3.10 and possibly above where this.actor is BoxLayout
|
if (nBrewtime != 0) {
|
||||||
this.add(this.tealabel);
|
this.add(this.timelabel);
|
||||||
if (nBrewtime != 0) {
|
|
||||||
this.add(this.timelabel);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.addActor(this.tealabel, {
|
|
||||||
expand: true
|
|
||||||
});
|
|
||||||
if (nBrewtime != 0) {
|
|
||||||
this.addActor(this.timelabel, {
|
|
||||||
expand: false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._delegate = this;
|
this._delegate = this;
|
||||||
@ -202,24 +190,7 @@ class TeaTime extends PanelMenu.Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_showNotification(subject, text) {
|
_showNotification(subject, text) {
|
||||||
let source = (Utils.isGnome34()) ?
|
let source = new MessageTray.Source(_("TeaTime applet"), 'utilities-teatime');
|
||||||
new MessageTray.Source(_("TeaTime applet")) :
|
|
||||||
new MessageTray.Source(_("TeaTime applet"), 'utilities-teatime');
|
|
||||||
|
|
||||||
if (Utils.isGnome34()) {
|
|
||||||
source.createNotificationIcon =
|
|
||||||
function () {
|
|
||||||
let iconBox = new St.Bin();
|
|
||||||
iconBox._size = this.ICON_SIZE;
|
|
||||||
iconBox.child = new St.Icon({
|
|
||||||
icon_name: 'utilities-teatime',
|
|
||||||
icon_type: St.IconType.FULLCOLOR,
|
|
||||||
icon_size: iconBox._size
|
|
||||||
});
|
|
||||||
return iconBox;
|
|
||||||
} // createNotificationIcon
|
|
||||||
}
|
|
||||||
|
|
||||||
Main.messageTray.add(source);
|
Main.messageTray.add(source);
|
||||||
|
|
||||||
let notification = new MessageTray.Notification(source, subject, text);
|
let notification = new MessageTray.Notification(source, subject, text);
|
||||||
|
@ -151,7 +151,3 @@ function getGlobalDisplayScaleFactor() {
|
|||||||
function isType(value, typename) {
|
function isType(value, typename) {
|
||||||
return typeof value == typename;
|
return typeof value == typename;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isGnome34() {
|
|
||||||
return imports.misc.extensionUtils.versionCheck(["3.4"], imports.misc.config.PACKAGE_VERSION);
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user