[Openlp-core] [Merge] lp:~trb143/openlp/fixes into lp:openlp updated

2009-10-25 Thread Tim Bentley
The proposal to merge lp:~trb143/openlp/fixes into lp:openlp has been updated.

Status: Needs review = Superseded
-- 
https://code.launchpad.net/~trb143/openlp/fixes/+merge/13899
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~trb143/openlp/fixes into lp:openlp

2009-10-25 Thread Tim Bentley
Tim Bentley has proposed merging lp:~trb143/openlp/fixes into lp:openlp.

Requested reviews:
OpenLP Core (openlp-core)

-- 
https://code.launchpad.net/~trb143/openlp/fixes/+merge/13911
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp-1to2-converter.py' (properties changed: -x to +x)
--- openlp-1to2-converter.py	2009-10-24 07:14:11 +
+++ openlp-1to2-converter.py	2009-10-25 08:15:23 +
@@ -25,7 +25,13 @@
 
 import sys
 import os
-import sqlite
+try:
+import sqlite
+except:
+try:
+import pysqlite2
+except:
+print 'No Sqlite2 package available'
 import sqlite3
 import re
 from optparse import OptionParser

=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py	2009-10-17 05:47:17 +
+++ openlp/core/lib/eventreceiver.py	2009-10-25 08:15:23 +
@@ -86,6 +86,13 @@
 
 ``config_updated``
 Informs components the config has changed
+
+``edit_song``
+Requests the current song on the preview display be loaded for edit
+
+``preview_song``
+Tells the song plugin the edit has finished and the song can be previewed
+Only available if the edit was triggered by the Preview button.
 
 global log
 log = logging.getLogger(u'EventReceiver')

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2009-10-24 16:40:36 +
+++ openlp/core/ui/slidecontroller.py	2009-10-25 08:15:23 +
@@ -97,6 +97,8 @@
 ]
 self.timer_id = 0
 self.commandItem = None
+self.songEdit = False
+self.row = 0
 self.Panel = QtGui.QWidget(parent.ControlSplitter)
 # Layout for holding panel
 self.PanelLayout = QtGui.QVBoxLayout(self.Panel)
@@ -180,6 +182,7 @@
 self.Toolbar.addToolbarWidget(
 u'Image SpinBox', self.DelaySpinBox)
 self.DelaySpinBox.setSuffix(self.trUtf8(u's'))
+self.DelaySpinBox.setToolTip(self.trUtf8(u'Delay between slides in seconds'))
 
 self.ControllerLayout.addWidget(self.Toolbar)
 # Screen preview area
@@ -289,7 +292,12 @@
 Receiver().send_message(u'%s_start' % item.name.lower(), \
 [item.shortname, item.service_item_path,
 item.service_frames[0][u'title']])
-self.displayServiceManagerItems(item, 0)
+slideno = 0
+if self.songEdit:
+slideno = self.row
+self.songEdit = False
+self.displayServiceManagerItems(item, slideno)
+
 
 def addServiceManagerItem(self, item, slideno):
 
@@ -297,7 +305,7 @@
 request the correct the toolbar of the plugin
 Called by ServiceManager
 
-log.debug(u'addServiceItem')
+log.debug(u'addServiceManagerItem')
 #If old item was a command tell it to stop
 if self.commandItem is not None and \
 self.commandItem.service_item_type == ServiceType.Command:
@@ -387,12 +395,13 @@
 if this is the Live Controller also display on the screen
 
 row = self.PreviewListWidget.currentRow()
+self.row = 0
 if row  -1 and row  self.PreviewListWidget.rowCount():
 if self.commandItem.service_item_type == ServiceType.Command:
 Receiver().send_message(u'%s_slide'% self.commandItem.name.lower(), [row])
-QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
+if isLive:
+QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
 else:
-#label = self.PreviewListWidget.cellWidget(row, 0)
 frame = self.serviceitem.frames[row][u'image']
 before = time.time()
 if frame is None:
@@ -401,6 +410,7 @@
 log.info(u'Slide Rendering took %4s' % (time.time() - before))
 if self.isLive:
 self.parent.mainDisplay.frameView(frame)
+self.row = row
 
 def grabMainDisplay(self):
 winid = QtGui.QApplication.desktop().winId()
@@ -474,6 +484,7 @@
 self.onSlideSelectedNext()
 
 def onEditSong(self):
