[gnome-shell/gbsneto/custom-icon-positions: 105/111] appDisplay: Save pages after dropping
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/custom-icon-positions: 105/111] appDisplay: Save pages after dropping
- Date: Mon, 22 Jun 2020 22:53:13 +0000 (UTC)
commit cb8940b76fd22da90f9f200b816f0b66661732cb
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Tue May 26 01:41:17 2020 -0300
appDisplay: Save pages after dropping
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
js/ui/appDisplay.js | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index ef9cb037d7..ea96905917 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -684,6 +684,26 @@ class AppDisplay extends BaseAppView {
super._redisplay();
}
+ _savePages() {
+ const pages = [];
+
+ for (let i = 0; i < this._grid.nPages; i++) {
+ const pageItems =
+ this._grid.getItemsAtPage(i).filter(c => c.visible);
+ const pageData = {};
+
+ for (let itemIndex in pageItems) {
+ const item = pageItems[itemIndex];
+ pageData[item.id] = {
+ position: GLib.Variant.new_int32(itemIndex),
+ };
+ }
+ pages.push(pageData);
+ }
+
+ this._pageManager.pages = pages;
+ }
+
_itemNameChanged(item) {
// If an item's name changed, we can pluck it out of where it's
// supposed to be and reinsert it where it's sorted.
@@ -1068,6 +1088,8 @@ class AppDisplay extends BaseAppView {
this._removeDelayedMove();
}
+ this._savePages();
+
if (this._currentDialog)
this._currentDialog.popdown();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]