← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~raoul-snyman/openlp/songmaintenance into lp:openlp

 

Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/songmaintenance into lp:openlp.

Requested reviews:
    openlp.org Core (openlp-core)
-- 
https://code.launchpad.net/~raoul-snyman/openlp/songmaintenance/+merge/11619
Your team openlp.org Core is subscribed to branch lp:openlp.
=== modified file 'copyright.txt'
--- copyright.txt	2008-12-15 13:52:54 +0000
+++ copyright.txt	2009-09-10 16:35:39 +0000
@@ -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
-
-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
-"""
+# 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, Carsten      #
+# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
+# --------------------------------------------------------------------------- #
+# 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                          #
+###############################################################################

=== modified file 'openlp.pyw'
--- openlp.pyw	2009-09-02 20:42:57 +0000
+++ openlp.pyw	2009-09-08 15:21:30 +0000
@@ -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

=== modified file 'openlp/core/lib/baselistwithdnd.py'
--- openlp/core/lib/baselistwithdnd.py	2009-06-27 15:33:03 +0000
+++ openlp/core/lib/baselistwithdnd.py	2009-09-08 15:21:30 +0000
@@ -29,8 +29,8 @@
     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)
 

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2009-09-09 18:09:17 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2009-09-10 18:15:40 +0000
@@ -73,8 +73,16 @@
             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
@@ -333,35 +341,41 @@
         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):

=== modified file 'openlp/plugins/songs/forms/songmaintenancedialog.py'
--- openlp/plugins/songs/forms/songmaintenancedialog.py	2009-07-24 22:13:40 +0000
+++ openlp/plugins/songs/forms/songmaintenancedialog.py	2009-09-10 18:15:40 +0000
@@ -47,7 +47,7 @@
         self.TypeListWidget.setIconSize(QtCore.QSize(112, 100));
         self.TypeListWidget.setMovement(QtGui.QListView.Static);
         self.TypeListWidget.setMaximumWidth(118);
-        self.TypeListWidget.setSpacing(3);
+        self.TypeListWidget.setSpacing(0);
         self.TypeListWidget.setSortingEnabled(False)
         self.TypeListWidget.setUniformItemSizes(True)
         self.TypeListWidget.setObjectName(u'TypeListWidget')


Follow ups