[gnome-shell/wip/rstrode/login-screen-extensions: 81/134] appDisplay: Add open method to FolderIcon
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/login-screen-extensions: 81/134] appDisplay: Add open method to FolderIcon
- Date: Thu, 26 Aug 2021 19:31:00 +0000 (UTC)
commit 1fe394a299f3a46b6184e67f75dc4a847fe3ffe3
Author: Ray Strode <rstrode redhat com>
Date: Thu Jul 18 10:19:13 2019 -0400
appDisplay: Add open method to FolderIcon
At the moment the only way to open a folder icon is to click on it;
there's no API to open the icon programmatically.
This commits adds an open method and makes the click handler use
it.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/628
js/ui/appDisplay.js | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 062ff222c4..c0c6e36631 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1151,11 +1151,7 @@ var FolderIcon = class FolderIcon {
this.view = new FolderView();
- this.actor.connect('clicked', () => {
- this._ensurePopup();
- this.view.actor.vscroll.adjustment.value = 0;
- this._openSpaceForPopup();
- });
+ this.actor.connect('clicked', this.open.bind(this));
this.actor.connect('destroy', this.onDestroy.bind(this));
this.actor.connect('notify::mapped', () => {
if (!this.actor.mapped && this._popup)
@@ -1178,6 +1174,12 @@ var FolderIcon = class FolderIcon {
this._popup.actor.destroy();
}
+ open() {
+ this._ensurePopup();
+ this.view.actor.vscroll.adjustment.value = 0;
+ this._openSpaceForPopup();
+ }
+
getAppIds() {
return this.view.getAllItems().map(item => item.id);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]