From be95ca553a6b3e55b614bb120d226c5e18c319dc Mon Sep 17 00:00:00 2001 From: Siegfried-Angel Gevatter Pujals Date: Thu, 6 Aug 2009 01:54:22 +0200 Subject: [PATCH] Fix indentation issues in altTab.js, plus minor cleanup in some other files. --- js/ui/altTab.js | 24 ++++++++++++------------ js/ui/appDisplay.js | 2 +- js/ui/docDisplay.js | 1 - js/ui/genericDisplay.js | 6 +++--- js/ui/widget.js | 1 - 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/js/ui/altTab.js b/js/ui/altTab.js index f11ea3db1..f8470f198 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -36,9 +36,9 @@ function AltTabPopup() { AltTabPopup.prototype = { _init : function() { - let global = Shell.Global.get(); + let global = Shell.Global.get(); - this.actor = new Big.Box({ background_color : POPUP_BG_COLOR, + this.actor = new Big.Box({ background_color : POPUP_BG_COLOR, corner_radius: POPUP_GRID_SPACING, padding: POPUP_GRID_SPACING, spacing: POPUP_GRID_SPACING, @@ -48,15 +48,15 @@ AltTabPopup.prototype = { // but Tidy.Grid is lame in various ways. (Eg, it seems to // have a minimum size of 200x200.) So we create a vertical // Big.Box containing multiple horizontal Big.Boxes. - this._grid = new Big.Box({ spacing: POPUP_GRID_SPACING, + this._grid = new Big.Box({ spacing: POPUP_GRID_SPACING, orientation: Big.BoxOrientation.VERTICAL }); let gcenterbox = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL, x_align: Big.BoxAlignment.CENTER }); gcenterbox.append(this._grid, Big.BoxPackFlags.NONE); - this.actor.append(gcenterbox, Big.BoxPackFlags.NONE); + this.actor.append(gcenterbox, Big.BoxPackFlags.NONE); // Selected-window label - this._label = new Clutter.Text({ font_name: "Sans 16px", + this._label = new Clutter.Text({ font_name: "Sans 16px", ellipsize: Pango.EllipsizeMode.END }); let labelbox = new Big.Box({ background_color: POPUP_INDICATOR_COLOR, @@ -67,7 +67,7 @@ AltTabPopup.prototype = { x_align: Big.BoxAlignment.CENTER, width: POPUP_LABEL_MAX_WIDTH + POPUP_GRID_SPACING }); lcenterbox.append(labelbox, Big.BoxPackFlags.NONE); - this.actor.append(lcenterbox, Big.BoxPackFlags.NONE); + this.actor.append(lcenterbox, Big.BoxPackFlags.NONE); // Indicator around selected icon this._indicator = new Big.Rectangle({ border_width: POPUP_INDICATOR_WIDTH, @@ -76,10 +76,10 @@ AltTabPopup.prototype = { color: POPUP_TRANSPARENT }); this.actor.append(this._indicator, Big.BoxPackFlags.FIXED); - this._items = []; + this._items = []; this._toplevels = global.window_group.get_children(); - global.stage.add_actor(this.actor); + global.stage.add_actor(this.actor); // Dark translucent window used to cover all but the // currently-selected window while Alt-Tabbing. Actually @@ -142,7 +142,7 @@ AltTabPopup.prototype = { }, show : function(initialSelection) { - let global = Shell.Global.get(); + let global = Shell.Global.get(); Main.startModal(); @@ -154,7 +154,7 @@ AltTabPopup.prototype = { time: SHOW_TIME, transition: "easeOutQuad" }); - this.actor.show_all(); + this.actor.show_all(); this.actor.x = Math.floor((global.screen_width - this.actor.width) / 2); this.actor.y = Math.floor((global.screen_height - this.actor.height) / 2); @@ -162,7 +162,7 @@ AltTabPopup.prototype = { }, destroy : function() { - this.actor.destroy(); + this.actor.destroy(); this._overlay.destroy(); Main.endModal(); @@ -240,7 +240,7 @@ AltTabPopup.prototype = { }, _adjust_overlay : function() { - let global = Shell.Global.get(); + let global = Shell.Global.get(); if (this._selected && this._selected.icon_rect) { // We want to highlight a specific rectangle within the diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index e5437bd65..a3cf04503 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -424,7 +424,7 @@ AppDisplay.prototype = { if (category.indexOf(search) >= 0) return true; } - + return false; }, diff --git a/js/ui/docDisplay.js b/js/ui/docDisplay.js index fa9ad3c1e..6f1dd4d97 100644 --- a/js/ui/docDisplay.js +++ b/js/ui/docDisplay.js @@ -131,7 +131,6 @@ DocDisplay.prototype = { // Gets the list of recent items from the recent items manager. _refreshCache : function() { - let me = this; if (!this._docsStale) return; this._allItems = this._docManager.getItems(); diff --git a/js/ui/genericDisplay.js b/js/ui/genericDisplay.js index 2f4a9e41b..ba26cb377 100644 --- a/js/ui/genericDisplay.js +++ b/js/ui/genericDisplay.js @@ -233,13 +233,13 @@ GenericDisplayItem.prototype = { return details; }, - // Destoys the item. + // Destroys the item. destroy: function() { this.actor.destroy(); }, - + //// Pure virtual public methods //// - + // Performes an action associated with launching this item, such as opening a file or an application. launch: function() { throw new Error("Not implemented"); diff --git a/js/ui/widget.js b/js/ui/widget.js index e5006d18a..b3326576a 100644 --- a/js/ui/widget.js +++ b/js/ui/widget.js @@ -10,7 +10,6 @@ const Pango = imports.gi.Pango; const Shell = imports.gi.Shell; const Signals = imports.signals; -const DocDisplay = imports.ui.docDisplay; const DocInfo = imports.misc.docInfo; const COLLAPSED_WIDTH = 24;