dash: Simplify some code
https://bugzilla.gnome.org/show_bug.cgi?id=701386
This commit is contained in:
parent
673d7038d8
commit
bd6e0ceb81
@ -287,13 +287,7 @@ const ShowAppsIcon = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleDragOver: function(source, actor, x, y, time) {
|
handleDragOver: function(source, actor, x, y, time) {
|
||||||
let app = getAppFromSource(source);
|
if (!this._canRemoveApp(getAppFromSource(source)))
|
||||||
if (app == null)
|
|
||||||
return DND.DragMotionResult.NO_DROP;
|
|
||||||
|
|
||||||
let id = app.get_id();
|
|
||||||
let isFavorite = AppFavorites.getAppFavorites().isFavorite(id);
|
|
||||||
if (!isFavorite)
|
|
||||||
return DND.DragMotionResult.NO_DROP;
|
return DND.DragMotionResult.NO_DROP;
|
||||||
|
|
||||||
return DND.DragMotionResult.MOVE_DROP;
|
return DND.DragMotionResult.MOVE_DROP;
|
||||||
@ -301,7 +295,7 @@ const ShowAppsIcon = new Lang.Class({
|
|||||||
|
|
||||||
acceptDrop: function(source, actor, x, y, time) {
|
acceptDrop: function(source, actor, x, y, time) {
|
||||||
let app = getAppFromSource(source);
|
let app = getAppFromSource(source);
|
||||||
if (app == null)
|
if (!this._canRemoveApp(app))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let id = app.get_id();
|
let id = app.get_id();
|
||||||
|
Loading…
Reference in New Issue
Block a user