+self.songEdit = True
 Receiver().send_message(u'edit_song')
 
 def onGoLive(self):

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2009-10-24 16:40:36 +
+++ openlp/plugins/songs/lib/mediaitem.py	2009-10-25 08:15:23 +
@@ -125,7 +125,7 @@
 QtCore.QObject.connect(Receiver.get_receiver(),
 QtCore.SIGNAL(u'edit_song'), self.onEventEditSong)
 QtCore.QObject.connect(Receiver.get_receiver(),
-QtCore.SIGNAL(u'proview_song'), self.onPreviewClick)
+QtCore.SIGNAL(u'preview_song'), self.onPreviewClick)
 
 def configUpdated(self):
 self.searchAsYouType = str_to_bool(
@@ -181,7 +181,6 @@
 if song.id == self.fromPreview:
 

Re: [Openlp-core] [Merge] lp:~j-corwin/openlp/present into lp:openlp

2009-10-25 Thread Raoul Snyman
Review: Approve
Please leave a blank line open at the end of the file.
-- 
https://code.launchpad.net/~j-corwin/openlp/present/+merge/13902
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~trb143/openlp/fixes into lp:openlp updated

2009-10-25 Thread noreply
The proposal to merge lp:~trb143/openlp/fixes into lp:openlp has been updated.

Status: Needs review = Merged
-- 
https://code.launchpad.net/~trb143/openlp/fixes/+merge/13911
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~j-corwin/openlp/present into lp:openlp updated

2009-10-25 Thread noreply
The proposal to merge lp:~j-corwin/openlp/present into lp:openlp has been 
updated.

Status: Needs review = Merged
-- 
https://code.launchpad.net/~j-corwin/openlp/present/+merge/13902
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~trb143/openlp/fixes into lp:openlp

2009-10-25 Thread Tim Bentley
Tim Bentley has proposed merging lp:~trb143/openlp/fixes into lp:openlp.

Requested reviews:
OpenLP Core (openlp-core)


Clean up conversion code changed in error
More audit work but still incomplete
New Context menu for ServiveItems allowing themes to the changed at run time. 
Handles reload of themes from ThemeManager as well

-- 
https://code.launchpad.net/~trb143/openlp/fixes/+merge/13917
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp-1to2-converter.py'
--- openlp-1to2-converter.py	2009-10-24 19:43:16 +
+++ openlp-1to2-converter.py	2009-10-25 16:35:19 +
@@ -25,13 +25,7 @@
 
 import sys
 import os
-try:
-import sqlite
-except:
-try:
-import pysqlite2
-except:
-print 'No Sqlite2 package available'
+import sqlite
 import sqlite3
 import re
 from optparse import OptionParser

=== modified file 'openlp/core/lib/__init__.py'
--- openlp/core/lib/__init__.py	2009-10-01 23:43:16 +
+++ openlp/core/lib/__init__.py	2009-10-25 16:35:19 +
@@ -110,12 +110,21 @@
 Utility method to help build context menus for plugins
 
 action = QtGui.QAction(text, base)
+if icon is not None:
+action.setIcon(buildIcon(icon))
+QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
+return action
+
+def contextMenu(base, icon, text):
+
+Utility method to help build context menus for plugins
+
+action = QtGui.QMenu(text, base)
 action.setIcon(buildIcon(icon))
-QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
 return action
 
 def contextMenuSeparator(base):
-action = QtGui.QAction(, base)
+action = QtGui.QAction(u'', base)
 action.setSeparator(True)
 return action
 

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2009-10-24 16:40:36 +
+++ openlp/core/ui/servicemanager.py	2009-10-25 16:35:19 +
@@ -30,7 +30,7 @@
 
 from PyQt4 import QtCore, QtGui
 from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, \
-ServiceType, contextMenuAction, contextMenuSeparator, Receiver
+ServiceType, contextMenuAction, contextMenuSeparator, Receiver, contextMenu
 
 class ServiceManagerList(QtGui.QTreeWidget):
 
@@ -168,6 +168,12 @@
 self.ServiceManagerList.addAction(contextMenuAction(
 self.ServiceManagerList, ':/services/service_delete',
 self.trUtf8(u'Remove from Service'), self.onDeleteFromService))
+self.ServiceManagerList.addAction(contextMenuSeparator(
+self.ServiceManagerList))
+self.ThemeMenu = contextMenu(
+self.ServiceManagerList, '',
+self.trUtf8(u'Change Item Theme'))
+self.ServiceManagerList.addAction(self.ThemeMenu.menuAction())
 self.Layout.addWidget(self.ServiceManagerList)
 # Add the bottom toolbar
 self.OrderToolbar = OpenLPToolbar(self)
@@ -602,9 +608,15 @@
 
 
 self.ThemeComboBox.clear()
+self.ThemeMenu.clear()
 self.ThemeComboBox.addItem(u'')
 for theme in theme_list:
 self.ThemeComboBox.addItem(theme)
+action = contextMenuAction(
+self.ServiceManagerList,
+None,
+theme , self.onThemeChangeAction)
+self.ThemeMenu.addAction(action)
 id = self.ThemeComboBox.findText(self.service_theme,
 QtCore.Qt.MatchExactly)
 # Not Found
@@ -614,3 +626,9 @@
 self.ThemeComboBox.setCurrentIndex(id)
 self.parent.RenderManager.set_service_theme(self.service_theme)
 self.regenerateServiceItems()
+
+def onThemeChangeAction(self):
+theme = unicode(self.sender().text())
+item, count = self.findServiceItem()
+self.serviceItems[item][u'data'].theme = theme
+self.regenerateServiceItems()

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2009-10-24 16:40:36 +
+++ openlp/core/ui/thememanager.py	2009-10-25 16:35:19 +
@@ -198,7 +198,7 @@
 return
 theme = unicode(item.data(QtCore.Qt.UserRole).toString())
 path = QtGui.QFileDialog.getExistingDirectory(self,
-self.trUtf8(u'Save Theme - (%s)') %  theme,
+unicode(self.trUtf8(u'Save Theme - (%s)')) %  theme,
 self.config.get_last_dir(1) )
 path = unicode(path)
 if path != u'':

=== modified file 'openlp/plugins/audit/auditplugin.py'
--- openlp/plugins/audit/auditplugin.py	2009-10-24 16:40:36 +
+++ openlp/plugins/audit/auditplugin.py	2009-10-25 16:35:19 +
@@ -160,6 +160,7 @@
 self.auditdeleteform.exec_()
 
 def onAuditReport(self):
+self.auditdetailform.initialise()
 self.auditdetailform.exec_()
 
 def about(self):

=== modified file 'openlp/plugins/audit/forms/auditdetailform.py'
--- openlp/plugins/audit/forms/auditdetailform.py	2009-10-19 14:56:44 +
+++ 

Re: [Openlp-core] [Merge] lp:~trb143/openlp/fixes into lp:openlp

2009-10-25 Thread Raoul Snyman
Review: Approve

-- 
https://code.launchpad.net/~trb143/openlp/fixes/+merge/13917
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~trb143/openlp/fixes into lp:openlp updated

2009-10-25 Thread noreply
The proposal to merge lp:~trb143/openlp/fixes into lp:openlp has been updated.

Status: Needs review = Merged
-- 
https://code.launchpad.net/~trb143/openlp/fixes/+merge/13921
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/i18n into lp:openlp

2009-10-25 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/i18n into lp:openlp.

Requested reviews:
OpenLP Core (openlp-core)


Fixed up some i18n issues.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/i18n/+merge/13925
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/amendthemeform.py'
--- openlp/core/ui/amendthemeform.py	2009-10-24 16:40:36 +
+++ openlp/core/ui/amendthemeform.py	2009-10-25 21:45:25 +
@@ -674,10 +674,10 @@
  self.theme.font_main_italics)# italic
 mainFont.setPixelSize(int(self.theme.font_main_proportion))
 metrics = QtGui.QFontMetrics(mainFont)
