← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/futures into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/futures into lp:openlp.

    Requested reviews:
    OpenLP Core (openlp-core)

-- 
https://code.launchpad.net/~trb143/openlp/futures/+merge/20268
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2010-02-09 16:09:57 +0000
+++ openlp/core/ui/slidecontroller.py	2010-02-27 10:13:18 +0000
@@ -144,6 +144,7 @@
         self.PreviewListWidget.setEditTriggers(
             QtGui.QAbstractItemView.NoEditTriggers)
         self.PreviewListWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+        self.PreviewListWidget.setAlternatingRowColors(True)
         self.ControllerLayout.addWidget(self.PreviewListWidget)
         # Build the full toolbar
         self.Toolbar = OpenLPToolbar(self)

=== modified file 'openlp/plugins/bibles/lib/common.py'
--- openlp/plugins/bibles/lib/common.py	2010-02-06 16:23:47 +0000
+++ openlp/plugins/bibles/lib/common.py	2010-02-27 10:13:18 +0000
@@ -166,8 +166,6 @@
     """
     A common ancestor for bible download sites.
     """
-    global log
-    log = logging.getLogger(u'BibleCommon')
     log.info(u'BibleCommon')
 
     def _get_web_text(self, urlstring, proxyurl):

=== modified file 'openlp/plugins/bibles/lib/db.py'
--- openlp/plugins/bibles/lib/db.py	2010-02-06 15:33:23 +0000
+++ openlp/plugins/bibles/lib/db.py	2010-02-27 10:13:18 +0000
@@ -59,7 +59,7 @@
         ``config``
             The configuration object, passed in from the plugin.
         """
-        log.info(u'BibleDBimpl loaded')
+        log.info(u'BibleDB loaded')
         QtCore.QObject.__init__(self)
         if u'path' not in kwargs:
             raise KeyError(u'Missing keyword argument "path".')

=== modified file 'openlp/plugins/bibles/lib/http.py'
--- openlp/plugins/bibles/lib/http.py	2010-02-06 10:42:47 +0000
+++ openlp/plugins/bibles/lib/http.py	2010-02-27 10:13:18 +0000
@@ -35,6 +35,8 @@
 from db import BibleDB
 from openlp.plugins.bibles.lib.models import Book
 
+log = logging.getLogger(__name__)
+
 class HTTPBooks(object):
     cursor = None
 
@@ -119,9 +121,7 @@
 
 
 class BGExtract(BibleCommon):
-    global log
-    log = logging.getLogger(u'BibleHTTPMgr(BG_extract)')
-    log.info(u'BG_extract loaded')
+    log.info(u'%s BGExtract loaded', __name__)
 
     def __init__(self, proxyurl=None):
         log.debug(u'init %s', proxyurl)
@@ -184,7 +184,7 @@
         return SearchResults(bookname, chapter, bible)
 
 class CWExtract(BibleCommon):
-    log.info(u'%s loaded', __name__)
+    log.info(u'%s CWExtract loaded', __name__)
 
     def __init__(self, proxyurl=None):
         log.debug(u'init %s', proxyurl)
@@ -229,7 +229,7 @@
 
 
 class HTTPBible(BibleDB):
-    log.info(u'%s loaded', __name__)
+    log.info(u'%s HTTPBible loaded' , __name__)
 
     def __init__(self, parent, **kwargs):
         """

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2010-02-26 12:18:01 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2010-02-27 10:13:18 +0000
@@ -43,7 +43,6 @@
     def resizeEvent(self, event):
         self.parent.onListViewResize(event.size().width(), event.size().width())
 
