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:
Hans de Goede 2020-02-17 22:16:23 +01:00
parent e46368b084
commit 883b6a65bb
2 changed files with 4 additions and 37 deletions

View File

@ -42,21 +42,9 @@ class PopupTeaMenuItem extends PopupMenu.PopupBaseMenuItem {
});
}
if (this.actor instanceof St.BoxLayout) {
// will be used for gnome-shell 3.10 and possibly above where this.actor is BoxLayout
this.add(this.tealabel);
if (nBrewtime != 0) {
this.add(this.timelabel);
}
} else {
this.addActor(this.tealabel, {
expand: true
});
if (nBrewtime != 0) {
this.addActor(this.timelabel, {
expand: false
});
}
this.add(this.tealabel);
if (nBrewtime != 0) {
this.add(this.timelabel);
}
this._delegate = this;
@ -202,24 +190,7 @@ class TeaTime extends PanelMenu.Button {
}
_showNotification(subject, text) {
let source = (Utils.isGnome34()) ?
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
}
let source = new MessageTray.Source(_("TeaTime applet"), 'utilities-teatime');
Main.messageTray.add(source);
let notification = new MessageTray.Notification(source, subject, text);

View File

@ -151,7 +151,3 @@ function getGlobalDisplayScaleFactor() {
function isType(value, typename) {
return typeof value == typename;
}
function isGnome34() {
return imports.misc.extensionUtils.versionCheck(["3.4"], imports.misc.config.PACKAGE_VERSION);
}