diff options
author | Daniel <mailtrash@posteo.de> | 2018-02-09 18:35:45 +0300 |
---|---|---|
committer | Daniel <mailtrash@posteo.de> | 2018-02-10 16:16:22 +0300 |
commit | d2c8f9210bf89e1248023b3225b4bd2fd8b43dbd (patch) | |
tree | 00dcbe31dd70915b0a000aea168016bd1b3d9848 | |
parent | 1499824f2c0dea0a80b2e1098b5fe2906442336f (diff) |
[httpupload] Add max Gajim version for plugin activation
-rw-r--r-- | httpupload/httpupload.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/httpupload/httpupload.py b/httpupload/httpupload.py index 0bd7732..b2b6594 100644 --- a/httpupload/httpupload.py +++ b/httpupload/httpupload.py @@ -29,7 +29,7 @@ if os.name == 'nt': import nbxmpp from gi.repository import Gtk, GLib - +from gajim import __version__ from gajim.common import app from gajim.common import ged from gajim.plugins import GajimPlugin @@ -42,9 +42,19 @@ log = logging.getLogger('gajim.plugin_system.httpupload') IQ_CALLBACK = {} NS_HTTPUPLOAD = 'urn:xmpp:http:upload' +MAX_GAJIM_VER = "0.98.3" class HTTPUploadPlugin(GajimPlugin): def init(self): + from distutils.version import LooseVersion as V + if V(__version__) > V(MAX_GAJIM_VER): + self.activatable = False + self.available_text = 'Gajim 0.99.1 and later versions come with '\ + 'HTTP Upload integrated as core functionality. '\ + 'This plugin is not needed any longer.' + self.config_dialog = None + return + self.config_default_values = { 'verify': (True, '') } |