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

Proposed by Tim Bentley
Status: Superseded
Proposed branch: lp:~trb143/openlp/audit
Merge into: lp:openlp
Diff against target: None lines
To merge this branch: bzr merge lp:~trb143/openlp/audit

This proposal supersedes a proposal from 2009-09-16.

This proposal has been superseded by a proposal from 2009-09-18.

To post a comment you must log in.
Revision history for this message
Tim Bentley (trb143) wrote : Posted in a previous version of this proposal

It's a new plugin called Audit.
It monitors items added to the live controller and generates as file so song info for ccl reporting.
It can be deactivated totally if not wanted (default position)
It can be stopped from recording if required by the UI.

Still needs work adding location of file and remembering recording state.

Revision history for this message
Raoul Snyman (raoul-snyman) wrote : Posted in a previous version of this proposal

This looks mostly fine, I just would rather you created a menu item somewhere (like in the Tools menu) with a checkable menu item that says "Auditing enabled". You could also just make that an option in the settings dialog. A blank media manager item is a bit silly. Also, then you could add more options to the Audit config dialog for things like filename formatting, file size, file location, and anything else you want.

review: Needs Fixing
Revision history for this message
Jonathan Corwin (j-corwin) wrote :

I haven't looked too closely, but it looks like you're outputting to a comma separated list.
E.g.
openlp/plugins/songs/lib/mediaitem.py
  service_item.audit = u'%s,%s,%s' % (service_item.title, author_list, ccl)

I expect the title and author_list could potentially contain commas also, so it could probably do with quoting the fields, something like the following, unless this is handled elsewhere?

service_item.audit = u'"%s","%s",%s' % (service_item.title.replace(u'"', u'""'), author_list.replace(u'"', u'""'), ccl)

lp:~trb143/openlp/audit updated
552. By Tim Bentley

head

553. By Tim Bentley

Fix data format

554. By Tim Bentley

Fix data format

555. By Tim Bentley

Fix plugin arrays 2

556. By Tim Bentley

updates

557. By Tim Bentley

head

558. By Tim Bentley

Plugin cleanups - Image and Audit

559. By Tim Bentley

Add database to audit

560. By Tim Bentley

head and merge fixes

561. By Tim Bentley

Audit database

562. By Tim Bentley

Audit database

563. By Tim Bentley

Audit database addition

564. By Tim Bentley

Audit database addition built

565. By Tim Bentley

Audit database addition insert 1

566. By Tim Bentley

Audit database addition insert 2

567. By Tim Bentley

Minor changes and clean ups

568. By Tim Bentley

Fix audit to not crash, add copyright to DB and fix CCL

569. By Tim Bentley

Force code to recompile

570. By Tim Bentley

Fix table for null fields

571. By Tim Bentley

Head

572. By Tim Bentley

Remore lines

573. By Tim Bentley

Head

574. By Tim Bentley

Bring Custom and Song editing in line

575. By Tim Bentley

Audit Menus

576. By Tim Bentley

Head

577. By Tim Bentley

Remove Powerpoint for Linux Users

578. By Tim Bentley

Add dialog forms to Audit

579. By Tim Bentley

More audit changes and dynamic image backgrounds

580. By Tim Bentley

Song Plugin Cleanup

581. By Tim Bentley

Plugin standardisation and clanups

582. By Tim Bentley

Head

583. By Tim Bentley

Audit Delete Date cleanup

584. By Tim Bentley

Audit Selective Delete complete

585. By Tim Bentley

translations for OSIS bibles

586. By Tim Bentley

General cleanups Jon missed

587. By Tim Bentley

Bible Plugin visual change and shorten delay

588. By Tim Bentley

Cleanups

589. By Tim Bentley

Head

590. By Tim Bentley

Head

591. By Tim Bentley

Jon missed these

592. By Tim Bentley

head

593. By Tim Bentley

Inspired by Jon

594. By Tim Bentley

Add Jon to about

595. By Tim Bentley

Add comments to correct layout

596. By Tim Bentley

Head

597. By Tim Bentley

Fix order of names

598. By Tim Bentley

Plugin abouts

599. By Tim Bentley

Plugin abouts 2

600. By Tim Bentley

Plugin abouts fixed

601. By Tim Bentley

More Plugin list work

602. By Tim Bentley

head

603. By Tim Bentley

Sort out text display on dialog

604. By Tim Bentley

Update UI

605. By Tim Bentley

