farsighr module is now optional. Fixes #5278
This commit is contained in:
parent
c162780a58
commit
40199e359c
|
@ -1253,7 +1253,8 @@ class ChatControl(ChatControlBase, ChatCommands):
|
||||||
'muc_active').get_pixbuf())
|
'muc_active').get_pixbuf())
|
||||||
|
|
||||||
self._audio_image = self.xml.get_widget('audio_image')
|
self._audio_image = self.xml.get_widget('audio_image')
|
||||||
if gajim.capscache.is_supported(contact, NS_JINGLE_RTP_AUDIO):
|
if gajim.capscache.is_supported(contact, NS_JINGLE_RTP_AUDIO) and \
|
||||||
|
gajim.HAVE_FARSIGHT:
|
||||||
self.set_audio_state('available')
|
self.set_audio_state('available')
|
||||||
else:
|
else:
|
||||||
self.set_audio_state('not_available')
|
self.set_audio_state('not_available')
|
||||||
|
|
|
@ -51,7 +51,14 @@ from common import exceptions
|
||||||
from common.commands import ConnectionCommands
|
from common.commands import ConnectionCommands
|
||||||
from common.pubsub import ConnectionPubSub
|
from common.pubsub import ConnectionPubSub
|
||||||
from common.caps import ConnectionCaps
|
from common.caps import ConnectionCaps
|
||||||
from common.jingle import ConnectionJingle
|
if gajim.HAVE_FARSIGHT:
|
||||||
|
from common.jingle import ConnectionJingle
|
||||||
|
else:
|
||||||
|
class ConnectionJingle():
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
def _JingleCB(self, con, stanza):
|
||||||
|
pass
|
||||||
|
|
||||||
from common import dbus_support
|
from common import dbus_support
|
||||||
if dbus_support.supported:
|
if dbus_support.supported:
|
||||||
|
|
|
@ -189,6 +189,11 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAVE_INDICATOR = False
|
HAVE_INDICATOR = False
|
||||||
|
|
||||||
|
HAVE_FARSIGHT = True
|
||||||
|
try:
|
||||||
|
import farsight, gst
|
||||||
|
except ImportError:
|
||||||
|
HAVE_FARSIGHT = False
|
||||||
gajim_identity = {'type': 'pc', 'category': 'client', 'name': 'Gajim'}
|
gajim_identity = {'type': 'pc', 'category': 'client', 'name': 'Gajim'}
|
||||||
gajim_common_features = [xmpp.NS_BYTESTREAM, xmpp.NS_SI, xmpp.NS_FILE,
|
gajim_common_features = [xmpp.NS_BYTESTREAM, xmpp.NS_SI, xmpp.NS_FILE,
|
||||||
xmpp.NS_MUC, xmpp.NS_MUC_USER, xmpp.NS_MUC_ADMIN, xmpp.NS_MUC_OWNER,
|
xmpp.NS_MUC, xmpp.NS_MUC_USER, xmpp.NS_MUC_ADMIN, xmpp.NS_MUC_OWNER,
|
||||||
|
@ -196,9 +201,7 @@ gajim_common_features = [xmpp.NS_BYTESTREAM, xmpp.NS_SI, xmpp.NS_FILE,
|
||||||
'jabber:iq:gateway', xmpp.NS_LAST, xmpp.NS_PRIVACY, xmpp.NS_PRIVATE,
|
'jabber:iq:gateway', xmpp.NS_LAST, xmpp.NS_PRIVACY, xmpp.NS_PRIVATE,
|
||||||
xmpp.NS_REGISTER, xmpp.NS_VERSION, xmpp.NS_DATA, xmpp.NS_ENCRYPTED, 'msglog',
|
xmpp.NS_REGISTER, xmpp.NS_VERSION, xmpp.NS_DATA, xmpp.NS_ENCRYPTED, 'msglog',
|
||||||
'sslc2s', 'stringprep', xmpp.NS_PING, xmpp.NS_TIME_REVISED, xmpp.NS_SSN,
|
'sslc2s', 'stringprep', xmpp.NS_PING, xmpp.NS_TIME_REVISED, xmpp.NS_SSN,
|
||||||
xmpp.NS_MOOD, xmpp.NS_ACTIVITY, xmpp.NS_NICK, xmpp.NS_ROSTERX,
|
xmpp.NS_MOOD, xmpp.NS_ACTIVITY, xmpp.NS_NICK, xmpp.NS_ROSTERX]
|
||||||
xmpp.NS_JINGLE, xmpp.NS_JINGLE_RTP, xmpp.NS_JINGLE_RTP_AUDIO,
|
|
||||||
xmpp.NS_JINGLE_RTP_VIDEO, xmpp.NS_JINGLE_ICE_UDP]
|
|
||||||
|
|
||||||
# Optional features gajim supports per account
|
# Optional features gajim supports per account
|
||||||
gajim_optional_features = {}
|
gajim_optional_features = {}
|
||||||
|
|
|
@ -1352,6 +1352,12 @@ def update_optional_features(account = None):
|
||||||
gajim.gajim_optional_features[a].append(xmpp.NS_ESESSION)
|
gajim.gajim_optional_features[a].append(xmpp.NS_ESESSION)
|
||||||
if gajim.config.get_per('accounts', a, 'answer_receipts'):
|
if gajim.config.get_per('accounts', a, 'answer_receipts'):
|
||||||
gajim.gajim_optional_features[a].append(xmpp.NS_RECEIPTS)
|
gajim.gajim_optional_features[a].append(xmpp.NS_RECEIPTS)
|
||||||
|
if gajim.HAVE_FARSIGHT:
|
||||||
|
gajim.gajim_optional_features[a].append(xmpp.NS_JINGLE)
|
||||||
|
gajim.gajim_optional_features[a].append(xmpp.NS_JINGLE_RTP)
|
||||||
|
gajim.gajim_optional_features[a].append(xmpp.NS_JINGLE_RTP_AUDIO)
|
||||||
|
gajim.gajim_optional_features[a].append(xmpp.NS_JINGLE_RTP_VIDEO)
|
||||||
|
gajim.gajim_optional_features[a].append(xmpp.NS_JINGLE_ICE_UDP)
|
||||||
gajim.caps_hash[a] = compute_caps_hash([gajim.gajim_identity],
|
gajim.caps_hash[a] = compute_caps_hash([gajim.gajim_identity],
|
||||||
gajim.gajim_common_features + gajim.gajim_optional_features[a])
|
gajim.gajim_common_features + gajim.gajim_optional_features[a])
|
||||||
# re-send presence with new hash
|
# re-send presence with new hash
|
||||||
|
|
|
@ -107,6 +107,10 @@ class FeaturesWindow:
|
||||||
_('Ability to have clickable URLs in chat and groupchat window banners.'),
|
_('Ability to have clickable URLs in chat and groupchat window banners.'),
|
||||||
_('Requires python-sexy.'),
|
_('Requires python-sexy.'),
|
||||||
_('Requires python-sexy.')),
|
_('Requires python-sexy.')),
|
||||||
|
_('Audio / Video'): (self.farsight_available,
|
||||||
|
_('Ability to start audio and video chat.'),
|
||||||
|
_('Requires python-farsight.'),
|
||||||
|
_('Feature not available under Windows.')),
|
||||||
}
|
}
|
||||||
|
|
||||||
# name, supported
|
# name, supported
|
||||||
|
@ -265,4 +269,7 @@ class FeaturesWindow:
|
||||||
def pysexy_available(self):
|
def pysexy_available(self):
|
||||||
return gajim.HAVE_PYSEXY
|
return gajim.HAVE_PYSEXY
|
||||||
|
|
||||||
|
def farsight_available(self):
|
||||||
|
return gajim.HAVE_FARSIGHT
|
||||||
|
|
||||||
# vim: se ts=3:
|
# vim: se ts=3:
|
||||||
|
|
Loading…
Reference in New Issue