Skip to content

Commit 16cec1e

Browse files
committed
Update fix gtk deprications warns
Update fix destroying splash obj on modern shells
1 parent efa61fd commit 16cec1e

8 files changed

+11
-9
lines changed

common/Preferences.js

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* with this program. If not, see <http://www.gnu.org/licenses/>.
99
*/
1010

11+
imports.gi.versions.Gtk = '3.0';
12+
1113
const Gtk = imports.gi.Gtk;
1214
const Gio = imports.gi.Gio;
1315
const GLib = imports.gi.GLib;

common/ui/ControlPanel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ var ControlPanel = new Lang.Class({
335335
this.slider_core.slider.set_value (GLib.get_num_processors () / cpu.cpucount);
336336
this.corewarn = new SideMenu.SideItem ("⚠ Single Core Thread","Single core is not recommended");
337337
this.corewarn.get_style_context ().add_class ("warn");
338-
this.corewarn.xalign = 0.5;
338+
this.corewarn.halign = 3;
339339
this.add_item (this.corewarn);
340340
this.corewarn.connect ('clicked', () => {
341341
let app = Gio.AppInfo.get_default_for_type ("text/plain", false);

common/ui/InfoPanel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var InfoPanel = new Lang.Class({
3535
_init: function () {
3636
Logger.info ("InfoPanel", "initialization");
3737
this.parent ({orientation:Gtk.Orientation.VERTICAL,margin:0});
38-
this.margin_bottom = this.margin_right = 16;
38+
this.margin_bottom = this.margin_end = 16;
3939
this.border = 8;
4040
this.get_style_context ().add_class ("info-widget");
4141

common/ui/MainWindow.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,20 +118,20 @@ var MainWindow = new Lang.Class ({
118118

119119

120120
this.cpanel = new ControlPanel.ControlPanel (this.application);
121-
this.cpanel.margin_right = 20;
121+
this.cpanel.margin_end = 20;
122122

123123
box = new Gtk.Box ({orientation:Gtk.Orientation.HORIZONTAL, margin:2});
124124
box.margin_bottom = 12;
125125
this.add (box);
126126

127127
this.statebar = new Gtk.Box ({orientation:Gtk.Orientation.VERTICAL, margin:16});
128-
this.statebar.margin_left = 28; this.statebar.margin_right = 0;
128+
this.statebar.margin_start = 28; this.statebar.margin_end = 0;
129129
this.statebar.set_size_request (8, 160);
130130
this.statebar.get_style_context ().add_class ("status-bar");
131131
box.add (this.statebar);
132132

133133
this.infobar = new InfoPanel.InfoPanel ();
134-
this.infobar.margin_left = 22;
134+
this.infobar.margin_start = 22;
135135
box.add (this.infobar);
136136
box.pack_end (this.cpanel, true, true, 8);
137137

common/ui/Slider.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var Slider = new Lang.Class({
1818

1919
_init: function (text, info, tooltip) {
2020
this.parent ({orientation:Gtk.Orientation.VERTICAL, margin:8});
21-
this.margin_left = 16;
21+
this.margin_start = 16;
2222
this.get_style_context ().add_class ("slider-item");
2323
this.tooltip_text = tooltip;
2424

common/ui/Switch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var Switch = new Lang.Class({
1818
_init: function (text, state, tooltip) {
1919
this.parent ({orientation:Gtk.Orientation.HORIZONTAL,margin:8});
2020
state = state || false;
21-
this.margin_left = 16;
21+
this.margin_start = 16;
2222
this.get_style_context ().add_class ("switch");
2323
this.tooltip_text = tooltip;
2424

extension.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ const FrequencyIndicator = new Lang.Class({
434434

435435
if (splash.ease) splash.ease ({
436436
opacity: 20, mode: 8, duration: 1200,
437-
onComplete: remove_actor
437+
onComplete: () => { remove_actor (splash)}
438438
}); else GLib.timeout_add (0, 1200, () => { return remove_actor (splash)});
439439
}
440440
});

prefs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ var PageMonitorCPUFreq = new Lang.Class({
227227

228228
let cb_units = Gtk.CheckButton.new_with_label (_("Frequency"));
229229
cb_units.tooltip_text = _("Monitor frequency");
230-
cb_units.margin_left = 32;
230+
cb_units.margin_start = 32;
231231
cb_units.active = frequency_show;
232232
hbox.pack_start (cb_units, true, true, 8);
233233
cb_units.connect ('toggled', Lang.bind (this, (o)=>{

0 commit comments

Comments
 (0)