[gnome-shell] lg: add a reference to lookingGlass in the Extensions tab.



commit a8a4a85daccf35a02afcc232735cb046e55b6ab9
Author: Alban Crequy <alban crequy collabora co uk>
Date:   Thu Feb 14 15:28:43 2013 +0000

    lg: add a reference to lookingGlass in the Extensions tab.
    
    When the user clicks on "View Source" or "Web Page" in the "Extensions" tab of
    looking glass, the callback _onViewSource() or _onWebPage() is called and they
    try to close looking glass: this._lookingGlass.close();
    
    But it does not work and generate the exception "this._lookingGlass is
    undefined". This patch fixes that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693814

 js/ui/lookingGlass.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js
index f39479b..718942e 100644
--- a/js/ui/lookingGlass.js
+++ b/js/ui/lookingGlass.js
@@ -685,7 +685,8 @@ const Memory = new Lang.Class({
 const Extensions = new Lang.Class({
     Name: 'Extensions',
 
-    _init: function() {
+    _init: function(lookingGlass) {
+        this._lookingGlass = lookingGlass;
         this.actor = new St.BoxLayout({ vertical: true,
                                         name: 'lookingGlassExtensions' });
         this._noExtensions = new St.Label({ style_class: 'lg-extensions-none',
@@ -912,7 +913,7 @@ const LookingGlass = new Lang.Class({
         this._memory = new Memory();
         notebook.appendPage('Memory', this._memory.actor);
 
-        this._extensions = new Extensions();
+        this._extensions = new Extensions(this);
         notebook.appendPage('Extensions', this._extensions.actor);
 
         this._entry.clutter_text.connect('activate', Lang.bind(this, function (o, e) {


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