Package: gnome-shell-timer / 0.3.20+20190726-1

gnome-3.38.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
From 8b17c16b9ad17e676999d57d73acc1c18e4f9ba2 Mon Sep 17 00:00:00 2001
From: Georgy Komarov <jubnzv@gmail.com>
Date: Sun, 4 Oct 2020 16:53:26 +0300
Subject: [PATCH] Support GNOME 3.38

---
 timer@olebowle.gmx.com/extension.js  | 30 ++++++++++++++--------------
 timer@olebowle.gmx.com/metadata.json |  2 +-
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/timer@olebowle.gmx.com/extension.js b/timer@olebowle.gmx.com/extension.js
index c53407c..8548094 100644
--- a/timer@olebowle.gmx.com/extension.js
+++ b/timer@olebowle.gmx.com/extension.js
@@ -107,10 +107,10 @@ const Indicator = new Lang.Class({
         this._pie.set_width(30);
         this._pie.set_height(25);
         this._pie.connect('repaint', Lang.bind(this, this._draw));
-        this._box.add(this._pie, { y_align: St.Align.MIDDLE, y_fill: false });
+        this._box.add_actor(this._pie, { y_align: St.Align.MIDDLE, y_fill: false });
         //Set default menu
         this._timer = new St.Label();
-        this._box.add(this._timer, { y_align: St.Align.MIDDLE, y_fill: false });
+        this._box.add_actor(this._timer, { y_align: St.Align.MIDDLE, y_fill: false });
 
         this._timeSpent = 0;
         this._stopTimer = true;
@@ -159,7 +159,7 @@ const Indicator = new Lang.Class({
                 let bin = new St.Bin({ x_align: St.Align.END });
                 bin.child = label;
 
-                item.actor.add(bin, { expand: true, x_align: St.Align.END });
+                item.actor.add_actor(bin, { expand: true, x_align: St.Align.END });
                 item.connect('activate', Lang.bind(this, function() {
                     this._time = this._presets[key];
                     this._issuer = key;
@@ -189,7 +189,7 @@ const Indicator = new Lang.Class({
         this._persistentMessageDialog = new ModalDialog.ModalDialog();
         this._persistentMessageLabel = new St.Label({ style_class: 'persistent-message-label',
         text: _("Timer finished!") });
-        this._persistentMessageDialog.contentLayout.add(this._persistentMessageLabel, { x_fill: true, y_fill: true });
+        this._persistentMessageDialog.contentLayout.add_actor(this._persistentMessageLabel, { x_fill: true, y_fill: true });
         this._persistentMessageDialog.setButtons([{ label: _("Close"),
             action: Lang.bind(this, function(param) { this._persistentMessageDialog.close(); }),
             key:    Clutter.Escape
@@ -206,19 +206,19 @@ const Indicator = new Lang.Class({
         this._hoursLabel = new St.Label({ text: this._hours.toString() + "h" });
         let bin = new St.Bin({ x_align: St.Align.END });
         bin.child = this._hoursLabel;
-        item.actor.add(bin, { expand: true, x_align: St.Align.END });
+        item.actor.add_actor(bin, { expand: true, x_align: St.Align.END });
         this._timerMenu.menu.addMenuItem(item);
 
         item = new PopupMenu.PopupBaseMenuItem({ activate: false });
         this._hoursSlider = new Slider.Slider(0);
         this._hoursSlider._value = this._hours / 23;
-        this._hoursSlider.connect('value-changed', Lang.bind(this, function() {
+        this._hoursSlider.connect('notify::value', Lang.bind(this, function() {
             this._hours = Math.ceil(this._hoursSlider._value*23);
             this._hoursLabel.set_text(this._hours.toString() + "h");
             this._time = this._hours*3600 + this._minutes*60 + this._seconds;
             this._issuer = 'setTimer';
         } ));
-        item.actor.add(this._hoursSlider.actor, { expand: true });
+        item.actor.add_actor(this._hoursSlider.actor, { expand: true });
         this._timerMenu.menu.addMenuItem(item);
 
         //Minutes
@@ -226,19 +226,19 @@ const Indicator = new Lang.Class({
         this._minutesLabel = new St.Label({ text: this._minutes.toString() + "m" });
         bin = new St.Bin({ x_align: St.Align.END });
         bin.child = this._minutesLabel;
-        item.actor.add(bin, { expand: true, x_align: St.Align.END });
+        item.actor.add_actor(bin, { expand: true, x_align: St.Align.END });
         this._timerMenu.menu.addMenuItem(item);
 
         item = new PopupMenu.PopupBaseMenuItem({ activate: false });
         this._minutesSlider = new Slider.Slider(0);
         this._minutesSlider._value = this._minutes / 59;
-        this._minutesSlider.connect('value-changed', Lang.bind(this, function() {
+        this._minutesSlider.connect('notify::value', Lang.bind(this, function() {
             this._minutes = Math.ceil(this._minutesSlider._value*59);
             this._minutesLabel.set_text(this._minutes.toString() + "m");
             this._time = this._hours*3600 + this._minutes*60 + this._seconds;
             this._issuer = 'setTimer';
         } ));
-        item.actor.add(this._minutesSlider.actor, { expand: true });
+        item.actor.add_actor(this._minutesSlider.actor, { expand: true });
         this._timerMenu.menu.addMenuItem(item);
 
         //Seconds
@@ -246,19 +246,19 @@ const Indicator = new Lang.Class({
         this._secondsLabel = new St.Label({ text: this._seconds.toString() + "s" });
         bin = new St.Bin({ x_align: St.Align.END });
         bin.child = this._secondsLabel;
-        item.actor.add(bin, { expand: true, x_align: St.Align.END });
+        item.actor.add_actor(bin, { expand: true, x_align: St.Align.END });
         this._timerMenu.menu.addMenuItem(item);
 
         item = new PopupMenu.PopupBaseMenuItem({ activate: false });
         this._secondsSlider = new Slider.Slider(0);
         this._secondsSlider._value = this._seconds / 59;
-        this._secondsSlider.connect('value-changed', Lang.bind(this, function() {
+        this._secondsSlider.connect('notify::value', Lang.bind(this, function() {
             this._seconds = Math.ceil(this._secondsSlider._value*59);
             this._secondsLabel.set_text(this._seconds.toString() + "s");
             this._time = this._hours*3600 + this._minutes*60 + this._seconds;
             this._issuer = 'setTimer';
         } ));
-        item.actor.add(this._secondsSlider.actor, { expand: true });
+        item.actor.add_actor(this._secondsSlider.actor, { expand: true });
         this._timerMenu.menu.addMenuItem(item);
     },
 
@@ -356,7 +356,7 @@ const Indicator = new Lang.Class({
     _notifyUser: function(text) {
         if(this._showNotifications) {
             let source = new MessageTray.SystemNotificationSource();
-            Main.messageTray.add(source);
+            Main.messageTray.add_actor(source);
             let notification = new MessageTray.Notification(source, text, null);
             notification.setTransient(true);
             source.notify(notification);
@@ -366,7 +366,7 @@ const Indicator = new Lang.Class({
  	    this._persistentMessageDialog = new ModalDialog.ModalDialog();
 	    this._persistentMessageLabel = new St.Label({ style_class: 'persistent-message-label',
         	text: _(text) });
-	    this._persistentMessageDialog.contentLayout.add(this._persistentMessageLabel, { x_fill: true, y_fill: true });
+	    this._persistentMessageDialog.contentLayout.add_actor(this._persistentMessageLabel, { x_fill: true, y_fill: true });
        	    this._persistentMessageDialog.setButtons([{ label: _("Close"),
 	        action: Lang.bind(this, function(param) {
 	          this._persistentMessageDialog.close();
diff --git a/timer@olebowle.gmx.com/metadata.json b/timer@olebowle.gmx.com/metadata.json
index df65712..8a0bf98 100644
--- a/timer@olebowle.gmx.com/metadata.json
+++ b/timer@olebowle.gmx.com/metadata.json
@@ -1,5 +1,5 @@
 {
-    "shell-version": ["3.32"],
+    "shell-version": ["3.32", "3.38"],
     "uuid": "timer@olebowle.gmx.com",
     "name": "Timer",
     "url": "https://github.com/olebowle/gnome-shell-timer",