diff options
author | Philipp Hörist <philipp@hoerist.com> | 2018-10-06 21:14:38 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2018-10-06 21:46:24 +0300 |
commit | 97c2bfbdd9cf4929cd27156b8210c1e71871a018 (patch) | |
tree | f9e826b9188ea7db90596dcf90b1e48f4f5383b4 /now_listen | |
parent | db2c71b6a10cac18fbf9dd60b093cfe90360eb96 (diff) |
Add compatibility for Gajim 1.1
Diffstat (limited to 'now_listen')
-rw-r--r-- | now_listen/manifest.ini | 2 | ||||
-rw-r--r-- | now_listen/now_listen.py | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/now_listen/manifest.ini b/now_listen/manifest.ini index 1c8270e..7b2b63c 100644 --- a/now_listen/manifest.ini +++ b/now_listen/manifest.ini @@ -1,7 +1,7 @@ [info] name: Now Listen short_name: now-listen -version: 0.3.2 +version: 0.3.3 description: Copy tune info of playing music to conversation input box at cursor position (Alt + N) authors = Denis Fomin <fominde@gmail.com> homepage = https://dev.gajim.org/gajim/gajim-plugins/wikis/NowListenPlugin diff --git a/now_listen/now_listen.py b/now_listen/now_listen.py index 68764e9..cbf85dd 100644 --- a/now_listen/now_listen.py +++ b/now_listen/now_listen.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- +import os +import logging from gi.repository import Gtk from gi.repository import Gdk -import os -import logging from gajim.plugins import GajimPlugin from gajim.plugins.helpers import log_calls @@ -11,6 +10,12 @@ from gajim.plugins.gui import GajimPluginConfigDialog from gajim.music_track_listener import MusicTrackListener +# Since Gajim 1.1.0 _() has to be imported +try: + from gajim.common.i18n import _ +except ImportError: + pass + log = logging.getLogger('gajim.plugin_system.now_listen') |