altTab: Rename List* classes to Switcher*

Calling those classes ThumbnailSwitcher and WindowSwitcher makes more
sense since we are using this naming scheme for all classes extending
SwitcherPopup.SwitcherList.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/168
This commit is contained in:
Jonas Dreßler 2018-05-05 15:32:16 +02:00 committed by Florian Müllner
parent b3770fd923
commit 79ccf1a0b5

View File

@ -248,20 +248,20 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
this._select(n); this._select(n);
} }
_windowActivated(thumbnailList, n) { _windowActivated(thumbnailSwitcher, n) {
let appIcon = this._items[this._selectedIndex]; let appIcon = this._items[this._selectedIndex];
Main.activateWindow(appIcon.cachedWindows[n]); Main.activateWindow(appIcon.cachedWindows[n]);
this.fadeAndDestroy(); this.fadeAndDestroy();
} }
_windowEntered(thumbnailList, n) { _windowEntered(thumbnailSwitcher, n) {
if (!this.mouseActive) if (!this.mouseActive)
return; return;
this._select(this._selectedIndex, n); this._select(this._selectedIndex, n);
} }
_windowRemoved(thumbnailList, n) { _windowRemoved(thumbnailSwitcher, n) {
let appIcon = this._items[this._selectedIndex]; let appIcon = this._items[this._selectedIndex];
if (!appIcon) if (!appIcon)
return; return;
@ -373,7 +373,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
} }
_createThumbnails() { _createThumbnails() {
this._thumbnails = new ThumbnailList(this._items[this._selectedIndex].cachedWindows); this._thumbnails = new ThumbnailSwitcher(this._items[this._selectedIndex].cachedWindows);
this._thumbnails.connect('item-activated', this._windowActivated.bind(this)); this._thumbnails.connect('item-activated', this._windowActivated.bind(this));
this._thumbnails.connect('item-entered', this._windowEntered.bind(this)); this._thumbnails.connect('item-entered', this._windowEntered.bind(this));
this._thumbnails.connect('item-removed', this._windowRemoved.bind(this)); this._thumbnails.connect('item-removed', this._windowRemoved.bind(this));
@ -563,7 +563,7 @@ class WindowSwitcherPopup extends SwitcherPopup.SwitcherPopup {
return; return;
let mode = this._settings.get_enum('app-icon-mode'); let mode = this._settings.get_enum('app-icon-mode');
this._switcherList = new WindowList(windows, mode); this._switcherList = new WindowSwitcher(windows, mode);
this._items = this._switcherList.icons; this._items = this._switcherList.icons;
} }
@ -811,7 +811,7 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
} }
// We override SwitcherList's highlight() method to also deal with // We override SwitcherList's highlight() method to also deal with
// the AppSwitcher->ThumbnailList arrows. Apps with only 1 window // the AppSwitcher->ThumbnailSwitcher arrows. Apps with only 1 window
// will hide their arrows by default, but show them when their // will hide their arrows by default, but show them when their
// thumbnails are visible (ie, when the app icon is supposed to be // thumbnails are visible (ie, when the app icon is supposed to be
// in justOutline mode). Apps with multiple windows will normally // in justOutline mode). Apps with multiple windows will normally
@ -868,8 +868,8 @@ class AppSwitcher extends SwitcherPopup.SwitcherList {
} }
}); });
var ThumbnailList = GObject.registerClass( var ThumbnailSwitcher = GObject.registerClass(
class ThumbnailList extends SwitcherPopup.SwitcherList { class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
_init(windows) { _init(windows) {
super._init(false); super._init(false);
@ -1022,8 +1022,8 @@ class WindowIcon extends St.BoxLayout {
} }
}); });
var WindowList = GObject.registerClass( var WindowSwitcher = GObject.registerClass(
class WindowList extends SwitcherPopup.SwitcherList { class WindowSwitcher extends SwitcherPopup.SwitcherList {
_init(windows, mode) { _init(windows, mode) {
super._init(true); super._init(true);