[gnome-shell] appDisplay: Don't expose "Add as favorite" for window-backed apps



commit 7f1d2825fdda2b1ff040e8881371c62d5e1cbaaf
Author: Colin Walters <walters verbum org>
Date:   Thu Aug 11 06:06:38 2011 -0400

    appDisplay: Don't expose "Add as favorite" for window-backed apps
    
    We don't know how to do it.  Similarly, don't allow New Window.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=648149

 js/ui/appDisplay.js |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index a69b677..291e3d6 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -673,17 +673,18 @@ AppIconMenu.prototype = {
             item._window = windows[i];
         }
 
-        if (windows.length > 0)
-            this._appendSeparator();
-
-        let isFavorite = AppFavorites.getAppFavorites().isFavorite(this._source.app.get_id());
+        if (!this._source.app.is_window_backed()) {
+            if (windows.length > 0)
+                this._appendSeparator();
 
-        this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
-        this._appendSeparator();
+            let isFavorite = AppFavorites.getAppFavorites().isFavorite(this._source.app.get_id());
 
-        this._toggleFavoriteMenuItem = this._appendMenuItem(isFavorite ? _("Remove from Favorites")
-                                                                    : _("Add to Favorites"));
+            this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
+            this._appendSeparator();
 
+            this._toggleFavoriteMenuItem = this._appendMenuItem(isFavorite ? _("Remove from Favorites")
+                                                                : _("Add to Favorites"));
+        }
     },
 
     _appendSeparator: function () {



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