Start of Active / Inactive work

606. By Tim Bentley

Plugin List Combo boxhandling finished

607. By Tim Bentley

Audit can now be disabled dynamically

608. By Tim Bentley

Sort out Initialistion order and Plugin Status code

609. By Tim Bentley

Media Itmes now hide them selves correctly

610. By Tim Bentley

Sort out Settings tab items

611. By Tim Bentley

Fix int issue

612. By Tim Bentley

Head

613. By Tim Bentley

Head

614. By Tim Bentley

Cleanup hinding code and move to disable for now

615. By Tim Bentley

New file

616. By Tim Bentley

Clean up disenablement

617. By Tim Bentley

More cleanups, Bibles and media done

618. By Tim Bentley

Songs now play hide and seek

619. By Tim Bentley

Presentations add code but leave for now - Angels fear to tread

620. By Tim Bentley

Fix Bible plugin rendering

621. By Tim Bentley

Bible New features and Clean up

622. By Tim Bentley

More dock hiding work

623. By Tim Bentley

Head

624. By Tim Bentley

More hiding changes

625. By Tim Bentley

Head

626. By Tim Bentley

Plugins now hide and reappear correctly

627. By Tim Bentley

Remove all print statements

628. By Tim Bentley

Theme improvements

629. By Tim Bentley

Latest Version checking added

630. By Tim Bentley

Correct Theme name for Export if default

631. By Tim Bentley

Quick code cleanup and fix test for version checking

632. By Tim Bentley

Servie Manager DnD part 1

633. By Tim Bentley

Servie Manager DnD part 2

634. By Tim Bentley

Audit Cleanup - part 1

635. By Tim Bentley

Small fix ups and corrections. Plugin list obeys can_be_diabled

636. By Tim Bentley

