Merge branch 'httpupload-disable' into 'master'
[httpupload] Add max Gajim version for plugin activation See merge request gajim/gajim-plugins!63
This commit is contained in:
@@ -29,7 +29,7 @@ if os.name == 'nt':
|
|||||||
|
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from gi.repository import Gtk, GLib
|
from gi.repository import Gtk, GLib
|
||||||
|
from gajim import __version__
|
||||||
from gajim.common import app
|
from gajim.common import app
|
||||||
from gajim.common import ged
|
from gajim.common import ged
|
||||||
from gajim.plugins import GajimPlugin
|
from gajim.plugins import GajimPlugin
|
||||||
@@ -42,9 +42,19 @@ log = logging.getLogger('gajim.plugin_system.httpupload')
|
|||||||
IQ_CALLBACK = {}
|
IQ_CALLBACK = {}
|
||||||
NS_HTTPUPLOAD = 'urn:xmpp:http:upload'
|
NS_HTTPUPLOAD = 'urn:xmpp:http:upload'
|
||||||
|
|
||||||
|
MAX_GAJIM_VER = "0.98.3"
|
||||||
|
|
||||||
class HTTPUploadPlugin(GajimPlugin):
|
class HTTPUploadPlugin(GajimPlugin):
|
||||||
def init(self):
|
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 = {
|
self.config_default_values = {
|
||||||
'verify': (True, '')
|
'verify': (True, '')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
[info]
|
[info]
|
||||||
name: HttpUpload
|
name: HttpUpload
|
||||||
short_name: httpupload
|
short_name: httpupload
|
||||||
version: 0.7.3
|
version: 0.7.4
|
||||||
description: This plugin is designed to send a file to a contact or muc by using httpupload.<br/>
|
description: This plugin is designed to send a file to a contact or muc by using httpupload.<br/>
|
||||||
Your server must support <a href="http://xmpp.org/extensions/xep-0363.html">XEP-0363: HTTP Upload</a>.<br/>
|
Your server must support <a href="http://xmpp.org/extensions/xep-0363.html">XEP-0363: HTTP Upload</a>.<br/>
|
||||||
|
This plugin is integrated into Gajim core since version 0.99.1.<br/>
|
||||||
authors: Thilo Molitor <thilo@eightysoft.de>
|
authors: Thilo Molitor <thilo@eightysoft.de>
|
||||||
Philipp Hörist <philipp@hoerist.com>
|
Philipp Hörist <philipp@hoerist.com>
|
||||||
Linus Heckemann <linus@sphalerite.org>
|
Linus Heckemann <linus@sphalerite.org>
|
||||||
|
|||||||
Reference in New Issue
Block a user