check that we have rst plugin before supposing we can do jingle. Fixes #6910

This commit is contained in:
Yann Leboulanger 2011-06-22 20:29:15 +02:00
parent 16edbd8363
commit 53a452fc1c
3 changed files with 73 additions and 63 deletions

View File

@ -166,8 +166,17 @@ HAVE_LATEX = False
HAVE_FARSIGHT = True
try:
__import__('farsight')
__import__('gst')
import farsight
import gst
import glib
try:
conference = gst.element_factory_make('fsrtpconference')
session = conference.new_session(farsight.MEDIA_TYPE_AUDIO)
del session
del conference
except glib.GError:
HAVE_FARSIGHT = False
except ImportError:
HAVE_FARSIGHT = False
gajim_identity = {'type': 'pc', 'category': 'client', 'name': 'Gajim'}

View File

@ -47,66 +47,66 @@ class FeaturesWindow:
# {name: (available_function, unix_text, windows_text)}
self.features = {
_('SSL certificate validation'): (self.pyopenssl_available,
_('A library used to validate server certificates to ensure a secure connection.'),
_('Requires python-pyopenssl.'),
_('Requires python-pyopenssl.')),
_('Bonjour / Zeroconf'): (self.zeroconf_available,
_('Serverless chatting with autodetected clients in a local network.'),
_('Requires python-avahi.'),
_('Requires pybonjour (http://o2s.csail.mit.edu/o2s-wiki/pybonjour).')),
_('Command line'): (self.dbus_available,
_('A script to control Gajim via commandline.'),
_('Requires python-dbus.'),
_('Feature not available under Windows.')),
_('OpenGPG message encryption'): (self.gpg_available,
_('Encrypting chat messages with gpg keys.'),
_('Requires gpg and python-gnupg (http://code.google.com/p/python-gnupg/).'),
_('Requires gpg.exe in PATH.')),
_('Network-manager'): (self.network_manager_available,
_('Autodetection of network status.'),
_('Requires gnome-network-manager and python-dbus.'),
_('Feature not available under Windows.')),
_('Session Management'): (self.session_management_available,
_('Gajim session is stored on logout and restored on login.'),
_('Requires python-gnome2.'),
_('Feature not available under Windows.')),
_('Password encryption'): (self.some_keyring_available,
_('Passwords can be stored securely and not just in plaintext.'),
_('Requires gnome-keyring and python-gnome2-desktop, or kwalletcli.'),
_('Feature not available under Windows.')),
_('SRV'): (self.srv_available,
_('Ability to connect to servers which are using SRV records.'),
_('Requires dnsutils.'),
_('Requires nslookup to use SRV records.')),
_('Spell Checker'): (self.speller_available,
_('Spellchecking of composed messages.'),
_('Requires libgtkspell.'),
_('Feature not available under Windows.')),
_('Notification'): (self.notification_available,
_('Passive popups notifying for new events.'),
_('Requires python-notify or instead python-dbus in conjunction with notification-daemon.'),
_('Feature not available under Windows.')),
_('Automatic status'): (self.idle_available,
_('Ability to measure idle time, in order to set auto status.'),
_('Requires libxss library.'),
_('Requires python2.5.')),
_('LaTeX'): (self.latex_available,
_('Transform LaTeX expressions between $$ $$.'),
_('Requires texlive-latex-base and (dvipng or ImageMagick). You have to set \'use_latex\' to True in the Advanced Configuration Editor.'),
_('Requires texlive-latex-base and (dvipng or ImageMagick) (All is in MikTeX). You have to set \'use_latex\' to True in the Advanced Configuration Editor.')),
_('End to End message encryption'): (self.pycrypto_available,
_('Encrypting chat messages.'),
_('Requires python-crypto.'),
_('Requires python-crypto.')),
_('RST Generator'): (self.docutils_available,
_('Generate XHTML output from RST code (see http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html).'),
_('Requires python-docutils.'),
_('Requires python-docutils.')),
_('Audio / Video'): (self.farsight_available,
_('Ability to start audio and video chat.'),
_('Requires python-farsight.'),
_('Feature not available under Windows.')),
_('SSL certificate validation'): (self.pyopenssl_available,
_('A library used to validate server certificates to ensure a secure connection.'),
_('Requires python-pyopenssl.'),
_('Requires python-pyopenssl.')),
_('Bonjour / Zeroconf'): (self.zeroconf_available,
_('Serverless chatting with autodetected clients in a local network.'),
_('Requires python-avahi.'),
_('Requires pybonjour (http://o2s.csail.mit.edu/o2s-wiki/pybonjour).')),
_('Command line'): (self.dbus_available,
_('A script to control Gajim via commandline.'),
_('Requires python-dbus.'),
_('Feature not available under Windows.')),
_('OpenGPG message encryption'): (self.gpg_available,
_('Encrypting chat messages with gpg keys.'),
_('Requires gpg and python-gnupg (http://code.google.com/p/python-gnupg/).'),
_('Requires gpg.exe in PATH.')),
_('Network-manager'): (self.network_manager_available,
_('Autodetection of network status.'),
_('Requires gnome-network-manager and python-dbus.'),
_('Feature not available under Windows.')),
_('Session Management'): (self.session_management_available,
_('Gajim session is stored on logout and restored on login.'),
_('Requires python-gnome2.'),
_('Feature not available under Windows.')),
_('Password encryption'): (self.some_keyring_available,
_('Passwords can be stored securely and not just in plaintext.'),
_('Requires gnome-keyring and python-gnome2-desktop, or kwalletcli.'),
_('Feature not available under Windows.')),
_('SRV'): (self.srv_available,
_('Ability to connect to servers which are using SRV records.'),
_('Requires dnsutils.'),
_('Requires nslookup to use SRV records.')),
_('Spell Checker'): (self.speller_available,
_('Spellchecking of composed messages.'),
_('Requires libgtkspell.'),
_('Feature not available under Windows.')),
_('Notification'): (self.notification_available,
_('Passive popups notifying for new events.'),
_('Requires python-notify or instead python-dbus in conjunction with notification-daemon.'),
_('Feature not available under Windows.')),
_('Automatic status'): (self.idle_available,
_('Ability to measure idle time, in order to set auto status.'),
_('Requires libxss library.'),
_('Requires python2.5.')),
_('LaTeX'): (self.latex_available,
_('Transform LaTeX expressions between $$ $$.'),
_('Requires texlive-latex-base and (dvipng or ImageMagick). You have to set \'use_latex\' to True in the Advanced Configuration Editor.'),
_('Requires texlive-latex-base and (dvipng or ImageMagick) (All is in MikTeX). You have to set \'use_latex\' to True in the Advanced Configuration Editor.')),
_('End to End message encryption'): (self.pycrypto_available,
_('Encrypting chat messages.'),
_('Requires python-crypto.'),
_('Requires python-crypto.')),
_('RST Generator'): (self.docutils_available,
_('Generate XHTML output from RST code (see http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html).'),
_('Requires python-docutils.'),
_('Requires python-docutils.')),
_('Audio / Video'): (self.farsight_available,
_('Ability to start audio and video chat.'),
_('Requires python-farsight and gstreamer-plugins-bad.'),
_('Feature not available under Windows.')),
}
# name, supported

View File

@ -40,7 +40,8 @@ demandimport.enable()
demandimport.ignore += ['gobject._gobject', 'libasyncns', 'i18n',
'logging.NullHandler', 'dbus.glib', 'dbus.service',
'command_system.implementation.standard', 'OpenSSL.SSL', 'OpenSSL.crypto',
'common.sleepy', 'DLFCN', 'dl', 'xml.sax', 'xml.sax.handler', 'ic']
'common.sleepy', 'DLFCN', 'dl', 'xml.sax', 'xml.sax.handler', 'ic',
'farsight']
import os
import sys