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
This commit is contained in:
parent
49260a85ad
commit
0ee13672ee
@ -1137,11 +1137,7 @@ var FolderIcon = class FolderIcon {
|
|||||||
|
|
||||||
this.view = new FolderView();
|
this.view = new FolderView();
|
||||||
|
|
||||||
this.actor.connect('clicked', () => {
|
this.actor.connect('clicked', this.open.bind(this));
|
||||||
this._ensurePopup();
|
|
||||||
this.view.actor.vscroll.adjustment.value = 0;
|
|
||||||
this._openSpaceForPopup();
|
|
||||||
});
|
|
||||||
this.actor.connect('destroy', this.onDestroy.bind(this));
|
this.actor.connect('destroy', this.onDestroy.bind(this));
|
||||||
this.actor.connect('notify::mapped', () => {
|
this.actor.connect('notify::mapped', () => {
|
||||||
if (!this.actor.mapped && this._popup)
|
if (!this.actor.mapped && this._popup)
|
||||||
@ -1164,6 +1160,12 @@ var FolderIcon = class FolderIcon {
|
|||||||
this._popup.actor.destroy();
|
this._popup.actor.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open() {
|
||||||
|
this._ensurePopup();
|
||||||
|
this.view.actor.vscroll.adjustment.value = 0;
|
||||||
|
this._openSpaceForPopup();
|
||||||
|
}
|
||||||
|
|
||||||
getAppIds() {
|
getAppIds() {
|
||||||
return this.view.getAllItems().map(item => item.id);
|
return this.view.getAllItems().map(item => item.id);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user