[gnome-shell-extensions] Fix mentions of shell_global_get_primary_monitor()
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] Fix mentions of shell_global_get_primary_monitor()
- Date: Tue, 12 Jul 2011 22:57:48 +0000 (UTC)
commit dd4ccca358ae2bbff376e28b916d559d86bc72df
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Jul 9 16:14:08 2011 +0200
Fix mentions of shell_global_get_primary_monitor()
This method has been removed from master, and replaced by
Main.layoutManager.primaryMonitor
extensions/dock/extension.js | 2 +-
extensions/example/extension.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/dock/extension.js b/extensions/dock/extension.js
index c638b2d..299011d 100644
--- a/extensions/dock/extension.js
+++ b/extensions/dock/extension.js
@@ -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;
diff --git a/extensions/example/extension.js b/extensions/example/extension.js
index ceeb067..6c6a847 100644
--- a/extensions/example/extension.js
+++ b/extensions/example/extension.js
@@ -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(); });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]