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));
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();
647
for (let uuid in ExtensionSystem.extensionMeta)
648
this._loadExtension(null, uuid);
650
ExtensionSystem.connect('extension-loaded',
651
Lang.bind(this, this._loadExtension));
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);
656
if (totalExtensions == 0) {
657
this._extensionsList.add(this._noExtensions);
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.
661
let extensionDisplay = this._createExtensionDisplay(extension);
662
if (this._numExtensions == 0)
663
this._extensionsList.remove_actor(this._noExtensions);
665
this._numExtensions ++;
666
this._extensionsList.add(extensionDisplay);
661
669
_onViewSource: function (actor) {
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 });
698
708
let metaBox = new St.BoxLayout();
751
761
Lang.bind(this, this._updateFont));
752
762
this._updateFont();
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);
756
768
this._objInspector = new ObjInspector();
757
769
Main.uiGroup.add_actor(this._objInspector.actor);
994
1006
Main.popModal(this._entry);
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,