-page_length = (int(self.FontMainHeightSpinBox.value()) / metrics.height() - 2 ) - 1
-log.debug(u'Page Length  area height %s , metrics %s , lines %s' %
-  (int(self.FontMainHeightSpinBox.value()), metrics.height(), page_length ))
-self.FontMainLinesPageLabel.setText(
-self.trUtf8((u'Slide Height is %s rows') % page_length))
+page_length = (int(self.FontMainHeightSpinBox.value()) / metrics.height() - 2) - 1
+log.debug(u'Page Length area height %s, metrics %s, lines %s' %
+  (int(self.FontMainHeightSpinBox.value()), metrics.height(), page_length))
+page_length_text = unicode(self.trUtf8(u'Slide Height is %s rows'))
+self.FontMainLinesPageLabel.setText(page_length_text % page_length)
 frame = self.thememanager.generateImage(theme)
 self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame))

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2009-10-24 16:40:36 +
+++ openlp/core/ui/mainwindow.py	2009-10-25 21:45:25 +
@@ -528,10 +528,11 @@
 applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0-595')
 version = check_latest_version(self.generalConfig, applicationVersion)
 if applicationVersion != version:
+version_text = unicode(self.trUtf8(u'OpenLP version %s has been updated '
+u'to version %s'))
 QtGui.QMessageBox.question(None,
-self.trUtf8(u'OpenLP version Updated'),
-self.trUtf8(u'OpenLP version %s has been updated to version %s')
-% (applicationVersion, version),
+self.trUtf8(u'OpenLP Version Updated'),
+version_text % (applicationVersion, version),
 QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
 QtGui.QMessageBox.Ok)
 self.generalConfig.set_config(u'Application version', version)

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bitsandbobs into lp:openlp

2009-10-25 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bitsandbobs into 
lp:openlp.

Requested reviews:
OpenLP Core (openlp-core)


