[gnome-shell/eos3.8: 23/255] taskbar: Disable notifications when pinning and unpinning apps



commit e43e7f461253b97fd15cdeaa8edf95c3c5fd8ca3
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Tue May 2 14:41:29 2017 +0100

    taskbar: Disable notifications when pinning and unpinning apps
    
    Adding/removing favorite apps in the dash gets the shell to emit a
    notification to the user, which is very useful to undo the action
    in case it was done by mistake.
    
    However, we don't want this feature in Endless, so disable it.

 js/ui/appFavorites.js | 24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)
---
diff --git a/js/ui/appFavorites.js b/js/ui/appFavorites.js
index 653f0cfba1..29a140aacc 100644
--- a/js/ui/appFavorites.js
+++ b/js/ui/appFavorites.js
@@ -144,16 +144,7 @@ class AppFavorites {
     }
 
     addFavoriteAtPos(appId, pos) {
-        if (!this._addFavorite(appId, pos))
-            return;
-
-        let app = Shell.AppSystem.get_default().lookup_app(appId);
-
-        let msg = _("%s has been added to your favorites.").format(app.get_name());
-        Main.overview.setMessage(msg, {
-            forFeedback: true,
-            undoCallback: () => this._removeFavorite(appId),
-        });
+        this._addFavorite(appId, pos)
     }
 
     addFavorite(appId) {
@@ -175,18 +166,7 @@ class AppFavorites {
     }
 
     removeFavorite(appId) {
-        let ids = this._getIds();
-        let pos = ids.indexOf(appId);
-
-        let app = this._favorites[appId];
-        if (!this._removeFavorite(appId))
-            return;
-
-        let msg = _("%s has been removed from your favorites.").format(app.get_name());
-        Main.overview.setMessage(msg, {
-            forFeedback: true,
-            undoCallback: () => this._addFavorite(appId, pos),
-        });
+        this._removeFavorite(appId);
     }
 }
 Signals.addSignalMethods(AppFavorites.prototype);


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