blob: b195357cf581e089f71cad46fd0bbc781403b493 [file] [log] [blame]
Stephan Herhutd24b1b72017-08-24 15:09:36 +02001#!/usr/bin/env python
2# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
3# for details. All rights reserved. Use of this source code is governed by a
4# BSD-style license that can be found in the LICENSE file.
5
6try:
7 import gi
Jinseong Jeon10307de2018-02-12 17:10:58 -08008 gi.require_version('Notify', '0.7')
Stephan Herhutd24b1b72017-08-24 15:09:36 +02009 from gi.repository import Notify
Jinseong Jeon10307de2018-02-12 17:10:58 -080010 Notify.init('R8 build tools')
Stephan Herhutd24b1b72017-08-24 15:09:36 +020011
12 def notify(message):
13 try:
Jinseong Jeon10307de2018-02-12 17:10:58 -080014 Notify.Notification.new('R8 build tools', message).show()
Stephan Herhutd24b1b72017-08-24 15:09:36 +020015 except:
16 return
17
Rico Wind49811682018-10-25 09:24:46 +020018except (ImportError, ValueError):
Stephan Herhutd24b1b72017-08-24 15:09:36 +020019 def notify(message):
20 return