xsnippet logotype

xsnippet

#363359, Untitled [ Diff ]

by Guest
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 5a0e362bbba4fc295c0baed79271430dc4501a1c Mon Sep 17 00:00:00 2001
From: Ihor Kalnytskyi <ihor@kalnytskyi.com>
Date: Sat, 7 Oct 2017 00:29:25 +0300
Subject: [PATCH] Fix 3.26

---
 icon-hider@kalnitsky.org/_compat.js    | 10 +++++++++-
 icon-hider@kalnitsky.org/metadata.json |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/icon-hider@kalnitsky.org/_compat.js b/icon-hider@kalnitsky.org/_compat.js
index a9c106b..80cc346 100644
--- a/icon-hider@kalnitsky.org/_compat.js
+++ b/icon-hider@kalnitsky.org/_compat.js
@@ -14,13 +14,21 @@
  * The function returns a tray manager instance.
  */
 function getTrayManager() {
+    const Shell = imports.gi.Shell;
     const Main = imports.ui.main;
 
+    // since GNOME Shel 3.26 we do not show tray manager and ought to
+    // create our own. it basically means this extension has no sense
+    // now, but for those who asks, let's provide
+    if (Shell.TrayManager) {
+      return new Shell.TrayManager();
+    }
+
     // various gnome versions have various tray keepers. let's find all
     // available tray keepers and then find tray manager instance among
     // them.
     let trayKeepers = [
-        Main.legacyTray,                                 // GNOME Shell 3.16
+        Main.legacyTray,                                 // GNOME Shell 3.16/3.18/3.20/3.22/3.24
         Main.notificationDaemon._fdoNotificationDaemon,  // GNOME Shell 3.14/3.12
         Main.notificationDaemon,                         // GNOME Shell 3.10
     ].filter(function (item) {
diff --git a/icon-hider@kalnitsky.org/metadata.json b/icon-hider@kalnitsky.org/metadata.json
index f1852a3..6aba6bd 100644
--- a/icon-hider@kalnitsky.org/metadata.json
+++ b/icon-hider@kalnitsky.org/metadata.json
@@ -1,5 +1,5 @@
 {
-    "shell-version": ["3.10", "3.12", "3.14", "3.16", "3.18", "3.20", "3.22"],
+    "shell-version": ["3.10", "3.12", "3.14", "3.16", "3.18", "3.20", "3.22", "3.26"],
     "uuid": "icon-hider@kalnitsky.org",
     "name": "Icon Hider",
     "description": "Show/Hide icons from top panel",
-- 
2.14.2