← Back to team overview

openlp-core team mailing list archive

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

 

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

    Requested reviews:
    openlp.org Core (openlp-core)


Amend Audit Menus
Clean up songs and custom
Fix Presentation for Linux users
-- 
https://code.launchpad.net/~trb143/openlp/audit/+merge/12431
Your team openlp.org Core is subscribed to branch lp:openlp.
=== modified file 'openlp.pyw'
--- openlp.pyw	2009-09-20 15:45:33 +0000
+++ openlp.pyw	2009-09-25 16:30:24 +0000
@@ -81,7 +81,6 @@
             self.splash.finish(self.mainWindow)
         return self.exec_()
 
-
 def main():
     """
     The main function which parses command line options and then runs

=== modified file 'openlp/plugins/audit/auditplugin.py'
--- openlp/plugins/audit/auditplugin.py	2009-09-24 04:31:33 +0000
+++ openlp/plugins/audit/auditplugin.py	2009-09-25 16:30:24 +0000
@@ -66,25 +66,57 @@
             The actual **Tools** menu item, so that your actions can
             use it as their parent.
         """
+        self.AuditMenu = QtGui.QMenu(tools_menu)
+        self.AuditMenu.setObjectName(u'AuditMenu')
+        self.AuditMenu.setTitle(
+            translate(u'AuditPlugin', u'&Audit'))
+        #Audit Delete All
+        self.AuditDeleteAll = QtGui.QAction(tools_menu)
+        self.AuditDeleteAll.setText(
+            translate(u'AuditPlugin', u'Au&dit Delete All'))
+        self.AuditDeleteAll.setStatusTip(
+            translate(u'AuditPlugin', u'Deleted all Audit records'))
+        self.AuditDeleteAll.setObjectName(u'AuditDeleteAll')
+        #Audit Delete
+        self.AuditDelete = QtGui.QAction(tools_menu)
+        self.AuditDelete.setText(
+            translate(u'AuditPlugin', u'Audit &Delete'))
+        self.AuditDelete.setStatusTip(
+            translate(u'AuditPlugin', u'Delete all audit data to sepecified date'))
+        self.AuditDelete.setObjectName(u'AuditDelete')
+        #Audit Report
+        self.AuditReport = QtGui.QAction(tools_menu)
+        self.AuditReport.setText(
+            translate(u'AuditPlugin', u'Au&dit &Report'))
+        self.AuditReport.setStatusTip(
+            translate(u'AuditPlugin', u'Generate Reports on Audit Data'))
+        self.AuditReport.setObjectName(u'AuditReport')
+        #Audit activation
         AuditIcon = QtGui.QIcon()
         AuditIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
             QtGui.QIcon.Normal, QtGui.QIcon.Off)
