[gnome-shell-extensions] windowsNavigator: support current gnome-shell



commit 3825069e52208ffd793b765cb0315e3ae72ba93a
Author: Maxim Ermilov <zaspire rambler ru>
Date:   Sun Mar 13 00:38:45 2011 +0300

    windowsNavigator: support current gnome-shell
    
    workspace._getVisibleClones was removed.

 extensions/windowsNavigator/extension.js     |   19 +++++++++++--------
 extensions/windowsNavigator/metadata.json.in |    2 +-
 extensions/windowsNavigator/stylesheet.css   |    2 +-
 3 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/extensions/windowsNavigator/extension.js b/extensions/windowsNavigator/extension.js
index 7801e53..0329770 100644
--- a/extensions/windowsNavigator/extension.js
+++ b/extensions/windowsNavigator/extension.js
@@ -45,9 +45,10 @@ function main() {
     Workspace.Workspace.prototype.showTooltip = function() {
         if (this._tip == null)
             return;
-        if (this.parent)
-            return;
-        this.actor.add_actor(this._tip);
+        this._tip.text = (this.metaWorkspace.index() + 1).toString();
+        this._tip.x = this._x;
+        this._tip.y = this._y;
+        this._tip.show();
         this._tip.raise_top();
     }
     Workspace.Workspace.prototype.hideTooltip = function() {
@@ -55,7 +56,7 @@ function main() {
             return;
         if (!this._tip.get_parent())
             return;
-        this.actor.remove_actor(this._tip);
+        this._tip.hide();
     }
     Workspace.Workspace.prototype.getWindowWithTooltip = function(id) {
         for (let i in this._windowOverlays) {
@@ -153,7 +154,7 @@ function main() {
 
     injectToFunction(Workspace.WindowOverlay.prototype, '_init', function(windowClone, parentActor) {
         this._id = null;
-        this._text = new St.Label({ style_class: 'window-tooltip' });
+        this._text = new St.Label({ style_class: 'extension-windowsNavigator-window-tooltip' });
         this._text.hide();
         parentActor.add_actor(this._text);
     });
@@ -165,8 +166,10 @@ function main() {
     });
     injectToFunction(Workspace.Workspace.prototype, '_init', function(metaWorkspace) {
         if (metaWorkspace.index() < 9) {
-            this._tip = new St.Label({ style_class: 'window-tooltip',
-                                       text: (metaWorkspace.index() + 1).toString() });
+            this._tip = new St.Label({ style_class: 'extension-windowsNavigator-window-tooltip',
+                                       visible: false });
+
+            this.actor.add_actor(this._tip);
             this.actor.connect('notify::scale-x', Lang.bind(this, function() {
                 this._tip.set_scale(1 / this.actor.scale_x, 1 / this.actor.scale_x);
             }));
@@ -174,7 +177,7 @@ function main() {
             this._tip = null;
     });
     injectToFunction(Workspace.Workspace.prototype, 'positionWindows', function(flags) {
-        let visibleClones = this._getVisibleClones();
+        let visibleClones = this._windows.slice();
         if (this._reservedSlot)
             visibleClones.push(this._reservedSlot);
 
diff --git a/extensions/windowsNavigator/metadata.json.in b/extensions/windowsNavigator/metadata.json.in
index 92f86df..9499bfb 100644
--- a/extensions/windowsNavigator/metadata.json.in
+++ b/extensions/windowsNavigator/metadata.json.in
@@ -1,5 +1,5 @@
 {
-    "shell-version": ["2.91.5", "@shell_current@"],
+    "shell-version": ["@shell_current@"],
     "uuid": "@uuid@",
     "localedir": "@LOCALEDIR@",
     "original-author": "zaspire rambler ru",
diff --git a/extensions/windowsNavigator/stylesheet.css b/extensions/windowsNavigator/stylesheet.css
index 6406652..841a106 100644
--- a/extensions/windowsNavigator/stylesheet.css
+++ b/extensions/windowsNavigator/stylesheet.css
@@ -1,4 +1,4 @@
-.window-tooltip {
+.extension-windowsNavigator-window-tooltip {
     color: #ff0000;
     background: rgba(0,0,0,0.8);
     border: 1px solid rgba(128,128,128,0.40);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]