appDisplay: Move child focus handling to IconGrid
The icon grid is always paginated, so the app grid code doesn't need to behave differently in the FolderView and AppDisplay. Move the keyboard handling to IconGrid itself, and remove the now dead code from AppDisplay. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
This commit is contained in:
@ -121,9 +121,6 @@ var BaseAppView = GObject.registerClass({
|
||||
super._init(params);
|
||||
|
||||
this._grid = new IconGrid.IconGrid();
|
||||
this._grid.connect('child-focused', (grid, actor) => {
|
||||
this._childFocused(actor);
|
||||
});
|
||||
// Standard hack for ClutterBinLayout
|
||||
this._grid.x_expand = true;
|
||||
|
||||
@ -141,10 +138,6 @@ var BaseAppView = GObject.registerClass({
|
||||
});
|
||||
}
|
||||
|
||||
_childFocused(_actor) {
|
||||
// Nothing by default
|
||||
}
|
||||
|
||||
_redisplay() {
|
||||
let oldApps = this._orderedItems.slice();
|
||||
let oldAppIds = oldApps.map(icon => icon.id);
|
||||
@ -697,10 +690,6 @@ class AppDisplay extends BaseAppView {
|
||||
});
|
||||
}
|
||||
|
||||
_childFocused(icon) {
|
||||
let itemPage = this._grid.getItemPage(icon);
|
||||
this.goToPage(itemPage);
|
||||
}
|
||||
|
||||
// Called before allocation to calculate dynamic spacing
|
||||
adaptToSize(width, height) {
|
||||
@ -1022,10 +1011,6 @@ class FolderView extends BaseAppView {
|
||||
super.vfunc_allocate(box);
|
||||
}
|
||||
|
||||
_childFocused(actor) {
|
||||
Util.ensureActorVisibleInScrollView(this._scrollView, actor);
|
||||
}
|
||||
|
||||
// Overridden from BaseAppView
|
||||
animate(animationDirection) {
|
||||
this._grid.animatePulse(animationDirection);
|
||||
|
Reference in New Issue
Block a user