Removed QLabel for text items in the slide controller, and tweaked the resizing 
slightly.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bitsandbobs/+merge/13926
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py	2009-10-17 19:13:11 +
+++ openlp/core/lib/plugin.py	2009-10-25 21:50:22 +
@@ -129,7 +129,8 @@
 self.settings = plugin_helpers[u'settings']
 self.mediadock = plugin_helpers[u'toolbox']
 QtCore.QObject.connect(Receiver.get_receiver(),
-QtCore.SIGNAL(u'%s_add_service_item'% self.name), self.process_add_service_event)
+QtCore.SIGNAL(u'%s_add_service_item'% self.name),
+self.process_add_service_event)
 
 def check_pre_conditions(self):
 

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2009-10-25 14:39:45 +
+++ openlp/core/ui/slidecontroller.py	2009-10-25 21:50:22 +
@@ -28,14 +28,6 @@
 from PyQt4 import QtCore, QtGui
 from openlp.core.lib import OpenLPToolbar, Receiver, ServiceType
 
-label_stylesheet = u
-QTableWidget::item:selected
-{
-background-color: %s;
-}
-
-
-
 class SlideList(QtGui.QTableWidget):
 
 Customised version of QTableWidget which can respond to keyboard
@@ -44,12 +36,6 @@
 def __init__(self, parent=None, name=None):
 QtGui.QTableWidget.__init__(self, parent.Controller)
 self.parent = parent
-text_color = QtGui.QApplication.palette().color(QtGui.QPalette.Base)
-if text_color.value()  128:
-text_color = text_color.darker(120).name()
-else:
-text_color = text_color.lighter(120).name()
-self.setStyleSheet(label_stylesheet % text_color)
 
 def keyPressEvent(self, event):
 if type(event) == QtGui.QKeyEvent:
@@ -336,22 +322,24 @@
 self.PreviewListWidget.setRowCount(
 self.PreviewListWidget.rowCount() + 1)
 item = QtGui.QTableWidgetItem()
-label = QtGui.QLabel()
-label.setMargin(4)
+slide_height = 0
 #It is a Image
 if frame[u'text'] is None:
+label = QtGui.QLabel()
+label.setMargin(4)
 pixmap = self.parent.RenderManager.resize_image(frame[u'image'])
 label.setScaledContents(True)
 label.setPixmap(QtGui.QPixmap.fromImage(pixmap))
+self.PreviewListWidget.setCellWidget(framenumber, 0, label)
 slide_height = self.settingsmanager.slidecontroller_image * \
 self.parent.RenderManager.screen_ratio
 else:
-label.setText(frame[u'text'])
-label.setAlignment(QtCore.Qt.AlignHCenter)
-slide_height = label.sizeHint().height()
-self.PreviewListWidget.setCellWidget(framenumber, 0, label)
+item.setText(frame[u'text'])
 self.PreviewListWidget.setItem(framenumber, 0, item)
-self.PreviewListWidget.setRowHeight(framenumber, slide_height)
+if slide_height != 0:
+self.PreviewListWidget.setRowHeight(framenumber, slide_height)
+if self.serviceitem.frames[0][u'text'] is not None:
+self.PreviewListWidget.resizeRowsToContents()
 self.PreviewListWidget.setColumnWidth(
 0, self.PreviewListWidget.viewport().size().width())
 if slideno  self.PreviewListWidget.rowCount():
@@ -427,11 +415,11 @@
 winid = QtGui.QApplication.desktop().winId()
 rect = rm.screen_list[rm.current_display][u'size']
 winimg = QtGui.QPixmap.grabWindow(winid, rect.x(), rect.y(), rect.width(), rect.height())
-self.SlidePreview.setPixmap(winimg)
+self.SlidePreview.setPixmap(winimg)
 else:
 label = self.PreviewListWidget.cellWidget(self.PreviewListWidget.currentRow(), 0)
 self.SlidePreview.setPixmap(label.pixmap())
-
+
 def onSlideSelectedNext(self):
 
 Go to the next slide.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/bitsandbobs into lp:openlp

2009-10-25 Thread Tim Bentley
Review: Approve
Approved
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bitsandbobs/+merge/13926
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/bitsandbobs into lp:openlp updated

2009-10-25 Thread noreply
The proposal to merge lp:~raoul-snyman/openlp/bitsandbobs into lp:openlp has 
been updated.

Status: Needs review = Merged
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bitsandbobs/+merge/13926
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/i18n into lp:openlp updated

2009-10-25 Thread noreply
The proposal to merge lp:~raoul-snyman/openlp/i18n into lp:openlp has been 
updated.

Status: Needs review = Merged
-- 
https://code.launchpad.net/~raoul-snyman/openlp/i18n/+merge/13925
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp