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
|
--- a/connman-notify
+++ b/connman-notify
@@ -7,8 +7,8 @@
import argparse
import dbus
import dbus.mainloop.glib
-import glib
-import pynotify
+from gi.repository import GLib
+from gi.repository import Notify
APP_NAME = 'connman'
SHORT_DEV = True
@@ -22,7 +22,7 @@
def notify(subject, body):
- ntf = pynotify.Notification(subject, body)
+ ntf = Notify.Notification.new(subject, body)
ntf.show()
@@ -79,7 +79,7 @@
if args.hide_addr: SHOW_ADDR = False
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
- pynotify.init(APP_NAME)
+ Notify.init(APP_NAME)
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("net.connman", "/"), "net.connman.Manager")
@@ -88,5 +88,5 @@
signal_name="PropertyChanged",
path_keyword="path")
- mainloop = glib.MainLoop()
+ mainloop = GLib.MainLoop()
mainloop.run()
|