Fixes to last merge request

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/lib/eventreceiver.py'
2--- openlp/core/lib/eventreceiver.py 2009-09-12 17:24:16 +0000
3+++ openlp/core/lib/eventreceiver.py 2009-09-16 18:37:25 +0000
4@@ -78,6 +78,8 @@
5 ``{plugin}_stop``
6 Requests a plugin to handle a stop event
7
8+ ``audit_live``
9+ Sends live song audit requests to the audit component
10 """
11 global log
12 log = logging.getLogger(u'EventReceiver')
13
14=== modified file 'openlp/core/lib/mediamanageritem.py'
15--- openlp/core/lib/mediamanageritem.py 2009-09-12 18:27:17 +0000
16+++ openlp/core/lib/mediamanageritem.py 2009-09-16 04:59:38 +0000
17@@ -178,8 +178,16 @@
18 """
19 # Add a toolbar
20 self.addToolbar()
21- #Allow the plugin to define it's own header
22+ #Allow the plugin to define buttons at start of bar
23 self.addStartHeaderBar()
24+ #Add the middle of the tool bar (pre defined)
25+ self.addMiddleHeaderBar()
26+ #Allow the plugin to define buttons at end of bar
27+ self.addEndHeaderBar()
28+ #Add the list view
29+ self.addListViewToToolBar()
30+
31+ def addMiddleHeaderBar(self):
32 # Create buttons for the toolbar
33 ## File Button ##
34 if self.hasFileIcon:
35@@ -221,8 +229,8 @@
36 translate(self.TranslationContext, u'Add '+self.PluginTextShort+u' To Service'),
37 translate(self.TranslationContext, u'Add the selected item(s) to the service'),
38 u':/system/system_add.png', self.onAddClick, self.PluginTextShort+u'AddItem')
39- #Allow the plugin to define it's own header
40- self.addEndHeaderBar()
41+
42+ def addListViewToToolBar(self):
43 #Add the List widget
44 self.ListView = self.ListViewWithDnD_class()
45 self.ListView.uniformItemSizes = True
46
47=== modified file 'openlp/core/lib/plugin.py'
48--- openlp/core/lib/plugin.py 2009-09-12 17:24:16 +0000
49+++ openlp/core/lib/plugin.py 2009-09-17 18:24:13 +0000
50@@ -166,6 +166,15 @@
51 """
52 pass
53
54+ def add_tools_menu_item(self, tools_menu):
55+ """
56+ Create a menu item and add it to the "Tools" menu.
57+
58+ ``tools_menu``
59+ The Tools menu
60+ """
61+ pass
62+
63 def get_settings_tab(self):
64 """
65 Create a tab for the settings window.
66
67=== modified file 'openlp/core/lib/pluginmanager.py'
68--- openlp/core/lib/pluginmanager.py 2009-09-08 19:58:05 +0000
69+++ openlp/core/lib/pluginmanager.py 2009-09-17 18:24:13 +0000
70@@ -178,6 +178,18 @@
71 if plugin[u'status'] == u'Active':
72 plugin[u'plugin'].add_export_menu_item(export_menu)
73
74+ def hook_tools_menu(self, tools_menu):
75+ """
76+ Loop through all the plugins and give them an opportunity to add an
77+ item to the tools menu.
78+
79+ ``tools_menu``
80+ The Tools menu.
81+ """
82+ for plugin in self.plugins:
83+ if plugin[u'status'] == u'Active':
84+ plugin[u'plugin'].add_tools_menu_item(tools_menu)
85+
86 def initialise_plugins(self):
87 """
88 Loop through all the plugins and give them an opportunity to
89
90=== modified file 'openlp/core/lib/serviceitem.py'
91--- openlp/core/lib/serviceitem.py 2009-09-15 19:06:40 +0000
92+++ openlp/core/lib/serviceitem.py 2009-09-16 04:59:38 +0000
93@@ -58,6 +58,7 @@
94 self.shortname = hostplugin.name
95 self.name = self.plugin.name
96 self.title = u''
97+ self.audit = u''
98 self.items = []
99 self.iconic_representation = None
100 self.raw_slides = None
101@@ -185,7 +186,8 @@
102 u'title':self.title,
103 u'icon':self.icon,
104 u'footer':self.raw_footer,
105- u'type':self.service_item_type
106+ u'type':self.service_item_type,
107+ u'audit':self.audit
108 }
109 oos_data = []
110 if self.service_item_type == ServiceType.Text:
111@@ -218,6 +220,7 @@
112 self.theme = header[u'theme']
113 self.addIcon(header[u'icon'])
114 self.raw_footer = header[u'footer']
115+ self.audit = header[u'audit']
116 if self.service_item_type == ServiceType.Text:
117 for slide in serviceitem[u'serviceitem'][u'data']:
118 self.service_frames.append(slide)
119
120=== modified file 'openlp/core/ui/mainwindow.py'
121--- openlp/core/ui/mainwindow.py 2009-09-12 18:27:17 +0000
122+++ openlp/core/ui/mainwindow.py 2009-09-17 18:24:13 +0000
123@@ -545,6 +545,8 @@
124 self.plugin_manager.hook_import_menu(self.FileImportMenu)
125 # Call the hook method to pull in export menus.
126 self.plugin_manager.hook_export_menu(self.FileExportMenu)
127+ # Call the hook method to pull in tools menus.
128+ self.plugin_manager.hook_tools_menu(self.ToolsMenu)
129 # Call the initialise method to setup plugins.
130 log.info(u'initialise plugins')
131 self.plugin_manager.initialise_plugins()
132
133=== modified file 'openlp/core/ui/slidecontroller.py'
134--- openlp/core/ui/slidecontroller.py 2009-09-18 06:07:10 +0000
135+++ openlp/core/ui/slidecontroller.py 2009-09-18 10:36:32 +0000
136@@ -314,6 +314,7 @@
137 self.onSlideSelected()
138 self.PreviewListWidget.setFocus()
139 log.info(u'Display Rendering took %4s' % (time.time() - before))
140+ Receiver().send_message(u'audit_live', self.serviceitem.audit)
141 log.debug(u'displayServiceManagerItems End')
142
143 #Screen event methods
144@@ -382,22 +383,28 @@
145
146 def onStartLoop(self):
147 """
148- Go to the last slide.
149+ Start the timer loop running and store the timer id
150 """
151 if self.PreviewListWidget.rowCount() > 1:
152 self.timer_id = self.startTimer(int(self.DelaySpinBox.value()) * 1000)
153
154 def onStopLoop(self):
155 """
156- Go to the last slide.
157+ Stop the timer loop running
158 """
159 self.killTimer(self.timer_id)
160
161 def timerEvent(self, event):
162+ """
163+ If the timer event is for this window select next slide
164+ """
165 if event.timerId() == self.timer_id:
166 self.onSlideSelectedNext()
167
168 def onGoLive(self):
169+ """
170+ If preview copy slide item to live
171+ """
172 row = self.PreviewListWidget.currentRow()
173 if row > -1 and row < self.PreviewListWidget.rowCount():
174 self.parent.LiveController.addServiceManagerItem(self.commandItem, row)
175
176=== added directory 'openlp/plugins/audit'
177=== added file 'openlp/plugins/audit/__init__.py'
178--- openlp/plugins/audit/__init__.py 1970-01-01 00:00:00 +0000
179+++ openlp/plugins/audit/__init__.py 2009-09-16 05:01:11 +0000
180@@ -0,0 +1,23 @@
181+# -*- coding: utf-8 -*-
182+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
183+
184+###############################################################################
185+# OpenLP - Open Source Lyrics Projection #
186+# --------------------------------------------------------------------------- #
187+# Copyright (c) 2008-2009 Raoul Snyman #
188+# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
189+# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
190+# --------------------------------------------------------------------------- #
191+# This program is free software; you can redistribute it and/or modify it #
192+# under the terms of the GNU General Public License as published by the Free #
193+# Software Foundation; version 2 of the License. #
194+# #
195+# This program is distributed in the hope that it will be useful, but WITHOUT #
196+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
197+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
198+# more details. #
199+# #
200+# You should have received a copy of the GNU General Public License along #
201+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
202+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
203+###############################################################################
204
205=== added file 'openlp/plugins/audit/auditplugin.py'
206--- openlp/plugins/audit/auditplugin.py 1970-01-01 00:00:00 +0000
207+++ openlp/plugins/audit/auditplugin.py 2009-09-18 10:47:57 +0000
208@@ -0,0 +1,112 @@
209+# -*- coding: utf-8 -*-
210+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
211+
212+###############################################################################
213+# OpenLP - Open Source Lyrics Projection #
214+# --------------------------------------------------------------------------- #
215+# Copyright (c) 2008-2009 Raoul Snyman #
216+# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
217+# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
218+# --------------------------------------------------------------------------- #
219+# This program is free software; you can redistribute it and/or modify it #
220+# under the terms of the GNU General Public License as published by the Free #
221+# Software Foundation; version 2 of the License. #
222+# #
223+# This program is distributed in the hope that it will be useful, but WITHOUT #
224+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
225+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
226+# more details. #
227+# #
228+# You should have received a copy of the GNU General Public License along #
229+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
230+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
231+###############################################################################
232+
233+import logging
234+
235+from PyQt4 import QtCore, QtGui
236+from datetime import date
237+
238+from openlp.core.lib import Plugin, Receiver, translate
239+from openlp.plugins.audit.lib import AuditTab
240+
241+class AuditPlugin(Plugin):
242+ global log
243+ log = logging.getLogger(u'AuditPlugin')
244+ log.info(u'Audit Plugin loaded')
245+
246+ def __init__(self, plugin_helpers):
247+ # Call the parent constructor
248+ Plugin.__init__(self, u'Audit', u'1.9.0', plugin_helpers)
249+ self.weight = -4
250+ # Create the plugin icon
251+ self.icon = QtGui.QIcon()
252+ self.icon.addPixmap(QtGui.QPixmap(u':/media/media_image.png'),
253+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
254+ self.auditfile = None
255+
256+ def check_pre_conditions(self):
257+ """
258+ Check to see if auditing is required
259+ """
260+ log.debug('check_pre_conditions')
261+ #Lets see if audit is required
262+ if int(self.config.get_config(u'startup', 0)) == QtCore.Qt.Checked:
263+ return True
264+ else:
265+ return False
266+
267+ def add_tools_menu_item(self, tools_menu):
268+ """
269+ Give the Audit plugin the opportunity to add items to the
270+ **Tools** menu.
271+
272+ ``tools_menu``
273+ The actual **Tools** menu item, so that your actions can
274+ use it as their parent.
275+ """
276+ AuditIcon = QtGui.QIcon()
277+ AuditIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
278+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
279+ self.ToolsAuditItem = QtGui.QAction(tools_menu)
280+ self.ToolsAuditItem.setIcon(AuditIcon)
281+ self.ToolsAuditItem.setCheckable(True)
282+ self.ToolsAuditItem.setChecked(False)
283+ self.ToolsAuditItem.setText(translate(u'AuditPlugin', u'A&udit'))
284+ self.ToolsAuditItem.setStatusTip(
285+ translate(u'AuditPlugin', u'Start/Stop live song auditing'))
286+ self.ToolsAuditItem.setShortcut(translate(u'AuditPlugin', u'F4'))
287+ self.ToolsAuditItem.setObjectName(u'ToolsAuditItem')
288+ tools_menu.addSeparator()
289+ tools_menu.addAction(self.ToolsAuditItem)
290+ # Signals and slots
291+ QtCore.QObject.connect(self.ToolsAuditItem,
292+ QtCore.SIGNAL(u'visibilityChanged(bool)'),
293+ self.ToolsAuditItem.setChecked)
294+ QtCore.QObject.connect(self.ToolsAuditItem,
295+ QtCore.SIGNAL(u'triggered(bool)'),
296+ self.toggleAuditState)
297+
298+ def get_settings_tab(self):
299+ self.AuditTab = AuditTab()
300+ return self.AuditTab
301+
302+ def initialise(self):
303+ log.info(u'Plugin Initialising')
304+ QtCore.QObject.connect(Receiver.get_receiver(),
305+ QtCore.SIGNAL(u'audit_live'), self.onReceiveAudit)
306+ self.auditFile = open(u'openlp.aud', 'a')
307+ self.auditActive = False
308+
309+ def toggleAuditState(self):
310+ self.auditActive = not self.auditActive
311+
312+ def onReceiveAudit(self, auditData):
313+ if self.auditActive:
314+ self.auditFile.write(u'%s,%s\n' % (date.today(), auditData))
315+ self.auditFile.flush()
316+
317+ def finalise(self):
318+ log.debug(u'Finalise')
319+ if self.auditFile is not None:
320+ self.auditFile.close()
321
322=== added directory 'openlp/plugins/audit/lib'
323=== added file 'openlp/plugins/audit/lib/__init__.py'
324--- openlp/plugins/audit/lib/__init__.py 1970-01-01 00:00:00 +0000
325+++ openlp/plugins/audit/lib/__init__.py 2009-09-17 18:24:13 +0000
326@@ -0,0 +1,25 @@
327+# -*- coding: utf-8 -*-
328+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
329+
330+###############################################################################
331+# OpenLP - Open Source Lyrics Projection #
332+# --------------------------------------------------------------------------- #
333+# Copyright (c) 2008-2009 Raoul Snyman #
334+# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
335+# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
336+# --------------------------------------------------------------------------- #
337+# This program is free software; you can redistribute it and/or modify it #
338+# under the terms of the GNU General Public License as published by the Free #
339+# Software Foundation; version 2 of the License. #
340+# #
341+# This program is distributed in the hope that it will be useful, but WITHOUT #
342+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
343+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
344+# more details. #
345+# #
346+# You should have received a copy of the GNU General Public License along #
347+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
348+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
349+###############################################################################
350+
351+from audittab import AuditTab
352
353=== added file 'openlp/plugins/audit/lib/audittab.py'
354--- openlp/plugins/audit/lib/audittab.py 1970-01-01 00:00:00 +0000
355+++ openlp/plugins/audit/lib/audittab.py 2009-09-16 18:37:25 +0000
356@@ -0,0 +1,70 @@
357+# -*- coding: utf-8 -*-
358+# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
359+
360+###############################################################################
361+# OpenLP - Open Source Lyrics Projection #
362+# --------------------------------------------------------------------------- #
363+# Copyright (c) 2008-2009 Raoul Snyman #
364+# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
365+# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
366+# --------------------------------------------------------------------------- #
367+# This program is free software; you can redistribute it and/or modify it #
368+# under the terms of the GNU General Public License as published by the Free #
369+# Software Foundation; version 2 of the License. #
370+# #
371+# This program is distributed in the hope that it will be useful, but WITHOUT #
372+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
373+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
374+# more details. #
375+# #
376+# You should have received a copy of the GNU General Public License along #
377+# with this program; if not, write to the Free Software Foundation, Inc., 59 #
378+# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
379+###############################################################################
380+
381+from PyQt4 import QtCore, QtGui
382+
383+from openlp.core.lib import SettingsTab, str_to_bool, translate, Receiver
384+
385+class AuditTab(SettingsTab):
386+ """
387+ AuditTab is the Audit settings tab in the settings dialog.
388+ """
389+ def __init__(self):
390+ SettingsTab.__init__(self, translate(u'AuditTab', u'Audit'), u'Audit')
391+
392+ def setupUi(self):
393+ self.setObjectName(u'AuditTab')
394+ self.AuditLayout = QtGui.QFormLayout(self)
395+ self.AuditLayout.setObjectName(u'AuditLayout')
396+ self.AuditModeGroupBox = QtGui.QGroupBox(self)
397+ self.AuditModeGroupBox.setObjectName(u'AuditModeGroupBox')
398+ self.AuditModeLayout = QtGui.QVBoxLayout(self.AuditModeGroupBox)
399+ self.AuditModeLayout.setSpacing(8)
400+ self.AuditModeLayout.setMargin(8)
401+ self.AuditModeLayout.setObjectName(u'AuditModeLayout')
402+ self.AuditPortSpinBox = QtGui.QSpinBox(self.AuditModeGroupBox)
403+ self.AuditPortSpinBox.setObjectName(u'AuditPortSpinBox')
404+ self.AuditPortSpinBox.setMaximum(32767)
405+ self.AuditModeLayout.addWidget(self.AuditPortSpinBox)
406+ self.AuditActive = QtGui.QCheckBox(self.AuditModeGroupBox)
407+ self.AuditActive.setObjectName(u'AuditPortSpinBox')
408+ self.AuditModeLayout.addWidget(self.AuditActive)
409+ self.WarningLabel = QtGui.QLabel(self.AuditModeGroupBox)
410+ self.WarningLabel.setObjectName(u'WarningLabel')
411+ self.AuditModeLayout.addWidget(self.WarningLabel)
412+ self.AuditLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.AuditModeGroupBox)
413+
414+ def retranslateUi(self):
415+ self.AuditModeGroupBox.setTitle(translate(u'AuditTab', u'Audit File'))
416+ self.AuditActive.setText(translate(u'AuditTab', 'Audit available:'))
417+ self.WarningLabel.setText(translate(u'AuditTab', u'A restart is needed for this change to become effective'))
418+
419+ def load(self):
420+ self.AuditPortSpinBox.setValue(int(self.config.get_config(u'Audit port', 4316)))
421+ self.AuditActive.setChecked(int(self.config.get_config(u'startup', 0)))
422+
423+ def save(self):
424+ self.config.set_config(u'Audit port', unicode(self.AuditPortSpinBox.value()))
425+ self.config.set_config(u'startup', unicode(self.AuditActive.checkState()))
426+
427
428=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
429--- openlp/plugins/songs/lib/mediaitem.py 2009-09-16 10:50:13 +0000
430+++ openlp/plugins/songs/lib/mediaitem.py 2009-09-16 19:03:11 +0000
431@@ -269,12 +269,6 @@
432 self.parent.songmanager.delete_song(item_id)
433 row = self.ListView.row(item)
434 self.ListView.takeItem(row)
435-#
436-# def onSongPreviewClick(self):
437-# service_item = ServiceItem(self.parent)
438-# service_item.addIcon(u':/media/media_song.png')
439-# self.generateSlideData(service_item)
440-# self.parent.preview_controller.addServiceItem(service_item)
441
442 def generateSlideData(self, service_item):
443 raw_slides =[]
444@@ -312,16 +306,5 @@
445 raw_footer.append(unicode(
446 translate(u'SongMediaItem', u'CCL Licence: ') + ccl ))
447 service_item.raw_footer = raw_footer
448+ service_item.audit = u'%s,%s,%s' % (service_item.title, author_list, ccl)
449 return True
450-
451-# def onSongLiveClick(self):
452-# service_item = ServiceItem(self.parent)
453-# service_item.addIcon(u':/media/media_song.png')
454-# self.generateSlideData(service_item)
455-# self.parent.live_controller.addServiceItem(service_item)
456-#
457-# def onSongAddClick(self):
458-# service_item = ServiceItem(self.parent)
459-# service_item.addIcon( u':/media/media_song.png')
460-# self.generateSlideData(service_item)
461-# self.parent.service_manager.addServiceItem(service_item)
462
463=== modified file 'resources/images/openlp-2.qrc'
464--- resources/images/openlp-2.qrc 2009-07-24 22:13:40 +0000
465+++ resources/images/openlp-2.qrc 2009-09-16 04:59:38 +0000
466@@ -49,6 +49,10 @@
467 <file>import_remove.png</file>
468 <file>import_load.png</file>
469 </qresource>
470+ <qresource prefix="audit" >
471+ <file>audit_start.png</file>
472+ <file>audit_stop.png</file>
473+ </qresource>
474 <qresource prefix="exports" >
475 <file>export_selectall.png</file>
476 <file>export_remove.png</file>