Fix a GI version warning for Notify library

This commit is contained in:
Stephen Boddy 2015-11-28 18:56:02 +01:00
parent 85c0518643
commit 9fde814a44
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@
"""activitywatch.py - Terminator Plugin to watch a terminal for activity""" """activitywatch.py - Terminator Plugin to watch a terminal for activity"""
import time import time
import gi
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import GObject from gi.repository import GObject
@ -14,6 +15,7 @@ from terminatorlib.util import err, dbg
from terminatorlib.version import APP_NAME from terminatorlib.version import APP_NAME
try: try:
gi.require_version('Notify', '0.7')
from gi.repository import Notify from gi.repository import Notify
# Every plugin you want Terminator to load *must* be listed in 'AVAILABLE' # Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
# This is inside this try so we only make the plugin available if pynotify # This is inside this try so we only make the plugin available if pynotify