[gnome-shell/gbsneto/icon-grid-dnd: 11/13] frequentView: Use BaseAppView.addItem() and loadGrid()
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/icon-grid-dnd: 11/13] frequentView: Use BaseAppView.addItem() and loadGrid()
- Date: Sat, 29 Jun 2019 17:17:07 +0000 (UTC)
commit 843f126c92e1cada006ece3ee1cbab8e2cfbb281
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jun 29 13:15:20 2019 -0300
frequentView: Use BaseAppView.addItem() and loadGrid()
FrequentView is another view that is slightly not unified with how
BaseAppView expects subclasses to load app icons. Instead of using
BaseAppView.addItem() and then calling BaseAppview.loadGrid(), it
adds the app icons directly to the icon grid.
Make FrequentView add icons using BaseAppview.addItem(), and load
the icons using BaseAppView.loadGrid().
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/603
js/ui/appDisplay.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index d985631b0..ef8884aab 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -799,8 +799,10 @@ var FrequentView = class FrequentView extends BaseAppView {
continue;
let appIcon = new AppIcon(mostUsed[i], this,
{ isDraggable: favoritesWritable });
- this._grid.addItem(appIcon, -1);
+ this.addItem(appIcon);
}
+
+ this.loadGrid();
}
// Called before allocation to calculate dynamic spacing
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]