[gnome-shell] dash: Allow adding favorites out of favorites zone
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dash: Allow adding favorites out of favorites zone
- Date: Thu, 14 May 2020 18:41:20 +0000 (UTC)
commit 0737c8f4160e911c4208e201879514bbd601f0fd
Author: Bryan Dunsmore <bryan dunsmore outlook com>
Date: Wed May 13 11:28:53 2020 -0500
dash: Allow adding favorites out of favorites zone
Previously, you could not add favorites outside of the favorites zone.
This change inserts a placeholder at the end of the favorites zone if
you are outside of it.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2777
js/ui/dash.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 6eb71e73bd..60725381b3 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -815,7 +815,12 @@ var Dash = GObject.registerClass({
else
pos = 0; // always insert at the top when dash is empty
- if (pos != this._dragPlaceholderPos && pos <= numFavorites && this._animatingPlaceholdersCount == 0)
{
+ // Put the placeholder after the last favorite if we are not
+ // in the favorites zone
+ if (pos > numFavorites)
+ pos = numFavorites;
+
+ if (pos !== this._dragPlaceholderPos && this._animatingPlaceholdersCount === 0) {
this._dragPlaceholderPos = pos;
// Don't allow positioning before or after self
@@ -843,11 +848,6 @@ var Dash = GObject.registerClass({
this._dragPlaceholder.show(fadeIn);
}
- // Remove the drag placeholder if we are not in the
- // "favorites zone"
- if (pos > numFavorites)
- this._clearDragPlaceholder();
-
if (!this._dragPlaceholder)
return DND.DragMotionResult.NO_DROP;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]