[gnome-shell] dash: Simplify some code



commit bd6e0ceb81d5d8a4ec3e3902f5a64e642e416130
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri May 31 20:00:17 2013 +0200

    dash: Simplify some code
    
    https://bugzilla.gnome.org/show_bug.cgi?id=701386

 js/ui/dash.js |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 0de00a2..e29aff4 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -287,13 +287,7 @@ const ShowAppsIcon = new Lang.Class({
     },
 
     handleDragOver: function(source, actor, x, y, time) {
-        let app = getAppFromSource(source);
-        if (app == null)
-            return DND.DragMotionResult.NO_DROP;
-
-        let id = app.get_id();
-        let isFavorite = AppFavorites.getAppFavorites().isFavorite(id);
-        if (!isFavorite)
+        if (!this._canRemoveApp(getAppFromSource(source)))
             return DND.DragMotionResult.NO_DROP;
 
         return DND.DragMotionResult.MOVE_DROP;
@@ -301,7 +295,7 @@ const ShowAppsIcon = new Lang.Class({
 
     acceptDrop: function(source, actor, x, y, time) {
         let app = getAppFromSource(source);
-        if (app == null)
+        if (!this._canRemoveApp(app))
             return false;
 
         let id = app.get_id();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]