diff --git a/copyright.txt b/copyright.txt index bee40598c..c2e0c80b1 100644 --- a/copyright.txt +++ b/copyright.txt @@ -1,19 +1,23 @@ # -*- coding: utf-8 -*- -# vim: autoindent shiftwidth=4 expandtab textwidth=80 -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman -Portions copyright (c) 2008 Martin Thompson, Tim Bentley, Carsten Tinggaard +# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -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 -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008 Raoul Snyman # +# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten # +# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg # +# --------------------------------------------------------------------------- # +# 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 # +############################################################################### diff --git a/openlp.pyw b/openlp.pyw index f86fb3269..06edf8d6b 100755 --- a/openlp.pyw +++ b/openlp.pyw @@ -1,25 +1,26 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 -""" -OpenLP - Open Source Lyrics Projection -Copyright (c) 2008 Raoul Snyman - -Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, - -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 -""" +############################################################################### +# OpenLP - Open Source Lyrics Projection # +# --------------------------------------------------------------------------- # +# Copyright (c) 2008 Raoul Snyman # +# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, # +# --------------------------------------------------------------------------- # +# 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 sys import logging, logging.handlers diff --git a/openlp/core/lib/baselistwithdnd.py b/openlp/core/lib/baselistwithdnd.py index 99331126d..e5cdde469 100644 --- a/openlp/core/lib/baselistwithdnd.py +++ b/openlp/core/lib/baselistwithdnd.py @@ -29,8 +29,8 @@ class BaseListWithDnD(QtGui.QListWidget): Please put a short description of what this class does in here. """ - def __init__(self,parent = None): - QtGui.QListWidget.__init__(self,parent) + def __init__(self, parent=None): + QtGui.QListWidget.__init__(self, parent) # this must be set by the class which is inheriting assert(self.PluginName) diff --git a/openlp/plugins/songs/forms/editsongform.py b/openlp/plugins/songs/forms/editsongform.py index 6419e989f..c44131eb6 100644 --- a/openlp/plugins/songs/forms/editsongform.py +++ b/openlp/plugins/songs/forms/editsongform.py @@ -73,8 +73,16 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): QtCore.SIGNAL(u'activated(int)'), self.onThemeComboChanged) QtCore.QObject.connect(self.MaintenanceButton, QtCore.SIGNAL(u'clicked()'), self.onMaintenanceButtonClicked) + QtCore.QObject.connect(self.TitleEditItem, + QtCore.SIGNAL(u'lostFocus()'), self.onTitleEditItemLostFocus) + QtCore.QObject.connect(self.CCLNumberEdit, + QtCore.SIGNAL(u'lostFocus()'), self.onCCLNumberEditLostFocus) QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'update_themes'), self.loadThemes) + QtCore.QObject.connect(self.CommentsEdit, + QtCore.SIGNAL(u'lostFocus()'), self.onCommentsEditLostFocus) + QtCore.QObject.connect(self.VerseOrderEdit, + QtCore.SIGNAL(u'lostFocus()'), self.onVerseOrderEditLostFocus) # Create other objects and forms self.songmanager = songmanager self.parent = parent @@ -322,35 +330,41 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): message = u'' if len(self.TitleEditItem.displayText()) == 0: valid = False - self.TitleEditItem.setStyleSheet(u'background-color: red; color: white') - message = translate(u'SongFormDialog', u'You need to enter a song title \n') - else: - self.TitleEditItem.setStyleSheet(u'') + ##self.TitleEditItem.setStyleSheet(u'background-color: red; color: white') + self.SongTabWidget.setCurrentIndex(0) + self.TitleEditItem.setFocus() + return False, translate(u'SongFormDialog', u'You need to enter a song title.') + #else: + #self.TitleEditItem.setStyleSheet(u'') if self.VerseListWidget.count() == 0: valid = False - self.VerseListWidget.setStyleSheet(u'background-color: red; color: white') - message = message + translate(u'SongFormDialog', u'You need to enter some verse text \n') - else: - self.VerseListWidget.setStyleSheet(u'') + #self.VerseListWidget.setStyleSheet(u'background-color: red; color: white') + self.SongTabWidget.setCurrentIndex(0) + self.VerseListWidget.setFocus() + return False, translate(u'SongFormDialog', u'You need to enter some verses.') + #else: + #self.VerseListWidget.setStyleSheet(u'') if self.AuthorsListView.count() == 0: valid = False - self.AuthorsListView.setStyleSheet(u'background-color: red; color: white') - message = message + translate(u'SongFormDialog', u'You need to provide an author') - else: - self.AuthorsListView.setStyleSheet(u'') - return valid, message + #self.AuthorsListView.setStyleSheet(u'background-color: red; color: white') + self.SongTabWidget.setCurrentIndex(2) + self.AuthorsListView.setFocus() + return False, translate(u'SongFormDialog', u'You need to provide at least one author.') + #else: + #self.AuthorsListView.setStyleSheet(u'') + return valid, message - def on_TitleEditItem_lostFocus(self): + def onTitleEditItemLostFocus(self): self.song.title = self.TitleEditItem.text() self.title_change = True - def on_VerseOrderEdit_lostFocus(self): + def onVerseOrderEditLostFocus(self): self.song.verse_order = self.VerseOrderEdit.text() - def on_CommentsEdit_lostFocus(self): + def onCommentsEditLostFocus(self): self.song.comments = self.CommentsEdit.text() - def on_CCLNumberEdit_lostFocus(self): + def onCCLNumberEditLostFocus(self): self.song.ccli_number = self.CCLNumberEdit.text() def onCopyrightInsertButtonTriggered(self):