Package: system-config-printer / 1.5.11-4

0005-Require-proper-version-of-GDK-and-GTK-in-scp-dbus-se.patch Patch series | download
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
From: Laurent Bigonville <bigon@bigon.be>
Date: Mon, 26 Feb 2018 11:54:10 +0100
Subject: Require proper version of GDK and GTK in scp-dbus-service as well

scp-dbus-service can be D-Bus activated, that means that
gi.require_version() is not called before.

That needs to be kept in sync with the required version in the main
program file.
---
 scp-dbus-service.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scp-dbus-service.py b/scp-dbus-service.py
index f0f51ef..3aefc6c 100644
--- a/scp-dbus-service.py
+++ b/scp-dbus-service.py
@@ -21,9 +21,12 @@
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 import dbus.service
+import gi
 from gi.repository import GObject
 from gi.repository import GLib
+gi.require_version('Gdk', '3.0')
 from gi.repository import Gdk
+gi.require_version('Gtk', '3.0')
 from gi.repository import Gtk
 import sys