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:
Giovanni Campagna
2011-07-09 16:14:08 +02:00
parent 9a8704203b
commit dd4ccca358
2 changed files with 2 additions and 2 deletions

View File

@@ -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(); });