[gnome-shell/gbsneto/icon-grid-dnd: 7/35] 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: 7/35] folderView: Pass and add getter to folder icon
- Date: Thu, 4 Jul 2019 19:57:31 +0000 (UTC)
commit ef400514dae15e4179c79373cdc0be6c0ae154a5
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 842743f11..13e4e8aa3 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1049,11 +1049,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);
@@ -1156,6 +1157,10 @@ var FolderView = class FolderView extends BaseAppView {
setPaddingOffsets(offset) {
this._offsetForEachSide = offset;
}
+
+ get folderIcon() {
+ return this._folderIcon;
+ }
};
var FolderIcon = class FolderIcon {
@@ -1181,7 +1186,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]