From 59a06905fc43f2c7e8b0c51ad4b6782272858bb8 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Thu, 14 Mar 2013 11:46:19 +0100 Subject: [PATCH] added vlc version to exception form --- openlp/core/ui/exceptionform.py | 13 ++++++++++--- openlp/core/ui/media/vlcplayer.py | 8 ++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/openlp/core/ui/exceptionform.py b/openlp/core/ui/exceptionform.py index 373cedaf8..25f8201b1 100644 --- a/openlp/core/ui/exceptionform.py +++ b/openlp/core/ui/exceptionform.py @@ -86,6 +86,11 @@ try: WEBKIT_VERSION = QtWebKit.qWebKitVersion() except AttributeError: WEBKIT_VERSION = u'-' +try: + from openlp.core.ui.media.vlcplayer import VERSION + VLC_VERSION = VERSION +except ImportError: + VLC_VERSION = u'-' from openlp.core.lib import UiStrings, Settings, translate @@ -138,12 +143,15 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog): u'PyEnchant: %s\n' % ENCHANT_VERSION + \ u'PySQLite: %s\n' % SQLITE_VERSION + \ u'Mako: %s\n' % MAKO_VERSION + \ - u'pyUNO bridge: %s\n' % UNO_VERSION + u'pyUNO bridge: %s\n' % UNO_VERSION + \ + u'VLC: %s\n' % VLC_VERSION if platform.system() == u'Linux': if os.environ.get(u'KDE_FULL_SESSION') == u'true': system += u'Desktop: KDE SC\n' elif os.environ.get(u'GNOME_DESKTOP_SESSION_ID'): system += u'Desktop: GNOME\n' + elif os.environ.get(u'DESKTOP_SESSION') == u'xfce': + system += u'Desktop: Xfce\n' return (openlp_version, description, traceback, system, libraries) def on_save_report_button_clicked(self): @@ -182,8 +190,7 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog): def on_send_report_button_clicked(self): """ - Opening systems default email client and inserting exception log and - system informations. + Opening systems default email client and inserting exception log and system information. """ body = translate('OpenLP.ExceptionForm', '*OpenLP Bug Report*\n' diff --git a/openlp/core/ui/media/vlcplayer.py b/openlp/core/ui/media/vlcplayer.py index a3d2036f5..956aaa1e3 100644 --- a/openlp/core/ui/media/vlcplayer.py +++ b/openlp/core/ui/media/vlcplayer.py @@ -58,12 +58,12 @@ except OSError, e: if VLC_AVAILABLE: try: - version = vlc.libvlc_get_version() + VERSION = vlc.libvlc_get_version() except: - version = u'0.0.0' - if LooseVersion(version) < LooseVersion('1.1.0'): + VERSION = u'0.0.0' + if LooseVersion(VERSION) < LooseVersion('1.1.0'): VLC_AVAILABLE = False - log.debug(u'VLC could not be loaded: %s' % version) + log.debug(u'VLC could not be loaded, because the vlc version is to old: %s' % VERSION) AUDIO_EXT = [u'*.mp3', u'*.wav', u'*.wma', u'*.ogg']