Fix mentions of shell_global_get_primary_monitor()
This method has been removed from master, and replaced by Main.layoutManager.primaryMonitor
This commit is contained in:
@@ -143,7 +143,7 @@ Dock.prototype = {
|
||||
this.actor.add_actor(this._placeholderText);
|
||||
}
|
||||
|
||||
let primary = global.get_primary_monitor();
|
||||
let primary = Main.layoutManager.primaryMonitor;
|
||||
let height = (icons)*(this._item_size + this._spacing) + 2*this._spacing;
|
||||
let width = (icons)*(this._item_size + this._spacing) + 2*this._spacing;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ const Main = imports.ui.main;
|
||||
|
||||
function _showHello() {
|
||||
let text = new St.Label({ style_class: 'helloworld-label', text: _("Hello, world!") });
|
||||
let monitor = global.get_primary_monitor();
|
||||
let monitor = Main.layoutManager.primaryMonitor;
|
||||
global.stage.add_actor(text);
|
||||
text.set_position(Math.floor (monitor.width / 2 - text.width / 2), Math.floor(monitor.height / 2 - text.height / 2));
|
||||
Mainloop.timeout_add(3000, function () { text.destroy(); });
|
||||
|
||||
Reference in New Issue
Block a user