Merge pull request 'fix notifications' (#2) from simple-repo into master
Reviewed-on: #2
This commit is contained in:
commit
5eff7c9649
1 changed files with 2 additions and 8 deletions
|
@ -48,13 +48,9 @@ from mkbackup.mkbackup_btrfs_config import __version__ as confversion
|
||||||
__author__ = "Jakobus Schürz <jakob@schuerz.at>"
|
__author__ = "Jakobus Schürz <jakob@schuerz.at>"
|
||||||
__version__ = "1.01.0"
|
__version__ = "1.01.0"
|
||||||
|
|
||||||
class EmDBUSDesktop(EM):
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__(conn=dbus.SystemBus(), object_path='/at/xundeenergie/notifications/advanced')
|
|
||||||
|
|
||||||
class Notification(Emitter):
|
class Notification(Emitter):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(conn=dbus.SystemBus(), object_path='/at/xundeenergie/notifications/advanced/Notification')
|
super().__init__(conn=dbus.SystemBus(), object_path='/at/xundeenergie/notifications/advanced')
|
||||||
|
|
||||||
class EmDBUS(EM):
|
class EmDBUS(EM):
|
||||||
""" Example to use
|
""" Example to use
|
||||||
|
@ -2018,7 +2014,7 @@ Author: %s""" % (confversion,__version__,__author__))
|
||||||
args.mdb = EmDBUS()
|
args.mdb = EmDBUS()
|
||||||
args.mdb.reset(args.tag)
|
args.mdb.reset(args.tag)
|
||||||
args.mdb.start(args.tag)
|
args.mdb.start(args.tag)
|
||||||
args.mdbd = EmDBUSDesktop()
|
args.mdbd = Notification()
|
||||||
# msg = dict()
|
# msg = dict()
|
||||||
# msg['sender'] = "mkbackup"
|
# msg['sender'] = "mkbackup"
|
||||||
# msg['header'] = "%s-backup" % (args.tag)
|
# msg['header'] = "%s-backup" % (args.tag)
|
||||||
|
@ -2143,8 +2139,6 @@ um %s Uhr abgeschlossen.
|
||||||
# msg['action']['action1']['loc'] = 'file:~/backup'
|
# msg['action']['action1']['loc'] = 'file:~/backup'
|
||||||
|
|
||||||
|
|
||||||
advnotify = Notification()
|
|
||||||
advnotify.normal(msg)
|
|
||||||
args.mdbd.critical(msg)
|
args.mdbd.critical(msg)
|
||||||
elif args.notification == None:
|
elif args.notification == None:
|
||||||
logger.critical("No notification at all")
|
logger.critical("No notification at all")
|
||||||
|
|
Loading…
Reference in a new issue