-
 class BibleMediaItem(MediaManagerItem):
     """
     This is the custom media manager item for Bibles.
@@ -435,7 +434,7 @@
         raw_slides = []
         raw_footer = []
         bible_text = u''
-        self.service_item.autoPreviewAllowed = True
+        service_item.autoPreviewAllowed = True
         #If we want to use a 2nd translation / version
         bible2 = u''
         if self.SearchTabWidget.currentIndex() == 0:
@@ -471,12 +470,12 @@
                 verse_text = self.formatVerse(old_chapter, chapter, verse, u'', u'')
             old_chapter = chapter
             footer = u'%s (%s %s)' % (book, version, copyright)
-            #If not found throws and error so add.s
+            #If not found add to footer
             if footer not in raw_footer:
                 raw_footer.append(footer)
             if bible2:
                 footer = u'%s (%s %s)' % (book, version, copyright)
-                #If not found throws and error so add.s
+                #If not found add to footer
                 if footer not in raw_footer:
                     raw_footer.append(footer)
                 bible_text = u'%s %s \n\n %s %s' % \

=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py	2010-02-26 12:18:01 +0000
+++ openlp/plugins/custom/lib/mediaitem.py	2010-02-27 10:13:18 +0000
@@ -144,7 +144,7 @@
             item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
         else:
             item_id = self.remoteCustom
-        self.service_item.autoPreviewAllowed = True
+        service_item.autoPreviewAllowed = True
         customSlide = self.parent.custommanager.get_custom(item_id)
         title = customSlide.title
         credit = customSlide.credits

=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py	2010-02-26 12:18:01 +0000
+++ openlp/plugins/images/lib/mediaitem.py	2010-02-27 10:13:18 +0000
@@ -144,7 +144,7 @@
         items = self.ListView.selectedIndexes()
         if items:
             service_item.title = self.trUtf8('Image(s)')
-            self.service_item.autoPreviewAllowed = True
+            service_item.autoPreviewAllowed = True
             for item in items:
                 bitem = self.ListView.item(item.row())
                 filename = unicode((bitem.data(QtCore.Qt.UserRole)).toString())

=== modified file 'openlp/plugins/media/lib/mediaitem.py'
--- openlp/plugins/media/lib/mediaitem.py	2010-02-16 18:51:41 +0000
+++ openlp/plugins/media/lib/mediaitem.py	2010-02-27 10:13:18 +0000
@@ -30,6 +30,8 @@
 
 from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon
 
+log = logging.getLogger(__name__)
+
 class MediaListView(BaseListWithDnD):
     def __init__(self, parent=None):
         self.PluginName = u'Media'
@@ -39,9 +41,7 @@
     """
     This is the custom media manager item for Media Slides.
     """
-    global log
-    log = logging.getLogger(u'MediaMediaItem')
-    log.info(u'Media Media Item loaded')
+    log.info(u'%s MediaMediaItem loaded', __name__)
 
     def __init__(self, parent, icon, title):
         self.PluginNameShort = u'Media'

=== modified file 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/media/mediaplugin.py	2010-02-06 10:33:33 +0000
+++ openlp/plugins/media/mediaplugin.py	2010-02-27 10:13:18 +0000
@@ -27,11 +27,12 @@
 
 from openlp.core.lib import Plugin, build_icon, PluginStatus
 from openlp.plugins.media.lib import MediaMediaItem
+from PyQt4.phonon import Phonon
+
+log = logging.getLogger(__name__)
 
 class MediaPlugin(Plugin):
-    global log
-    log = logging.getLogger(u'MediaPlugin')
-    log.info(u'Media Plugin loaded')
+    log.info(u'%s MediaPlugin loaded', __name__)
 
     def __init__(self, plugin_helpers):
         Plugin.__init__(self, u'Media', u'1.9.1', plugin_helpers)
@@ -40,6 +41,9 @@
         # passed with drag and drop messages
         self.dnd_id = u'Media'
         self.status = PluginStatus.Active
+#        print Phonon.BackendCapabilities.availableMimeTypes()
+#        for mimetype in Phonon.BackendCapabilities.availableMimeTypes():
+#            print mimetype
 
     def initialise(self):
         log.info(u'Plugin Initialising')

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2010-02-09 16:09:57 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2010-02-27 10:13:18 +0000
@@ -33,13 +33,13 @@
 from openlp.plugins.songs.lib.models import Song
 from editsongdialog import Ui_EditSongDialog
 
+log = logging.getLogger(__name__)
+
 class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
     """
     Class to manage the editing of a song
     """
-    global log
-    log = logging.getLogger(u'EditSongForm')
-    log.info(u'Song Editor loaded')
+    log.info(u'%s EditSongForm loaded', __name__)
 
     def __init__(self, songmanager, parent=None):
         """

=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py	2009-12-31 12:52:01 +0000
+++ openlp/plugins/songs/forms/editverseform.py	2010-02-27 10:13:18 +0000
@@ -77,6 +77,8 @@
     def setVerse(self, text, verseCount=0, single=False, tag=u'Verse:1'):
         posVerse = 0
         posSub = 0
+        if len(text) == 0:
+            text = u'---[Verse:1]---\n'
         if single:
             id = tag.split(u':')
             posVerse = self.VerseListComboBox.findText(id[0], QtCore.Qt.MatchExactly)
@@ -112,6 +114,7 @@
         self.VerseTextEdit.setPlainText(text)
         self.VerseTextEdit.setFocus(QtCore.Qt.OtherFocusReason)
         self.onVerseComboChanged(0)
+        self.VerseTextEdit.moveCursor(QtGui.QTextCursor.Down)
 
     def getVerse(self):
        return self.VerseTextEdit.toPlainText(), \
@@ -119,11 +122,14 @@
             unicode(self.SubVerseListComboBox.currentText())
 
     def getVerseAll(self):
-       return self.VerseTextEdit.toPlainText()
+        text = self.VerseTextEdit.toPlainText()
+        if not text.startsWith(u'---['):
+            text = u'---[Verse:1]---\n%s' % text
+        return text
 
     def onVerseComboChanged(self, id):
         if unicode(self.VerseListComboBox.currentText()) == u'Verse':
             self.SubVerseListComboBox.setEnabled(True)
         else:
             self.SubVerseListComboBox.setEnabled(False)
-            self.SubVerseListComboBox.setCurrentIndex(0)
\ No newline at end of file
+            self.SubVerseListComboBox.setCurrentIndex(0)


Follow ups