summarylogtreecommitdiffstats
path: root/kde-statusicon.patch
blob: cd736324bd7a37b707838b0461473b630be27722 (plain)
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
From be3d197db4c7f7b06c88fa7457f27bb7741cd016 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Fri, 26 Jan 2018 19:18:34 +0100
Subject: [PATCH] Enable Gtk.StatusIcon in KDE

---
 syncthing_gtk/statusicon.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/syncthing_gtk/statusicon.py b/syncthing_gtk/statusicon.py
index 5f19ee9..b4f7d10 100644
--- a/syncthing_gtk/statusicon.py
+++ b/syncthing_gtk/statusicon.py
@@ -26,7 +26,7 @@
 # StatusIconKDE4 | excellent       | usable³   | very good⁵ | usable³    | usable³              | excellent           | excellent |
 # StatusIconQt5  | very good (KF5) | -         | -          | -          | -                    | -                   | -         |
 # StatusIconAppI | good²           | none      | excellent  | none       | none                 | excellent           | good²     |
-# StatusIconGTK3 | none            | excellent | none       | very good¹ | very good¹           | none                | good⁴     |
+# StatusIconGTK3 | good            | excellent | none       | very good¹ | very good¹           | none                | good⁴     |
 #
 # Notes:
 #  - StatusIconQt5:
@@ -211,12 +211,6 @@ def __init__(self, *args, **kwargs):
 				# Unity fakes SysTray support but actually hides all icons...
 				raise NotImplementedError
 		
-			if IS_KDE:
-				# While the GTK backend works fine on KDE 4, the StatusIconKDE4 backend will achieve better
-				# results and should be available on any standard KDE 4 installation
-				# (since several KDE applications depend on it)
-				raise NotImplementedError
-		
 		self._tray = Gtk.StatusIcon()
 		
 		self._tray.connect("activate", self._on_click)
@@ -246,7 +240,7 @@ def _on_embedded_change(self, *args):
 		# by a fallback icon
 		is_embedded = self._tray.is_embedded() or not self._tray.get_visible()
 		# On some desktops, above check fails but tray is always visible
-		is_embedded = is_embedded or IS_LXQT or IS_CINNAMON
+		is_embedded = is_embedded or IS_KDE or IS_LXQT or IS_CINNAMON
 		if is_embedded != self.get_property("active"):
 			self.set_property("active", is_embedded)