Skip to content
Snippets Groups Projects
Commit 662cb785 authored by inso's avatar inso
Browse files

Use basic toast if notify2 is unavailable

parent d10904c4
No related branches found
No related tags found
No related merge requests found
...@@ -16,12 +16,16 @@ window = None # global ...@@ -16,12 +16,16 @@ window = None # global
def display(title, msg): def display(title, msg):
logging.debug("NOTIFY DISPLAY") logging.debug("NOTIFY DISPLAY")
if sys.platform == "linux": if sys.platform == "linux":
import notify2 try:
if not notify2.is_initted(): import notify2
logging.debug("Initialising notify2") if not notify2.is_initted():
notify2.init("cutecoin") logging.debug("Initialising notify2")
n = notify2.Notification(title, notify2.init("cutecoin")
msg) n = notify2.Notification(title,
msg)
except ImportError:
_Toast(title, msg)
# fixme: https://bugs.python.org/issue11587 # fixme: https://bugs.python.org/issue11587
# # Not working... Empty icon at the moment. # # Not working... Empty icon at the moment.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment