--- a/mcevent.py Sun Mar 28 23:04:18 2010 +0200
+++ b/mcevent.py Sat Jun 24 11:20:48 2017 +0200
@@ -17,7 +17,7 @@
import sys, getopt
import os
-import pynotify
+import notify2
CONFFILE = "mcevent.cfg"
@@ -54,11 +54,11 @@
def init_notify():
"""
- Initialize the pynotify subsystem.
+ Initialize the notify subsystem.
"""
import locale
global ENCODING, NOTIFY_LOADED
- pynotify.init('mcnotify')
+ notify2.init('mcnotify')
ENCODING = (locale.getdefaultlocale())[1]
NOTIFY_LOADED = True
@@ -126,12 +126,12 @@
def notify(buddy, msg, timeout):
"""
- Create a pynotify popup.
+ Create a notify popup.
"""
- msgbox = pynotify.Notification(unicode(buddy, ENCODING),
+ msgbox = notify2.Notification(unicode(buddy, ENCODING),
unicode(msg, ENCODING))
msgbox.set_timeout(timeout)
- msgbox.set_urgency(pynotify.URGENCY_LOW)
+ msgbox.set_urgency(notify2.URGENCY_LOW)
msgbox.show()
def get_nick(jid):
@@ -227,7 +227,7 @@
if alert_type == 1:
timeout = NOTIFY_TIMEOUT
else:
- timeout = pynotify.EXPIRES_NEVER
+ timeout = notify2.EXPIRES_NEVER
notify(buddy, "is online", timeout)
if filename and os.path.exists(filename):
@@ -292,7 +292,7 @@
process_line(lineargs)
if NOTIFY_LOADED:
- pynotify.uninit()
+ notify2.uninit()
sys.exit(0)