[gnome-shell/gbsneto/icon-grid-dnd: 5/13] folderView: Pass and add getter to folder icon
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/icon-grid-dnd: 5/13] folderView: Pass and add getter to folder icon
- Date: Sat, 29 Jun 2019 17:16:37 +0000 (UTC)
commit 3907d01f2cbc9409097ce9afd10505926602b60f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jun 29 00:45:09 2019 -0300
folderView: Pass and add getter to folder icon
We will need to access the folder icon that owns the
view in order to remove apps from folders.
Add a new parameter to the constructor of FolderView,
and the corresponding getter, for the FolderIcon that
owns it.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/603
js/ui/appDisplay.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index ae8293540..a5c7ddde7 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1064,11 +1064,12 @@ var AppSearchProvider = class AppSearchProvider {
};
var FolderView = class FolderView extends BaseAppView {
- constructor() {
+ constructor(folderIcon) {
super(null, null);
// If it not expand, the parent doesn't take into account its preferred_width when allocating
// the second time it allocates, so we apply the "Standard hack for ClutterBinLayout"
this._grid.x_expand = true;
+ this._folderIcon = folderIcon;
this.actor = new St.ScrollView({ overlay_scrollbars: true });
this.actor.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
@@ -1171,6 +1172,10 @@ var FolderView = class FolderView extends BaseAppView {
setPaddingOffsets(offset) {
this._offsetForEachSide = offset;
}
+
+ get folderIcon() {
+ return this._folderIcon;
+ }
};
var FolderIcon = class FolderIcon {
@@ -1196,7 +1201,7 @@ var FolderIcon = class FolderIcon {
this.actor.set_child(this.icon);
this.actor.label_actor = this.icon.label;
- this.view = new FolderView();
+ this.view = new FolderView(this);
Main.overview.connect('item-drag-begin',
this._onDragBegin.bind(this));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]