Blame SOURCES/0001-apps-menu-add-logo-icon-to-Applications-menu.patch

b19d38
From 08e720c793baa0cb12ed99c4333c75df46e3a9ed Mon Sep 17 00:00:00 2001
1205f8
From: Ray Strode <rstrode@redhat.com>
1205f8
Date: Tue, 21 Jan 2014 16:48:17 -0500
1205f8
Subject: [PATCH] apps-menu: add logo icon to Applications menu
1205f8
1205f8
Brand requested it.
1205f8
---
1205f8
 extensions/apps-menu/extension.js | 22 +++++++++++++++++++++-
1205f8
 1 file changed, 21 insertions(+), 1 deletion(-)
1205f8
1205f8
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
b19d38
index e36b0fe..983a4e7 100644
1205f8
--- a/extensions/apps-menu/extension.js
1205f8
+++ b/extensions/apps-menu/extension.js
b19d38
@@ -364,13 +364,24 @@ class ApplicationsButton extends PanelMenu.Button {
1205f8
         // role ATK_ROLE_MENU like other elements of the panel.
1205f8
         this.accessible_role = Atk.Role.LABEL;
1205f8
 
1205f8
+        const hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
1205f8
+
1205f8
+        const iconFile = Gio.File.new_for_path(
1205f8
+            '/usr/share/icons/hicolor/scalable/apps/start-here.svg');
1205f8
+        this._icon = new St.Icon({
1205f8
+            gicon: new Gio.FileIcon({ file: iconFile }),
1205f8
+            style_class: 'panel-logo-icon',
1205f8
+        });
1205f8
+        hbox.add_actor(this._icon);
1205f8
+
1205f8
         this._label = new St.Label({
1205f8
             text: _('Applications'),
1205f8
             y_expand: true,
1205f8
             y_align: Clutter.ActorAlign.CENTER,
1205f8
         });
1205f8
+        hbox.add_actor(this._label);
1205f8
 
1205f8
-        this.add_actor(this._label);
1205f8
+        this.add_actor(hbox);
1205f8
         this.name = 'panelApplications';
1205f8
         this.label_actor = this._label;
1205f8
 
b19d38
@@ -404,6 +415,14 @@ class ApplicationsButton extends PanelMenu.Button {
1205f8
         this._display();
1205f8
         this._installedChangedId = appSys.connect('installed-changed',
1205f8
             this._onTreeChanged.bind(this));
1205f8
+        this._sessionUpdatedId = Main.sessionMode.connect('updated',
1205f8
+            this._sessionUpdated.bind(this));
1205f8
+        this._sessionUpdated();
1205f8
+    }
1205f8
+
1205f8
+    _sessionUpdated() {
1205f8
+        this._icon.visible =
1205f8
+            !Main.sessionMode.panel.left.includes('activities');
1205f8
     }
1205f8
 
1205f8
     _onTreeChanged() {
b19d38
@@ -429,6 +448,7 @@ class ApplicationsButton extends PanelMenu.Button {
1205f8
 
1205f8
         Main.overview.disconnect(this._showingId);
1205f8
         Main.overview.disconnect(this._hidingId);
1205f8
+        Main.sessionMode.disconnect(this._sessionUpdatedId);
1205f8
         appSys.disconnect(this._installedChangedId);
1205f8
         this._tree.disconnect(this._treeChangedId);
1205f8
         this._tree = null;
1205f8
-- 
b19d38
2.32.0
1205f8