Changing GObject to GLib
This commit is contained in:
parent
5240429733
commit
23f61ca999
@ -3,11 +3,12 @@
|
||||
# License: GPL3+
|
||||
"""Receiver related functionality."""
|
||||
import dbus.service
|
||||
import dbus.glib
|
||||
from dbus.mainloop.glib import DBusGMainLoop
|
||||
from os import system
|
||||
from gi.repository import GObject
|
||||
from gi.repository import GLib
|
||||
import dbus
|
||||
|
||||
DBusGMainLoop(set_as_default=True)
|
||||
|
||||
class Test(dbus.service.Object):
|
||||
"""Reciever test class."""
|
||||
@ -68,6 +69,7 @@ def event_handler(*args, **kwargs):
|
||||
system("polybar-msg hook playpause 3")
|
||||
""" Send IPC hook 2 to all bars for module spotify """
|
||||
system("polybar-msg hook spotify 2")
|
||||
#system("polybar-msg action spotify 2")
|
||||
|
||||
def unwrap(val):
|
||||
if isinstance(val, dbus.ByteArray):
|
||||
@ -86,7 +88,7 @@ def unwrap(val):
|
||||
return bytes([int(val)])
|
||||
return val
|
||||
|
||||
loop = GObject.MainLoop()
|
||||
loop = GLib.MainLoop()
|
||||
|
||||
"""
|
||||
First we get the bus to attach to. This may be either the session bus, of the
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user