diff --git a/src/data/cup00.png b/src/data/cup00.png deleted file mode 100644 index ed0ff54..0000000 Binary files a/src/data/cup00.png and /dev/null differ diff --git a/src/data/cup01.png b/src/data/cup01.png deleted file mode 100644 index 5015295..0000000 Binary files a/src/data/cup01.png and /dev/null differ diff --git a/src/data/cup02.png b/src/data/cup02.png deleted file mode 100644 index 88e7551..0000000 Binary files a/src/data/cup02.png and /dev/null differ diff --git a/src/data/cup03.png b/src/data/cup03.png deleted file mode 100644 index 7d621b7..0000000 Binary files a/src/data/cup03.png and /dev/null differ diff --git a/src/data/cup04.png b/src/data/cup04.png deleted file mode 100644 index f068707..0000000 Binary files a/src/data/cup04.png and /dev/null differ diff --git a/src/data/cup05.png b/src/data/cup05.png deleted file mode 100644 index 17518f5..0000000 Binary files a/src/data/cup05.png and /dev/null differ diff --git a/src/data/cup06.png b/src/data/cup06.png deleted file mode 100644 index a176d54..0000000 Binary files a/src/data/cup06.png and /dev/null differ diff --git a/src/data/cup07.png b/src/data/cup07.png deleted file mode 100644 index 97d6ce9..0000000 Binary files a/src/data/cup07.png and /dev/null differ diff --git a/src/data/cup08.png b/src/data/cup08.png deleted file mode 100644 index 3ea94d8..0000000 Binary files a/src/data/cup08.png and /dev/null differ diff --git a/src/data/cup09.png b/src/data/cup09.png deleted file mode 100644 index 56e36a3..0000000 Binary files a/src/data/cup09.png and /dev/null differ diff --git a/src/data/cup10.png b/src/data/cup10.png deleted file mode 100644 index 6f7b8cd..0000000 Binary files a/src/data/cup10.png and /dev/null differ diff --git a/src/data/cup11.png b/src/data/cup11.png deleted file mode 100644 index 0c75518..0000000 Binary files a/src/data/cup11.png and /dev/null differ diff --git a/src/data/cup12.png b/src/data/cup12.png deleted file mode 100644 index dd4f740..0000000 Binary files a/src/data/cup12.png and /dev/null differ diff --git a/src/data/cup13.png b/src/data/cup13.png deleted file mode 100644 index c7f8516..0000000 Binary files a/src/data/cup13.png and /dev/null differ diff --git a/src/data/cup14.png b/src/data/cup14.png deleted file mode 100644 index 26e6ced..0000000 Binary files a/src/data/cup14.png and /dev/null differ diff --git a/src/data/cup15.png b/src/data/cup15.png deleted file mode 100644 index 5cb82d8..0000000 Binary files a/src/data/cup15.png and /dev/null differ diff --git a/src/data/cup16.png b/src/data/cup16.png deleted file mode 100644 index 9058b59..0000000 Binary files a/src/data/cup16.png and /dev/null differ diff --git a/src/data/cup17.png b/src/data/cup17.png deleted file mode 100644 index e1a0527..0000000 Binary files a/src/data/cup17.png and /dev/null differ diff --git a/src/data/cup18.png b/src/data/cup18.png deleted file mode 100644 index b955b33..0000000 Binary files a/src/data/cup18.png and /dev/null differ diff --git a/src/data/cup19.png b/src/data/cup19.png deleted file mode 100644 index 77ef504..0000000 Binary files a/src/data/cup19.png and /dev/null differ diff --git a/src/data/cup20.png b/src/data/cup20.png deleted file mode 100644 index 907eecc..0000000 Binary files a/src/data/cup20.png and /dev/null differ diff --git a/src/data/cup21.png b/src/data/cup21.png deleted file mode 100644 index 1e17b31..0000000 Binary files a/src/data/cup21.png and /dev/null differ diff --git a/src/data/cup22.png b/src/data/cup22.png deleted file mode 100644 index 1c86203..0000000 Binary files a/src/data/cup22.png and /dev/null differ diff --git a/src/data/cup23.png b/src/data/cup23.png deleted file mode 100644 index 3ae45bf..0000000 Binary files a/src/data/cup23.png and /dev/null differ diff --git a/src/extension.js b/src/extension.js index 489027e..f1ab940 100644 --- a/src/extension.js +++ b/src/extension.js @@ -28,109 +28,6 @@ const N_ = function (e) { }; - -class TeaTimeFullscreenNotification { - constructor() { - // this spans the whole monitor and contains - // the actual layout, which it displays in - // the center of itself - - this._bin = new St.Bin({ - x_align: St.Align.MIDDLE, - y_align: St.Align.MIDDLE - }); - - if (typeof Layout.MonitorConstraint != 'undefined') { - // MonitorConstraint was introduced in gnome-3.6 - this._monitorConstraint = new Layout.MonitorConstraint(); - this._bin.add_constraint(this._monitorConstraint); - } - Main.uiGroup.add_actor(this._bin); - - // a table imitating a vertical box layout to hold the texture and - // a label underneath it - this._layout = new St.BoxLayout({ - vertical: true, - y_align: Clutter.ActorAlign.CENTER - }); - this._bin.set_child(this._layout); - - // find all the textures - let datadir = Me.dir.get_child("data"); - this._textureFiles = []; - if (datadir.query_exists(null)) { - let enumerator = datadir.enumerate_children(Gio.FILE_ATTRIBUTE_STANDARD_NAME, - Gio.FileQueryInfoFlags.NONE, - null); - let info; - info = enumerator.next_file(null); - while (info != null) { - let filename = info.get_name(); - if (filename.match(/^cup.*/)) { - this._textureFiles.push(datadir.get_child(filename).get_path()); - } - info = enumerator.next_file(null); - } - } - this._textureFiles.sort(); - - this._texture = new Clutter.Texture({ - reactive: true, - keep_aspect_ratio: true - }); - this._texture.connect("button-release-event", this.hide.bind(this)); - this._layout.add_child(this._texture); - - this._timeline = new Clutter.Timeline({ - duration: 2000, - repeat_count: -1, - progress_mode: Clutter.AnimationMode.LINEAR - }); - this._timeline.connect("new-frame", this._newFrame.bind(this)); - - this._label = new St.Label({ - text: _("Your tea is ready!"), - style_class: "dash-label" - }); - this._layout.add_child(this._label); - - this._lightbox = new imports.ui.lightbox.Lightbox(Main.uiGroup); // Seems not to work on Gnome 3.10 { fadeInTime: 0.5, fadeOutTime: 0.5 } - this._lightbox.highlight(this._bin); - } - destroy() { - this.hide(); - Main.popModal(this._bin); - this._bin.destroy(); - this._lightbox.hide(); - } - _newFrame(timeline, msecs, user) { - let progress = timeline.get_progress(); - let idx = Math.round(progress * this._textureFiles.length) % this._textureFiles.length; - this._texture.set_from_file(this._textureFiles[idx]); - } - show() { - if (typeof Layout.MonitorConstraint != 'undefined') { - // global.display was introduced in gnome-shell 3.30 - if (typeof global.screen != 'undefined') { - this._monitorConstraint.index = global.screen.get_current_monitor(); - } else { - this._monitorConstraint.index = global.display.get_current_monitor(); - } - } - Main.pushModal(this._bin); - this._timeline.start(); - this._lightbox.show(); - this._bin.show_all(); - } - hide() { - Main.popModal(this._bin); - this._bin.hide(); - this._lightbox.hide(); - this._timeline.stop(); - } -}; - - let PopupTeaMenuItem = GObject.registerClass( class PopupTeaMenuItem extends PopupMenu.PopupBaseMenuItem { _init(sTeaname, nBrewtime, params) { @@ -383,14 +280,8 @@ class TeaTime extends PanelMenu.Button { // count down finished, switch display again this._stopCountdown(); this._playSound(); - - if (!Utils.isGnome34() && this._settings.get_boolean(this.config_keys.fullscreen_notification)) { - this.dialog = new TeaTimeFullscreenNotification(); - this.dialog.show(); - } else { - this._showNotification(_("Your tea is ready!"), - _("Drink it, while it is hot!")); - } + this._showNotification(_("Your tea is ready!"), + _("Drink it, while it is hot!")); return false; } else { this._updateTimerDisplay(remainingTime); diff --git a/src/prefs.js b/src/prefs.js index 23044e1..11c951f 100644 --- a/src/prefs.js +++ b/src/prefs.js @@ -57,11 +57,6 @@ class TeaTimePrefsWidget extends Gtk.Grid { _initWindow() { let curRow = 0; - let labelFN = new Gtk.Label({ - label: _("Fullscreen Notifications"), - hexpand: true, - halign: Gtk.Align.START - }); let labelGC = new Gtk.Label({ label: _("Graphical Countdown"), hexpand: true, @@ -74,9 +69,6 @@ class TeaTimePrefsWidget extends Gtk.Grid { halign: Gtk.Align.START }); - this.fullscreenNotificationSwitch = new Gtk.Switch(); - this.fullscreenNotificationSwitch.connect("notify::active", this._saveFullscreenNotifications.bind(this)); - this.graphicalCountdownSwitch = new Gtk.Switch(); this.graphicalCountdownSwitch.connect("notify::active", this._saveGraphicalCountdown.bind(this)); @@ -94,14 +86,6 @@ class TeaTimePrefsWidget extends Gtk.Grid { this.alarmSoundFileFilter.add_mime_type("audio/*"); this.alarmSoundFile.connect("selection_changed", this._saveSoundFile.bind(this)); - - if (!Utils.isGnome34()) { - // Full screen notifications currently not working on GNOME 3.4, thus don't show the switch - this.attach(labelFN, 0 /*col*/ , curRow /*row*/ , 2 /*col span*/ , 1 /*row span*/ ); - this.attach(this.fullscreenNotificationSwitch, 2, curRow, 1, 1); - curRow += 1; - } - this.attach(labelGC, 0 /*col*/ , curRow /*row*/ , 2 /*col span*/ , 1 /*row span*/ ); this.attach(this.graphicalCountdownSwitch, 2, curRow, 1, 1); curRow += 1; @@ -183,8 +167,6 @@ class TeaTimePrefsWidget extends Gtk.Grid { if (this._inhibitUpdate) return; - this.fullscreenNotificationSwitch.active = this._settings.get_boolean(this.config_keys.fullscreen_notification) - this.graphicalCountdownSwitch.active = this._settings.get_boolean(this.config_keys.graphical_countdown) this.alarmSoundSwitch.active = this._settings.get_boolean(this.config_keys.use_alarm_sound) let list = this._settings.get_value(this.config_keys.steep_times).unpack(); @@ -242,16 +224,6 @@ class TeaTimePrefsWidget extends Gtk.Grid { this.treeview.get_selection().unselect_all(); } - _saveFullscreenNotifications(sw, data) { - // don't update the backend if someone else is messing with the model - if (this._inhibitUpdate) - return; - this._inhibitUpdate = true; - this._settings.set_boolean(this.config_keys.fullscreen_notification, - sw.active); - this._inhibitUpdate = false; - } - _saveGraphicalCountdown(sw, data) { // don't update the backend if someone else is messing with the model if (this._inhibitUpdate) diff --git a/src/utils.js b/src/utils.js index 7388418..591c0c4 100644 --- a/src/utils.js +++ b/src/utils.js @@ -15,7 +15,6 @@ function debug(text) { function GetConfigKeys() { return { steep_times: 'steep-times', - fullscreen_notification: 'fullscreen-notification', graphical_countdown: 'graphical-countdown', use_alarm_sound: 'use-alarm-sound', alarm_sound: 'alarm-sound-file'