From 47af454115dc204e7e04e89081f01034aa292ae3 Mon Sep 17 00:00:00 2001 From: Sander Dijkhuis Date: Tue, 11 Aug 2009 13:46:10 +0200 Subject: [PATCH] Bug 591437 - Rename overlay.js to overview.js Replace 'overlay' with the more descriptive name 'overview' where the Activities Overview is meant. Call it Overview (capitalized) in code comments. The overlay-group and overlay-key provided by Mutter are not affected, since they may be used for other components than the Activities Overview. --- js/ui/Makefile.am | 2 +- js/ui/appDisplay.js | 6 +- js/ui/chrome.js | 48 +++++------ js/ui/dash.js | 8 +- js/ui/docDisplay.js | 4 +- js/ui/genericDisplay.js | 4 +- js/ui/main.js | 12 +-- js/ui/{overlay.js => overview.js} | 42 ++++----- js/ui/panel.js | 22 ++--- js/ui/places.js | 8 +- js/ui/windowManager.js | 2 +- js/ui/workspaces.js | 138 +++++++++++++++--------------- 12 files changed, 148 insertions(+), 148 deletions(-) rename js/ui/{overlay.js => overview.js} (91%) diff --git a/js/ui/Makefile.am b/js/ui/Makefile.am index f4a575057..b9185668a 100644 --- a/js/ui/Makefile.am +++ b/js/ui/Makefile.am @@ -12,7 +12,7 @@ dist_jsui_DATA = \ link.js \ lookingGlass.js \ main.js \ - overlay.js \ + overview.js \ panel.js \ places.js \ runDialog.js \ diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 96911bcc5..a1e5f6f7a 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -198,7 +198,7 @@ AppDisplay.prototype = { })); // Load the apps now so it doesn't slow down the first - // transition into the overlay + // transition into the Overview this._refreshCache(); this._focusInMenus = true; @@ -517,7 +517,7 @@ WellDisplayItem.prototype = { /* Pick the first window and activate it; * In the future, we want to have a menu dropdown here. */ let first = this._windows[0]; - Main.overlay.activateWindow (first, Clutter.get_current_event_time()); + Main.overview.activateWindow(first, Clutter.get_current_event_time()); } this.emit('activated'); }, @@ -814,7 +814,7 @@ AppWell.prototype = { let app = apps[i]; let display = new WellDisplayItem(app, this.isFavorite); display.connect('activated', Lang.bind(this, function (display) { - Main.overlay.hide(); + Main.overview.hide(); })); this._grid.actor.add_actor(display.actor); } diff --git a/js/ui/chrome.js b/js/ui/chrome.js index b829ed50e..80c62aaf0 100644 --- a/js/ui/chrome.js +++ b/js/ui/chrome.js @@ -9,7 +9,7 @@ const Shell = imports.gi.Shell; const Main = imports.ui.main; // This manages the shell "chrome"; the UI that's visible in the -// normal mode (ie, outside the overlay), that surrounds the main +// normal mode (ie, outside the Overview), that surrounds the main // workspace content. function Chrome() { @@ -23,8 +23,8 @@ Chrome.prototype = { // The group itself has zero size so it doesn't interfere with DND this.actor = new Clutter.Group({ width: 0, height: 0 }); global.stage.add_actor(this.actor); - this.nonOverlayActor = new Clutter.Group(); - this.actor.add_actor(this.nonOverlayActor); + this.nonOverviewActor = new Clutter.Group(); + this.actor.add_actor(this.nonOverviewActor); this._obscuredByFullscreen = false; @@ -37,10 +37,10 @@ Chrome.prototype = { global.screen.connect('notify::n-workspaces', Lang.bind(this, this._queueUpdateRegions)); - Main.overlay.connect('showing', - Lang.bind(this, this._overlayShowing)); - Main.overlay.connect('hidden', - Lang.bind(this, this._overlayHidden)); + Main.overview.connect('showing', + Lang.bind(this, this._overviewShowing)); + Main.overview.connect('hidden', + Lang.bind(this, this._overviewHidden)); this._queueUpdateRegions(); }, @@ -78,27 +78,27 @@ Chrome.prototype = { else if (shapeActor && !this._verifyAncestry(shapeActor, actor)) throw new Error('shapeActor is not a descendent of actor'); - this.nonOverlayActor.add_actor(actor); + this.nonOverviewActor.add_actor(actor); if (shapeActor) this._trackActor(shapeActor, true, true); }, - // setVisibleInOverlay: + // setVisibleInOverview: // @actor: an actor in the chrome layer - // @visible: overlay visibility + // @visible: Overview visibility // // By default, actors in the chrome layer are automatically hidden - // when the overlay is shown. This can be used to override that + // when the Overview is shown. This can be used to override that // behavior - setVisibleInOverlay: function(actor, visible) { + setVisibleInOverview: function(actor, visible) { if (!this._verifyAncestry(actor, this.actor)) throw new Error('actor is not a descendent of the chrome layer'); if (visible) actor.reparent(this.actor); else - actor.reparent(this.nonOverlayActor); + actor.reparent(this.nonOverviewActor); }, // addInputRegionActor: @@ -126,8 +126,8 @@ Chrome.prototype = { // // Removes @actor from the chrome layer removeActor: function(actor) { - if (actor.get_parent() == this.nonOverlayActor) - this.nonOverlayActor.remove_actor(actor); + if (actor.get_parent() == this.nonOverviewActor) + this.nonOverviewActor.remove_actor(actor); else this.actor.remove_actor(actor); this._untrackActor(actor, true, true); @@ -172,7 +172,7 @@ Chrome.prototype = { this._trackedActors.push(actorData); actor = actor.get_parent(); - if (actor != this.actor && actor != this.nonOverlayActor) + if (actor != this.actor && actor != this.nonOverviewActor) this._trackActor(actor, false, false); if (inputRegion || strut) @@ -200,7 +200,7 @@ Chrome.prototype = { actor.disconnect(actorData.parentSetId); actor = actor.get_parent(); - if (actor && actor != this.actor && actor != this.nonOverlayActor) + if (actor && actor != this.actor && actor != this.nonOverviewActor) this._untrackActor(actor, false, false); } @@ -211,23 +211,23 @@ Chrome.prototype = { _actorReparented: function(actor, oldParent) { if (this._verifyAncestry(actor, this.actor)) { let newParent = actor.get_parent(); - if (newParent != this.actor && newParent != this.nonOverlayActor) + if (newParent != this.actor && newParent != this.nonOverviewActor) this._trackActor(newParent, false, false); } - if (oldParent != this.actor && oldParent != this.nonOverlayActor) + if (oldParent != this.actor && oldParent != this.nonOverviewActor) this._untrackActor(oldParent, false, false); }, - _overlayShowing: function() { + _overviewShowing: function() { this.actor.show(); - this.nonOverlayActor.hide(); + this.nonOverviewActor.hide(); this._queueUpdateRegions(); }, - _overlayHidden: function() { + _overviewHidden: function() { if (this._obscuredByFullscreen) this.actor.hide(); - this.nonOverlayActor.show(); + this.nonOverviewActor.show(); this._queueUpdateRegions(); }, @@ -272,7 +272,7 @@ Chrome.prototype = { break; } - let shouldBeVisible = !this._obscuredByFullscreen || Main.overlay.visible; + let shouldBeVisible = !this._obscuredByFullscreen || Main.overview.visible; if (this.actor.visible != shouldBeVisible) { this.actor.visible = shouldBeVisible; this._queueUpdateRegions(); diff --git a/js/ui/dash.js b/js/ui/dash.js index 65e00c71e..c5d8030a6 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -389,9 +389,9 @@ Dash.prototype = { // Next, if we're in one of the "more" modes or showing the details pane, close them else if (this._activePane != null) this._activePane.close(); - // Finally, just close the overlay entirely + // Finally, just close the Overview entirely else - Main.overlay.hide(); + Main.overview.hide(); return true; } else if (symbol == Clutter.Up) { if (!this._searchActive) @@ -489,7 +489,7 @@ Dash.prototype = { }, hide: function() { - this._firstSelectAfterOverlayShow = true; + this._firstSelectAfterOverviewShow = true; if (this._searchEntry.entry.text != '') this._searchEntry.entry.text = ''; if (this._activePane != null) @@ -512,7 +512,7 @@ Dash.prototype = { this._activePane = null; } })); - Main.overlay.addPane(pane); + Main.overview.addPane(pane); } }; Signals.addSignalMethods(Dash.prototype); diff --git a/js/ui/docDisplay.js b/js/ui/docDisplay.js index 6f1dd4d97..a1cc71ccb 100644 --- a/js/ui/docDisplay.js +++ b/js/ui/docDisplay.js @@ -114,7 +114,7 @@ DocDisplay.prototype = { this._docsStale = true; this._docManager.connect('changed', function(mgr, userData) { me._docsStale = true; - // Changes in local recent files should not happen when we are in the overlay mode, + // Changes in local recent files should not happen when we are in the Overview mode, // but redisplaying right away is cool when we use Zephyr. // Also, we might be displaying remote documents, like Google Docs, in the future // which might be edited by someone else. @@ -148,7 +148,7 @@ DocDisplay.prototype = { // we should do the sorting manually because we want the order to be based on last visited. // // This function is called each time the search string is set back to '' or we display - // the overlay, so we are doing the sorting over the same items multiple times if the list + // the Overview, so we are doing the sorting over the same items multiple times if the list // of recent items didn't change. We could store an additional array of doc ids and sort // them once when they are returned by this._recentManager.get_items() to avoid having to do // this sorting each time, but the sorting seems to be very fast anyway, so there is no need diff --git a/js/ui/genericDisplay.js b/js/ui/genericDisplay.js index feb94d378..3dbc4e92f 100644 --- a/js/ui/genericDisplay.js +++ b/js/ui/genericDisplay.js @@ -380,13 +380,13 @@ GenericDisplay.prototype = { this._redisplay(true); }, - // Launches the item that is currently selected, closing the overlay + // Launches the item that is currently selected, closing the Overview activateSelected: function() { if (this._selectedIndex != -1) { let selected = this._findDisplayedByIndex(this._selectedIndex); selected.launch(); this.unsetSelected(); - Main.overlay.hide(); + Main.overview.hide(); } }, diff --git a/js/ui/main.js b/js/ui/main.js index 4e2000736..f9b486631 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -10,7 +10,7 @@ const Shell = imports.gi.Shell; const Signals = imports.signals; const Chrome = imports.ui.chrome; -const Overlay = imports.ui.overlay; +const Overview = imports.ui.overview; const Panel = imports.ui.panel; const RunDialog = imports.ui.runDialog; const LookingGlass = imports.ui.lookingGlass; @@ -24,7 +24,7 @@ DEFAULT_BACKGROUND_COLOR.from_pixel(0x2266bbff); let chrome = null; let panel = null; let sidebar = null; -let overlay = null; +let overview = null; let runDialog = null; let lookingGlass = null; let wm = null; @@ -46,7 +46,7 @@ function start() { global.stage.color = DEFAULT_BACKGROUND_COLOR; // Mutter currently hardcodes putting "Yessir. The compositor is running"" - // in the overlay. Clear that out. + // in the Overview. Clear that out. let children = global.overlay_group.get_children(); for (let i = 0; i < children.length; i++) children[i].destroy(); @@ -59,7 +59,7 @@ function start() { runDialog.open(); }); - overlay = new Overlay.Overlay(); + overview = new Overview.Overview(); chrome = new Chrome.Chrome(); panel = new Panel.Panel(); sidebar = new Sidebar.Sidebar(); @@ -80,8 +80,8 @@ function start() { panel.startupAnimation(); let display = global.screen.get_display(); - display.connect('overlay-key', Lang.bind(overlay, overlay.toggle)); - global.connect('panel-main-menu', Lang.bind(overlay, overlay.toggle)); + display.connect('overlay-key', Lang.bind(overview, overview.toggle)); + global.connect('panel-main-menu', Lang.bind(overview, overview.toggle)); Mainloop.idle_add(_removeUnusedWorkspaces); } diff --git a/js/ui/overlay.js b/js/ui/overview.js similarity index 91% rename from js/ui/overlay.js rename to js/ui/overview.js index f195c90df..c91f6dd2f 100644 --- a/js/ui/overlay.js +++ b/js/ui/overview.js @@ -19,14 +19,14 @@ const Dash = imports.ui.dash; const Tweener = imports.ui.tweener; const Workspaces = imports.ui.workspaces; -const ROOT_OVERLAY_COLOR = new Clutter.Color(); -ROOT_OVERLAY_COLOR.from_pixel(0x000000ff); +const ROOT_OVERVIEW_COLOR = new Clutter.Color(); +ROOT_OVERVIEW_COLOR.from_pixel(0x000000ff); -// Time for initial animation going into overlay mode +// Time for initial animation going into Overview mode const ANIMATION_TIME = 0.25; // We divide the screen into a grid of rows and columns, which we use -// to help us position the overlay components, such as the side panel +// to help us position the Overview components, such as the side panel // that lists applications and documents, the workspaces display, and // the button for adding additional workspaces. // In the regular mode, the side panel takes up one column on the left, @@ -74,11 +74,11 @@ let wideScreen = false; let displayGridColumnWidth = null; let displayGridRowHeight = null; -function Overlay() { +function Overview() { this._init(); } -Overlay.prototype = { +Overview.prototype = { _init : function() { let me = this; @@ -101,8 +101,8 @@ Overlay.prototype = { reactive: true }); this._group.add_actor(this._transparentBackground); - // Background color for the overlay - this._backOver = new Clutter.Rectangle({ color: ROOT_OVERLAY_COLOR }); + // Background color for the Overview + this._backOver = new Clutter.Rectangle({ color: ROOT_OVERVIEW_COLOR }); this._group.add_actor(this._backOver); this._group.hide(); @@ -203,7 +203,7 @@ Overlay.prototype = { //// Draggable target interface //// // Closes any active panes if a GenericDisplayItem is being - // dragged over the overlay, i.e. as soon as it starts being dragged. + // dragged over the Overview, i.e. as soon as it starts being dragged. // This allows the user to place the item on any workspace. handleDragOver : function(source, actor, x, y, time) { if (source instanceof GenericDisplay.GenericDisplayItem @@ -218,13 +218,13 @@ Overlay.prototype = { //// Public methods //// - // Returns the scale the overlay has when we just start zooming out + // Returns the scale the Overview has when we just start zooming out // to overview mode. That is, when just the active workspace is showing. getZoomedInScale : function() { return 1 / this._workspaces.getScale(); }, - // Returns the position the overlay has when we just start zooming out + // Returns the position the Overview has when we just start zooming out // to overview mode. That is, when just the active workspace is showing. getZoomedInPosition : function() { let [posX, posY] = this._workspaces.getActiveWorkspacePosition(); @@ -233,12 +233,12 @@ Overlay.prototype = { return [- posX * scale, - posY * scale]; }, - // Returns the current scale of the overlay. + // Returns the current scale of the Overview. getScale : function() { return this._group.scaleX; }, - // Returns the current position of the overlay. + // Returns the current position of the Overview. getPosition : function() { return [this._group.x, this._group.y]; }, @@ -278,16 +278,16 @@ Overlay.prototype = { this._group.add_actor(this._workspaces.actor); // All the the actors in the window group are completely obscured, - // hiding the group holding them while the overlay is displayed greatly - // increases performance of the overlay especially when there are many + // hiding the group holding them while the Overview is displayed greatly + // increases performance of the Overview especially when there are many // windows visible. // - // If we switched to displaying the actors in the overlay rather than + // If we switched to displaying the actors in the Overview rather than // clones of them, this would obviously no longer be necessary. global.window_group.hide(); this._group.show(); - // Create a zoom out effect. First scale the overlay group up and + // Create a zoom out effect. First scale the Overview group up and // position it so that the active workspace fills up the whole screen, // then transform the group to its normal dimensions and position. // The opposite transition is used in hide(). @@ -327,7 +327,7 @@ Overlay.prototype = { this._activeDisplayPane.close(); this._workspaces.hide(); - // Create a zoom in effect by transforming the overlay group so that + // Create a zoom in effect by transforming the Overview group so that // the active workspace fills up the whole screen. The opposite // transition is used in show(). let scale = this.getZoomedInScale(); @@ -367,11 +367,11 @@ Overlay.prototype = { * * Make the given MetaWindow be the focus window, switching * to the workspace it's on if necessary. This function - * should only be used when the overlay is currently active; + * should only be used when the Overview is currently active; * outside of that, use the relevant methods on MetaDisplay. */ activateWindow: function (metaWindow, time) { - this._workspaces.activateWindowFromOverlay(metaWindow, time); + this._workspaces.activateWindowFromOverview(metaWindow, time); this.hide(); }, @@ -405,4 +405,4 @@ Overlay.prototype = { this.emit('hidden'); } }; -Signals.addSignalMethods(Overlay.prototype); +Signals.addSignalMethods(Overview.prototype); diff --git a/js/ui/panel.js b/js/ui/panel.js index 13d532052..4a657339b 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -164,22 +164,22 @@ Panel.prototype = { })); this._traymanager.manage_stage(global.stage); - // TODO: decide what to do with the rest of the panel in the overlay mode (make it fade-out, become non-reactive, etc.) - // We get into the overlay mode on button-press-event as opposed to button-release-event because eventually we'll probably - // have the overlay act like a menu that allows the user to release the mouse on the activity the user wants + // TODO: decide what to do with the rest of the panel in the Overview mode (make it fade-out, become non-reactive, etc.) + // We get into the Overview mode on button-press-event as opposed to button-release-event because eventually we'll probably + // have the Overview act like a menu that allows the user to release the mouse on the activity the user wants // to switch to. this.button.button.connect('button-press-event', - Lang.bind(Main.overlay, Main.overlay.toggle)); - // In addition to pressing the button, the overlay can be entered and exited by other means, such as - // pressing the System key, Alt+F1 or Esc. We want the button to be pressed in when the overlay is entered + Lang.bind(Main.overview, Main.overview.toggle)); + // In addition to pressing the button, the Overview can be entered and exited by other means, such as + // pressing the System key, Alt+F1 or Esc. We want the button to be pressed in when the Overview is entered // and to be released when it is exited regardless of how it was triggered. - Main.overlay.connect('showing', Lang.bind(this.button, this.button.pressIn)); - Main.overlay.connect('hiding', Lang.bind(this.button, this.button.release)); + Main.overview.connect('showing', Lang.bind(this.button, this.button.pressIn)); + Main.overview.connect('hiding', Lang.bind(this.button, this.button.release)); this.actor.add_actor(box); Main.chrome.addActor(this.actor, box); - Main.chrome.setVisibleInOverlay(this.actor, true); + Main.chrome.setVisibleInOverview(this.actor, true); // Start the clock this._updateClock(); @@ -219,8 +219,8 @@ Panel.prototype = { }, _onHotCornerTriggered : function() { - if (!Main.overlay.animationInProgress) { - Main.overlay.toggle(); + if (!Main.overview.animationInProgress) { + Main.overview.toggle(); } return false; } diff --git a/js/ui/places.js b/js/ui/places.js index 0c64e9028..b11c97a17 100644 --- a/js/ui/places.js +++ b/js/ui/places.js @@ -59,7 +59,7 @@ Places.prototype = { let homeIcon = Shell.util_get_icon_for_uri (homeUri); let homeTexture = Shell.TextureCache.get_default().load_gicon(homeIcon, PLACES_ICON_SIZE); let home = new PlaceDisplay(homeLabel, homeTexture, Lang.bind(this, function() { - Main.overlay.hide(); + Main.overview.hide(); Gio.app_info_launch_default_for_uri(homeUri, Main.createAppLaunchContext()); })); @@ -79,7 +79,7 @@ Places.prototype = { if (networkApp != null) { let networkIcon = networkApp.create_icon_texture(PLACES_ICON_SIZE); let network = new PlaceDisplay(networkApp.get_name(), networkIcon, Lang.bind(this, function () { - Main.overlay.hide(); + Main.overview.hide(); networkApp.launch(); })); this._menuBox.append(network.actor, Big.BoxPackFlags.NONE); @@ -87,7 +87,7 @@ Places.prototype = { let connectIcon = Shell.TextureCache.get_default().load_icon_name("applications-internet", PLACES_ICON_SIZE); let connect = new PlaceDisplay('Connect to...', connectIcon, Lang.bind(this, function () { - Main.overlay.hide(); + Main.overview.hide(); new Shell.Process({ args: ['nautilus-connect-server'] }).run(); })); this._menuBox.append(connect.actor, Big.BoxPackFlags.NONE); @@ -149,7 +149,7 @@ Places.prototype = { let icon = Shell.util_get_icon_for_uri(bookmark); let iconTexture = Shell.TextureCache.get_default().load_gicon(icon, PLACES_ICON_SIZE); let item = new PlaceDisplay(label, iconTexture, Lang.bind(this, function() { - Main.overlay.hide(); + Main.overview.hide(); Gio.app_info_launch_default_for_uri(bookmark, Main.createAppLaunchContext()); })); this._dirsBox.append(item.actor, Big.BoxPackFlags.NONE); diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 18f394b75..946d9a31d 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -85,7 +85,7 @@ WindowManager.prototype = { }, _shouldAnimate : function(actor) { - if (Main.overlay.visible) + if (Main.overview.visible) return false; if (actor && (actor.get_window_type() != Meta.CompWindowType.NORMAL)) return false; diff --git a/js/ui/workspaces.js b/js/ui/workspaces.js index 80ad99303..e1c6aba52 100644 --- a/js/ui/workspaces.js +++ b/js/ui/workspaces.js @@ -15,7 +15,7 @@ const AppDisplay = imports.ui.appDisplay; const DND = imports.ui.dnd; const GenericDisplay = imports.ui.genericDisplay; const Main = imports.ui.main; -const Overlay = imports.ui.overlay; +const Overview = imports.ui.overview; const Panel = imports.ui.panel; const Tweener = imports.ui.tweener; @@ -293,16 +293,16 @@ Workspace.prototype = { Lang.bind(this, function(clone, time) { this._metaWorkspace.activate(time); - Main.overlay.hide(); + Main.overview.hide(); })); this.actor.add_actor(this._desktop.actor); // Create clones for remaining windows that should be - // visible in the overlay + // visible in the Overview this._windows = [this._desktop]; this._windowIcons = [ null ]; for (let i = 0; i < windows.length; i++) { - if (this._isOverlayWindow(windows[i])) { + if (this._isOverviewWindow(windows[i])) { this._addWindowClone(windows[i]); } } @@ -318,7 +318,7 @@ Workspace.prototype = { this._frame = null; - this.leavingOverlay = false; + this.leavingOverview = false; }, updateRemovable : function() { @@ -346,7 +346,7 @@ Workspace.prototype = { this._removeButton.set_opacity(0); Tweener.addTween(this._removeButton, { opacity: 255, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, transition: "easeOutQuad" }); } @@ -357,7 +357,7 @@ Workspace.prototype = { if (this._visible) { Tweener.addTween(this._removeButton, { opacity: 0, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, transition: "easeOutQuad", onComplete: this._removeRemoveButton, onCompleteScope: this @@ -428,7 +428,7 @@ Workspace.prototype = { this._desktop.actor.height + 2 * FRAME_SIZE / this.actor.scale_y); }, - // Reposition all windows in their zoomed-to-overlay position. if workspaceZooming + // Reposition all windows in their zoomed-to-Overview position. if workspaceZooming // is true, then the workspace is moving at the same time and we need to take // that into account positionWindows : function(workspaceZooming) { @@ -460,7 +460,7 @@ Workspace.prototype = { scale_x: scale, scale_y: scale, workspace_relative: workspaceZooming ? this : null, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, transition: "easeOutQuad", onComplete: Lang.bind(this, function() { this._fadeInWindowIcon(clone, icon); @@ -494,7 +494,7 @@ Workspace.prototype = { icon.raise(this.actor); Tweener.addTween(icon, { opacity: 255, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, transition: "easeOutQuad" }); }, @@ -531,14 +531,14 @@ Workspace.prototype = { // If metaWin.get_compositor_private() returned non-NULL, that // means the window still exists (and is just being moved to - // another workspace or something), so set its overlayHint + // another workspace or something), so set its overviewHint // accordingly. (If it returned NULL, then the window is being // destroyed; we'd like to animate this, but it's too late at // this point.) if (win) { let [stageX, stageY] = clone.actor.get_transformed_position(); let [stageWidth, stageHeight] = clone.actor.get_transformed_size(); - win._overlayHint = { + win._overviewHint = { x: stageX, y: stageY, scale: stageWidth / clone.actor.width @@ -552,7 +552,7 @@ Workspace.prototype = { }, _windowAdded : function(metaWorkspace, metaWin) { - if (this.leavingOverlay) + if (this.leavingOverview) return; let win = metaWin.get_compositor_private(); @@ -569,16 +569,16 @@ Workspace.prototype = { return; } - if (!this._isOverlayWindow(win)) + if (!this._isOverviewWindow(win)) return; let clone = this._addWindowClone(win); - if (win._overlayHint) { - let x = (win._overlayHint.x - this.actor.x) / this.scale; - let y = (win._overlayHint.y - this.actor.y) / this.scale; - let scale = win._overlayHint.scale / this.scale; - delete win._overlayHint; + if (win._overviewHint) { + let x = (win._overviewHint.x - this.actor.x) / this.scale; + let y = (win._overviewHint.y - this.actor.y) / this.scale; + let scale = win._overviewHint.scale / this.scale; + delete win._overviewHint; clone.actor.set_position (x, y); clone.actor.set_scale (scale, scale); @@ -588,8 +588,8 @@ Workspace.prototype = { this.updateRemovable(); }, - // Animate the full-screen to overlay transition. - zoomToOverlay : function() { + // Animate the full-screen to Overview transition. + zoomToOverview : function() { this.actor.set_position(this.gridX, this.gridY); this.actor.set_scale(this.scale, this.scale); @@ -603,7 +603,7 @@ Workspace.prototype = { this._removeButton.opacity = 0; Tweener.addTween(this._removeButton, { opacity: 255, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, transition: 'easeOutQuad' }); } @@ -611,14 +611,14 @@ Workspace.prototype = { this._visible = true; }, - // Animates the return from overlay mode - zoomFromOverlay : function() { - this.leavingOverlay = true; + // Animates the return from Overview mode + zoomFromOverview : function() { + this.leavingOverview = true; this._hideAllIcons(); - Main.overlay.connect('hidden', Lang.bind(this, - this._doneLeavingOverlay)); + Main.overview.connect('hidden', Lang.bind(this, + this._doneLeavingOverview)); // Fade out the remove button if available, so that it doesn't // disappear too abrubtly and doesn't become too big. @@ -626,7 +626,7 @@ Workspace.prototype = { Tweener.removeTweens(this._removeButton); Tweener.addTween(this._removeButton, { opacity: 0, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, transition: 'easeOutQuad' }); } @@ -640,7 +640,7 @@ Workspace.prototype = { scale_x: 1.0, scale_y: 1.0, workspace_relative: this, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, opacity: 255, transition: "easeOutQuad" }); @@ -658,7 +658,7 @@ Workspace.prototype = { y: this.gridY, scale_x: this.scale, scale_y: this.scale, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, transition: "easeOutQuad", onComplete: Lang.bind(this, this._fadeInAllIcons) }); @@ -680,7 +680,7 @@ Workspace.prototype = { y: this.gridY, scale_x: this.scale, scale_y: this.scale, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, transition: "easeOutQuad" }); @@ -703,7 +703,7 @@ Workspace.prototype = { y: destY, scale_x: this.scale, scale_y: this.scale, - time: Overlay.ANIMATION_TIME, + time: Overview.ANIMATION_TIME, transition: "easeOutQuad", onComplete: onComplete }); @@ -726,9 +726,9 @@ Workspace.prototype = { this._metaWorkspace.disconnect(this._windowRemovedId); }, - // Sets this.leavingOverlay flag to false. - _doneLeavingOverlay : function() { - this.leavingOverlay = false; + // Sets this.leavingOverview flag to false. + _doneLeavingOverview : function() { + this.leavingOverview = false; }, // Tests if @win belongs to this workspaces @@ -737,8 +737,8 @@ Workspace.prototype = { (win.get_meta_window() && win.get_meta_window().is_on_all_workspaces()); }, - // Tests if @win should be shown in the overlay - _isOverlayWindow : function (win) { + // Tests if @win should be shown in the Overview + _isOverviewWindow : function (win) { let wintype = win.get_window_type(); if (wintype == Meta.WindowType.DESKTOP || wintype == Meta.WindowType.DOCK) @@ -813,7 +813,7 @@ Workspace.prototype = { }, _onCloneSelected : function (clone, time) { - Main.overlay.activateWindow(clone.metaWindow, time); + Main.overview.activateWindow(clone.metaWindow, time); }, _removeSelf : function(actor, event) { @@ -836,7 +836,7 @@ Workspace.prototype = { // Set a hint on the Mutter.Window so its initial position // in the new workspace will be correct - win._overlayHint = { + win._overviewHint = { x: actor.x, y: actor.y, scale: actor.scale_x @@ -911,11 +911,11 @@ Workspaces.prototype = { // Position/scale the desktop windows and their children after the // workspaces have been created. This cannot be done first because // window movement depends on the Workspaces object being accessible - // as an Overlay member. - Main.overlay.connect('showing', + // as an Overview member. + Main.overview.connect('showing', Lang.bind(this, function() { for (let w = 0; w < this._workspaces.length; w++) - this._workspaces[w].zoomToOverlay(); + this._workspaces[w].zoomToOverview(); })); // Track changes to the number of workspaces @@ -936,8 +936,8 @@ Workspaces.prototype = { return null; }, - // Should only be called from active overlay context - activateWindowFromOverlay: function (metaWindow, time) { + // Should only be called from active Overview context + activateWindowFromOverview: function (metaWindow, time) { let global = Shell.Global.get(); let activeWorkspaceNum = global.screen.get_active_workspace_index(); let windowWorkspaceNum = metaWindow.get_workspace().index(); @@ -962,7 +962,7 @@ Workspaces.prototype = { activeWorkspace.actor.raise_top(); for (let w = 0; w < this._workspaces.length; w++) - this._workspaces[w].zoomFromOverlay(); + this._workspaces[w].zoomFromOverview(); }, destroy : function() { @@ -1138,49 +1138,49 @@ Workspaces.prototype = { Tweener.registerSpecialPropertyModifier("workspace_relative", _workspaceRelativeModifier, _workspaceRelativeGet); function _workspaceRelativeModifier(workspace) { - let [startX, startY] = Main.overlay.getPosition(); - let overlayPosX, overlayPosY, overlayScale; + let [startX, startY] = Main.overview.getPosition(); + let overviewPosX, overviewPosY, overviewScale; if (!workspace) return []; - if (workspace.leavingOverlay) { - let [zoomedInX, zoomedInY] = Main.overlay.getZoomedInPosition(); - overlayPosX = { begin: startX, end: zoomedInX }; - overlayPosY = { begin: startY, end: zoomedInY }; - overlayScale = { begin: Main.overlay.getScale(), - end: Main.overlay.getZoomedInScale() }; + if (workspace.leavingOverview) { + let [zoomedInX, zoomedInY] = Main.overview.getZoomedInPosition(); + overviewPosX = { begin: startX, end: zoomedInX }; + overviewPosY = { begin: startY, end: zoomedInY }; + overviewScale = { begin: Main.overview.getScale(), + end: Main.overview.getZoomedInScale() }; } else { - overlayPosX = { begin: startX, end: 0 }; - overlayPosY = { begin: startY, end: 0 }; - overlayScale = { begin: Main.overlay.getScale(), end: 1 }; + overviewPosX = { begin: startX, end: 0 }; + overviewPosY = { begin: startY, end: 0 }; + overviewScale = { begin: Main.overview.getScale(), end: 1 }; } return [ { name: "x", parameters: { workspacePos: workspace.gridX, - overlayPos: overlayPosX, - overlayScale: overlayScale } }, + overviewPos: overviewPosX, + overviewScale: overviewScale } }, { name: "y", parameters: { workspacePos: workspace.gridY, - overlayPos: overlayPosY, - overlayScale: overlayScale } } + overviewPos: overviewPosY, + overviewScale: overviewScale } } ]; } function _workspaceRelativeGet(begin, end, time, params) { - let curOverlayPos = (1 - time) * params.overlayPos.begin + - time * params.overlayPos.end; - let curOverlayScale = (1 - time) * params.overlayScale.begin + - time * params.overlayScale.end; + let curOverviewPos = (1 - time) * params.overviewPos.begin + + time * params.overviewPos.end; + let curOverviewScale = (1 - time) * params.overviewScale.begin + + time * params.overviewScale.end; // Calculate the screen position of the window. let screen = (1 - time) * - ((begin + params.workspacePos) * params.overlayScale.begin + - params.overlayPos.begin) + + ((begin + params.workspacePos) * params.overviewScale.begin + + params.overviewPos.begin) + time * - ((end + params.workspacePos) * params.overlayScale.end + - params.overlayPos.end); + ((end + params.workspacePos) * params.overviewScale.end + + params.overviewPos.end); // Return the workspace coordinates. - return (screen - curOverlayPos) / curOverlayScale - params.workspacePos; + return (screen - curOverviewPos) / curOverviewScale - params.workspacePos; }