Skip to content

Commit 6f76df3

Browse files
committed
Get rid of deprecation warnings in applet
1 parent 0430576 commit 6f76df3

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- use proper docstring (pull/130)
2020
- remove deprecated SIGNAL_RUN_LAST (pull/134)
2121
- use remote ppd for CUPS shared queues (pull/137)
22+
- get rid of warnings in applet (Fedora issue #1732890)
2223

2324
1.5.10 changes
2425
--------------

applet.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@
2424
from debug import *
2525

2626
import dbus
27-
import dbus.glib
27+
28+
# set up global default main loop
29+
from dbus.mainloop.glib import DBusGMainLoop
30+
DBusGMainLoop(set_as_default=True)
31+
2832
import dbus.service
33+
import gi
2934
from gi.repository import GObject
3035
from gi.repository import GLib
3136
import time
@@ -42,6 +47,7 @@
4247
os.environ['LC_ALL'] = 'C'
4348
locale.setlocale (locale.LC_ALL, "")
4449

50+
gi.require_version('Notify', '0.7')
4551
from gi.repository import Notify
4652

4753
APPDIR="/usr/share/system-config-printer"
@@ -453,7 +459,7 @@ def check_for_jobs (self, *args):
453459
except:
454460
pass
455461

456-
loop = GObject.MainLoop ()
462+
loop = GLib.MainLoop ()
457463
runloop = RunLoop (session_bus, system_bus, loop)
458464
try:
459465
runloop.run ()

0 commit comments

Comments
 (0)