From c6afbec8491c6873d56da4da21f97f92b3a59846 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Mon, 13 Jun 2011 19:10:06 +0100 Subject: [PATCH 1/5] Fix names --- openlp/core/ui/aboutdialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/ui/aboutdialog.py b/openlp/core/ui/aboutdialog.py index 7e308e529..3e941c051 100644 --- a/openlp/core/ui/aboutdialog.py +++ b/openlp/core/ui/aboutdialog.py @@ -118,8 +118,8 @@ class Ui_AboutDialog(object): u'Armin "orangeshirt" K\xf6hler', u'Joshua "milleja46" Miller', u'Stevan "StevanP" Pettit', u'Mattias "mahfiaz" P\xf5ldaru', u'Christian "crichter" Richter', u'Philip "Phill" Ridout', - u'Simon "samscudder" Scudder, Jeffrey "whydoubt" Smith', - u'Maikel Stuivenberg Frode "frodus" Woldsund'] + u'Simon "samscudder" Scudder', u'Jeffrey "whydoubt" Smith', + u'Maikel Stuivenberg', u'Frode "frodus" Woldsund'] testers = [u'Philip "Phill" Ridout', u'Wesley "wrst" Stout', u'John "jseagull1" Cegalis (lead)'] packagers = ['Thomas "tabthorpe" Abthorpe (FreeBSD)', From 79c0ef15e028cd6865db81b4c97192b9f630491b Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Mon, 13 Jun 2011 22:49:14 +0200 Subject: [PATCH 2/5] give text edit focus --- openlp/core/ui/servicenoteform.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openlp/core/ui/servicenoteform.py b/openlp/core/ui/servicenoteform.py index 9d75ba780..d361c567e 100644 --- a/openlp/core/ui/servicenoteform.py +++ b/openlp/core/ui/servicenoteform.py @@ -42,6 +42,10 @@ class ServiceNoteForm(QtGui.QDialog): self.setupUi() self.retranslateUi() + def exec_(self): + self.textEdit.setFocus() + return QtGui.QDialog.exec_(self) + def setupUi(self): self.setObjectName(u'serviceNoteEdit') self.dialogLayout = QtGui.QVBoxLayout(self) From 75d89d22b707ad24cacef54a1fbc3fe5d855bd6e Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 14 Jun 2011 07:45:23 +0200 Subject: [PATCH 3/5] Fixed bug #792204: SongShow Plus importer fails to import song. --- openlp/plugins/songs/lib/songshowplusimport.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/songs/lib/songshowplusimport.py b/openlp/plugins/songs/lib/songshowplusimport.py index a2b971510..7f7527c6d 100644 --- a/openlp/plugins/songs/lib/songshowplusimport.py +++ b/openlp/plugins/songs/lib/songshowplusimport.py @@ -165,8 +165,9 @@ class SongShowPlusImport(SongImport): elif blockKey == VERSE_ORDER: verseTag = self.toOpenLPVerseTag(data, True) if verseTag: - self.sspVerseOrderList.append(unicode(verseTag, - u'cp1252')) + if not isinstance(verseTag, unicode): + verseTag = unicode(verseTag, u'cp1252') + self.sspVerseOrderList.append(verseTag) elif blockKey == SONG_BOOK: self.song_book_name = unicode(data, u'cp1252') elif blockKey == SONG_NUMBER: From 45d992e956a9db3cf1ef2942e04340a208c3f0b7 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 14 Jun 2011 08:18:44 +0200 Subject: [PATCH 4/5] Fixed bug #763064: Empty line in first verse prevents saving a song. --- openlp/plugins/songs/forms/editverseform.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/songs/forms/editverseform.py b/openlp/plugins/songs/forms/editverseform.py index 226110840..79b2b295a 100644 --- a/openlp/plugins/songs/forms/editverseform.py +++ b/openlp/plugins/songs/forms/editverseform.py @@ -185,7 +185,14 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog): if self.hasSingleVerse: value = unicode(self.getVerse()[0]) else: - value = self.getVerse()[0].split(u'\n')[1] + log.debug(unicode(self.getVerse()[0]).split(u'\n')) + value = unicode(self.getVerse()[0]).split(u'\n')[1] + if len(value) == 0: + lines = unicode(self.getVerse()[0]).split(u'\n') + index = 2 + while index < len(lines) and len(value) == 0: + value = lines[index] + index += 1 if len(value) == 0: critical_error_message_box( message=translate('SongsPlugin.EditSongForm', From a4c46723a98f6936da2487b965ecb9f81d6d8398 Mon Sep 17 00:00:00 2001 From: "rimach crichter@web.de" Date: Tue, 14 Jun 2011 22:43:02 +0200 Subject: [PATCH 5/5] Head --- openlp/plugins/media/lib/vlcapi.py | 177 ----------------------------- 1 file changed, 177 deletions(-) delete mode 100644 openlp/plugins/media/lib/vlcapi.py diff --git a/openlp/plugins/media/lib/vlcapi.py b/openlp/plugins/media/lib/vlcapi.py deleted file mode 100644 index a44ceeac4..000000000 --- a/openlp/plugins/media/lib/vlcapi.py +++ /dev/null @@ -1,177 +0,0 @@ -# -*- coding: utf-8 -*- -# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 - -############################################################################### -# OpenLP - Open Source Lyrics Projection # -# --------------------------------------------------------------------------- # -# Copyright (c) 2008-2011 Raoul Snyman # -# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan # -# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, # -# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias # -# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, # -# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund # -# --------------------------------------------------------------------------- # -# This program is free software; you can redistribute it and/or modify it # -# under the terms of the GNU General Public License as published by the Free # -# Software Foundation; version 2 of the License. # -# # -# This program is distributed in the hope that it will be useful, but WITHOUT # -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # -# more details. # -# # -# You should have received a copy of the GNU General Public License along # -# with this program; if not, write to the Free Software Foundation, Inc., 59 # -# Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### - -import logging -import sys, os -from datetime import datetime -try: - import vlc - vlc_available = True -except ImportError: - vlc_available = False - -from PyQt4 import QtCore, QtGui -from openlp.core.lib import Receiver -from openlp.plugins.media.lib import MediaAPI, MediaState - -log = logging.getLogger(__name__) - -class VlcAPI(MediaAPI): - """ - Specialiced MediaAPI class - to reflect Features of the Vlc API - """ - def __init__(self, parent): - MediaAPI.__init__(self, parent, u'Vlc') - self.parent = parent - self.video_extensions_list = [ - u'*.3gp' - , u'*.asf', u'*.wmv' - , u'*.au' - , u'*.avi' - , u'*.flv' - , u'*.mov' - , u'*.mp4' - , u'*.ogm', u'*.ogg' - , u'*.mkv', u'*.mka' - , u'*.ts', u'*.mpg' - , u'*.mpg', u'*.mp3', u'*.mp2' - , u'*.nsc' - , u'*.nsv' - , u'*.nut' - , u'*.ra', u'*.ram', u'*.rm', u'*.rv' ,u'*.rmbv' - , u'*.a52', u'*.dts', u'*.aac', u'*.flac' ,u'*.dv', u'*.vid' - , u'*.tta', u'*.tac' - , u'*.ty' - , u'*.wav', u'*.dts' - , u'*.xa' - , u'*.iso' - ] - - def setup_controls(self, controller, control_panel): - pass - - def setup(self, display): - display.vlcWidget = QtGui.QFrame(display) - # creating a basic vlc instance - if display.hasAudio: - display.vlcInstance = vlc.Instance() - else: - display.vlcInstance = vlc.Instance('--no-audio') - display.vlcInstance.set_log_verbosity(2) - # creating an empty vlc media player - display.vlcMediaPlayer = display.vlcInstance.media_player_new() - display.vlcWidget.resize(display.size()) - display.vlcWidget.raise_() - display.vlcWidget.hide() - # the media player has to be 'connected' to the QFrame - # (otherwise a video would be displayed in it's own window) - # this is platform specific! - # you have to give the id of the QFrame (or similar object) to - # vlc, different platforms have different functions for this - if sys.platform == "linux2": # for Linux using the X Server - display.vlcMediaPlayer.set_xwindow(int(display.vlcWidget.winId())) - elif sys.platform == "win32": # for Windows - display.vlcMediaPlayer.set_hwnd(int(display.vlcWidget.winId())) - elif sys.platform == "darwin": # for MacOS - display.vlcMediaPlayer.set_agl(int(display.vlcWidget.winId())) - self.hasOwnWidget = True - - def check_available(self): - return vlc_available - - def load(self, display): - log.debug(u'load vid in Vlc Controller') - controller = display.controller - volume = controller.media_info.volume - file_path = str( - controller.media_info.file_info.absoluteFilePath().toUtf8()) - path = os.path.normcase(file_path) - # create the media - display.vlcMedia = display.vlcInstance.media_new_path(path) - # put the media in the media player - display.vlcMediaPlayer.set_media(display.vlcMedia) - # parse the metadata of the file - display.vlcMedia.parse() - self.volume(display, volume) - return True - - def mediaStateWait(self, display, mediaState): - """ - Wait for the video to change its state - Wait no longer than 5 seconds. - """ - start = datetime.now() - while not mediaState == display.vlcMedia.get_state(): - if display.vlcMedia.get_state() == vlc.State.Error: - return False - Receiver.send_message(u'openlp_process_events') - if (datetime.now() - start).seconds > 5: - return False - return True - - def resize(self, display): - display.vlcWidget.resize(display.size()) - - def play(self, display): - self.set_visible(display, True) - display.vlcMediaPlayer.play() - if self.mediaStateWait(display, vlc.State.Playing): - self.state = MediaState.Playing - - def pause(self, display): - display.vlcMediaPlayer.pause() - if self.mediaStateWait(display, vlc.State.Paused): - self.state = MediaState.Paused - - def stop(self, display): - display.vlcMediaPlayer.stop() - self.state = MediaState.Stopped - - def volume(self, display, vol): - if display.hasAudio: - display.vlcMediaPlayer.audio_set_volume(vol) - - def seek(self, display, seekVal): - if display.vlcMediaPlayer.is_seekable(): - display.vlcMediaPlayer.set_position(seekVal/1000.0) - - def reset(self, display): - display.vlcMediaPlayer.stop() - display.vlcWidget.setVisible(False) - self.state = MediaState.Off - - def set_visible(self, display, status): - if self.hasOwnWidget: - display.vlcWidget.setVisible(status) - - def update_ui(self, display): - controller = display.controller - controller.seekSlider.setMaximum(1000) - if not controller.seekSlider.isSliderDown(): - currentPos = display.vlcMediaPlayer.get_position() * 1000 - controller.seekSlider.setSliderPosition(currentPos)