~jbicha/ubuntu/oneiric/gnome-shell/oneiric-3.2.2.1

« back to all changes in this revision

Viewing changes to js/ui/lookingGlass.js

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2011-09-07 09:09:05 UTC
  • mfrom: (1.1.29 upstream)
  • Revision ID: package-import@ubuntu.com-20110907090905-kbo4fewcg12zt99u
Tags: 3.1.90.1-0ubuntu1
* New upstream release.
* debian/control: Bump build-depends on new mutter
* debian/patches/01_favorite_apps.patch: Updated
* debian/patches/03_remove-glx-dependency-on-armel.patch: Refreshed
* debian/patches/04_build-without-caribou.patch
  - Build without caribou since Ubuntu uses onboard and our System 
    Settings doesn't support choosing a different screen keyboard yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
WindowList.prototype = {
223
223
    _init : function () {
224
224
        this.actor = new St.BoxLayout({ name: 'Windows', vertical: true, style: 'spacing: 8px' });
225
 
        let display = global.screen.get_display();
226
225
        let tracker = Shell.WindowTracker.get_default();
227
226
        this._updateId = Main.initializeDeferredWork(this.actor, Lang.bind(this, this._updateWindowList));
228
 
        display.connect('window-created', Lang.bind(this, this._updateWindowList));
 
227
        global.display.connect('window-created', Lang.bind(this, this._updateWindowList));
229
228
        tracker.connect('tracked-windows-changed', Lang.bind(this, this._updateWindowList));
230
229
    },
231
230
 
248
247
            box.add(propsBox);
249
248
            propsBox.add(new St.Label({ text: 'wmclass: ' + metaWindow.get_wm_class() }));
250
249
            let app = tracker.get_window_app(metaWindow);
251
 
            if (app != null && !app.is_transient()) {
 
250
            if (app != null && !app.is_window_backed()) {
252
251
                let icon = app.create_icon_texture(22);
253
252
                let propBox = new St.BoxLayout({ style: 'spacing: 6px; ' });
254
253
                propsBox.add(propBox);
639
638
                                        name: 'lookingGlassExtensions' });
640
639
        this._noExtensions = new St.Label({ style_class: 'lg-extensions-none',
641
640
                                             text: _("No extensions installed") });
 
641
        this._numExtensions = 0;
642
642
        this._extensionsList = new St.BoxLayout({ vertical: true,
643
643
                                                  style_class: 'lg-extensions-list' });
 
644
        this._extensionsList.add(this._noExtensions);
644
645
        this.actor.add(this._extensionsList);
645
 
        this._loadExtensionList();
 
646
 
 
647
        for (let uuid in ExtensionSystem.extensionMeta)
 
648
            this._loadExtension(null, uuid);
 
649
 
 
650
        ExtensionSystem.connect('extension-loaded',
 
651
                                Lang.bind(this, this._loadExtension));
646
652
    },
647
653
 
648
 
    _loadExtensionList: function() {
649
 
        let extensions = ExtensionSystem.extensionMeta;
650
 
        let totalExtensions = 0;
651
 
        for (let uuid in extensions) {
652
 
            let extensionDisplay = this._createExtensionDisplay(extensions[uuid]);
653
 
            this._extensionsList.add(extensionDisplay);
654
 
            totalExtensions++;
655
 
        }
656
 
        if (totalExtensions == 0) {
657
 
            this._extensionsList.add(this._noExtensions);
658
 
        }
 
654
    _loadExtension: function(o, uuid) {
 
655
        let extension = ExtensionSystem.extensionMeta[uuid];
 
656
        // There can be cases where we create dummy extension metadata
 
657
        // that's not really a proper extension. Don't bother with these.
 
658
        if (!extension.name)
 
659
            return;
 
660
 
 
661
        let extensionDisplay = this._createExtensionDisplay(extension);
 
662
        if (this._numExtensions == 0)
 
663
            this._extensionsList.remove_actor(this._noExtensions);
 
664
 
 
665
        this._numExtensions ++;
 
666
        this._extensionsList.add(extensionDisplay);
659
667
    },
660
668
 
661
669
    _onViewSource: function (actor) {
682
690
                return _("Error");
683
691
            case ExtensionSystem.ExtensionState.OUT_OF_DATE:
684
692
                return _("Out of date");
 
693
            case ExtensionSystem.ExtensionState.DOWNLOADING:
 
694
                return _("Downloading");
685
695
        }
686
696
        return 'Unknown'; // Not translated, shouldn't appear
687
697
    },
692
702
                                   text: meta.name });
693
703
        box.add(name, { expand: true });
694
704
        let description = new St.Label({ style_class: 'lg-extension-description',
695
 
                                         text: meta.description });
 
705
                                         text: meta.description || 'No description' });
696
706
        box.add(description, { expand: true });
697
707
 
698
708
        let metaBox = new St.BoxLayout();
751
761
                                        Lang.bind(this, this._updateFont));
752
762
        this._updateFont();
753
763
 
754
 
        Main.uiGroup.add_actor(this.actor);
 
764
        // we add it to the chrome because we want it to appear to slide
 
765
        // out from underneath the panel
 
766
        Main.layoutManager.addChrome(this.actor);
755
767
 
756
768
        this._objInspector = new ObjInspector();
757
769
        Main.uiGroup.add_actor(this._objInspector.actor);
962
974
 
963
975
        this._notebook.selectIndex(0);
964
976
        this.actor.show();
965
 
        this.actor.lower(Main.chrome.actor);
 
977
        this.actor.lower_bottom();
966
978
        this._open = true;
967
979
        this._history.lastItem();
968
980
 
993
1005
 
994
1006
        Main.popModal(this._entry);
995
1007
 
 
1008
        this.actor.lower_bottom();
996
1009
        Tweener.addTween(this.actor, { time: 0.5 / St.get_slow_down_factor(),
997
1010
                                       transition: 'easeOutQuad',
998
1011
                                       y: this._hiddenY,