-        self.ToolsAuditItem = QtGui.QAction(tools_menu)
-        self.ToolsAuditItem.setIcon(AuditIcon)
-        self.ToolsAuditItem.setCheckable(True)
-        self.ToolsAuditItem.setChecked(False)
-        self.ToolsAuditItem.setText(translate(u'AuditPlugin', u'A&udit'))
-        self.ToolsAuditItem.setStatusTip(
+        self.AuditStatus = QtGui.QAction(tools_menu)
+        self.AuditStatus.setIcon(AuditIcon)
+        self.AuditStatus.setCheckable(True)
+        self.AuditStatus.setChecked(False)
+        self.AuditStatus.setText(translate(u'AuditPlugin', u'A&udit Status'))
+        self.AuditStatus.setStatusTip(
             translate(u'AuditPlugin', u'Start/Stop live song auditing'))
-        self.ToolsAuditItem.setShortcut(translate(u'AuditPlugin', u'F4'))
-        self.ToolsAuditItem.setObjectName(u'ToolsAuditItem')
-        tools_menu.addSeparator()
-        tools_menu.addAction(self.ToolsAuditItem)
+        self.AuditStatus.setShortcut(translate(u'AuditPlugin', u'F4'))
+        self.AuditStatus.setObjectName(u'AuditStatus')
+        #Add Menus together
+        tools_menu.addAction(self.AuditMenu.menuAction())
+        self.AuditMenu.addAction(self.AuditStatus)
+        self.AuditMenu.addSeparator()
+        self.AuditMenu.addAction(self.AuditDeleteAll)
+        self.AuditMenu.addAction(self.AuditDelete)
+        self.AuditMenu.addSeparator()
+        self.AuditMenu.addAction(self.AuditReport)
         # Signals and slots
-        QtCore.QObject.connect(self.ToolsAuditItem,
+        QtCore.QObject.connect(self.AuditStatus,
             QtCore.SIGNAL(u'visibilityChanged(bool)'),
-            self.ToolsAuditItem.setChecked)
-        QtCore.QObject.connect(self.ToolsAuditItem,
+            self.AuditStatus.setChecked)
+        QtCore.QObject.connect(self.AuditStatus,
             QtCore.SIGNAL(u'triggered(bool)'),
             self.toggleAuditState)
 
@@ -100,7 +132,7 @@
             QtCore.SIGNAL(u'audit_changed'), self.onUpdateAudit)
         self.auditActive = str_to_bool(
             self.config.get_config(u'audit active', False))
-        self.ToolsAuditItem.setChecked(self.auditActive)
+        self.AuditStatus.setChecked(self.auditActive)
         self.auditmanager = AuditManager(self.config)
 
     def toggleAuditState(self):
@@ -130,5 +162,5 @@
         """
         self.auditActive = str_to_bool(
             self.config.get_config(u'audit active', False))
-#        self.ToolsAuditItem.setChecked(self.auditActive)
-        self.ToolsAuditItem.setEnabled(True)
+#        self.AuditStatus.setChecked(self.auditActive)
+        self.AuditStatus.setEnabled(True)

=== modified file 'openlp/plugins/audit/lib/classes.py'
--- openlp/plugins/audit/lib/classes.py	2009-09-24 04:32:24 +0000
+++ openlp/plugins/audit/lib/classes.py	2009-09-25 16:30:24 +0000
@@ -22,7 +22,6 @@
 # Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
 ###############################################################################
 
-
 class BaseModel(object):
     """
     BaseModel provides a base object with a set of generic functions

=== modified file 'openlp/plugins/audit/lib/meta.py'
--- openlp/plugins/audit/lib/meta.py	2009-09-25 00:43:42 +0000
+++ openlp/plugins/audit/lib/meta.py	2009-09-25 16:30:24 +0000
@@ -22,7 +22,6 @@
 # Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
 ###############################################################################
 
-
 from sqlalchemy import MetaData
 
 __all__ = ['session', 'metadata', 'engine']

=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py	2009-09-25 00:43:42 +0000
+++ openlp/plugins/custom/forms/editcustomform.py	2009-09-25 16:30:24 +0000
@@ -200,7 +200,7 @@
     def onSaveButtonPressed(self):
         if self.editAll:
             self.VerseListView.clear()
-            for row in unicode(self.VerseTextEdit.toPlainText()).split(u'---'):
+            for row in unicode(self.VerseTextEdit.toPlainText()).split(u'\n---\n'):
                 self.VerseListView.addItem(row)
         else:
             self.VerseListView.currentItem().setText(
@@ -227,15 +227,13 @@
         self.EditAllButton.setEnabled(True)
 
     def _validate(self):
-        valid = True
-        message = u''
         if len(self.TitleEdit.displayText()) == 0:
-            valid = False
-            message = translate(
+            self.TitleEdit.setFocus()
+            return False, translate(
                 u'customEditDialog', u'You need to enter a title \n')
         # must have 1 slide
         if self.VerseListView.count() == 0:
-            valid = False
-            message += translate(
+            self.VerseTextEdit.setFocus()
+            return False, translate(
                 u'customEditDialog', u'You need to enter a slide \n')
-        return valid, message
+        return True,  u''

=== modified file 'openlp/plugins/presentations/lib/__init__.py'
--- openlp/plugins/presentations/lib/__init__.py	2009-09-24 20:56:13 +0000
+++ openlp/plugins/presentations/lib/__init__.py	2009-09-25 16:30:24 +0000
@@ -31,9 +31,3 @@
 from messagelistener import MessageListener
 from mediaitem import PresentationMediaItem
 from presentationtab import PresentationTab
-
-__all__ = ['PresentationMediaItem', 'PresentationTab',
-    'ImpressController', 'MessageListener']
-if os.name == u'nt':
-    __all__.append('PptviewController')
-    #__all__.append('PowerpointController');

=== modified file 'openlp/plugins/presentations/lib/presentationtab.py'
--- openlp/plugins/presentations/lib/presentationtab.py	2009-09-25 00:43:42 +0000
+++ openlp/plugins/presentations/lib/presentationtab.py	2009-09-25 16:30:24 +0000
@@ -22,6 +22,7 @@
 # Temple Place, Suite 330, Boston, MA 02111-1307 USA                          #
 ###############################################################################
 
+import os
 from PyQt4 import QtGui
 
 from openlp.core.lib import SettingsTab, translate
@@ -60,11 +61,15 @@
         self.VerseTypeLayout.setObjectName(u'VerseTypeLayout')
         self.PowerpointCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
         self.PowerpointCheckBox.setTristate(False)
+        if os.name != u'nt':
+            self.PowerpointCheckBox.setEnabled(False)
         self.PowerpointCheckBox.setObjectName(u'PowerpointCheckBox')
         self.VerseDisplayLayout.addWidget(self.PowerpointCheckBox, 0, 0, 1, 1)
         self.PowerpointViewerCheckBox = QtGui.QCheckBox(
             self.VerseDisplayGroupBox)
         self.PowerpointViewerCheckBox.setTristate(False)
+        if os.name != u'nt':
+            self.PowerpointViewerCheckBox.setEnabled(False)
         self.PowerpointViewerCheckBox.setObjectName(u'PowerpointViewerCheckBox')
         self.VerseDisplayLayout.addWidget(
             self.PowerpointViewerCheckBox, 1, 0, 1, 1)

=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2009-09-25 00:43:42 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2009-09-25 16:30:24 +0000
@@ -334,7 +334,7 @@
             verse_list = self.verse_form.getVerse()
             verse_list = verse_list.replace(u'\r\n', u'\n')
             self.VerseListWidget.clear()
-            for row in verse_list.split(u'---'):
+            for row in verse_list.split(u'\n---\n'):
                 self.VerseListWidget.addItem(row)
         self.VerseListWidget.repaint()
 


Follow ups