Stephan Herhut | d24b1b7 | 2017-08-24 15:09:36 +0200 | [diff] [blame] | 1 | #!/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 | |
| 6 | try: |
| 7 | import gi |
Jinseong Jeon | 10307de | 2018-02-12 17:10:58 -0800 | [diff] [blame] | 8 | gi.require_version('Notify', '0.7') |
Stephan Herhut | d24b1b7 | 2017-08-24 15:09:36 +0200 | [diff] [blame] | 9 | from gi.repository import Notify |
Jinseong Jeon | 10307de | 2018-02-12 17:10:58 -0800 | [diff] [blame] | 10 | Notify.init('R8 build tools') |
Stephan Herhut | d24b1b7 | 2017-08-24 15:09:36 +0200 | [diff] [blame] | 11 | |
| 12 | def notify(message): |
| 13 | try: |
Jinseong Jeon | 10307de | 2018-02-12 17:10:58 -0800 | [diff] [blame] | 14 | Notify.Notification.new('R8 build tools', message).show() |
Stephan Herhut | d24b1b7 | 2017-08-24 15:09:36 +0200 | [diff] [blame] | 15 | except: |
| 16 | return |
| 17 | |
Rico Wind | 4981168 | 2018-10-25 09:24:46 +0200 | [diff] [blame] | 18 | except (ImportError, ValueError): |
Stephan Herhut | d24b1b7 | 2017-08-24 15:09:36 +0200 | [diff] [blame] | 19 | def notify(message): |
| 20 | return |