openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #04344
[Merge] lp:~m2j/openlp/work into lp:openlp
m2j has proposed merging lp:~m2j/openlp/work into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Some things from my months old todo list:
- enabling nested docks for more flexible container arrangements
- show the next slide content
- some old UTF8 problems
--
https://code.launchpad.net/~m2j/openlp/work/+merge/39640
Your team OpenLP Core is requested to review the proposed merge of lp:~m2j/openlp/work into lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2010-10-27 17:42:10 +0000
+++ openlp/core/ui/mainwindow.py 2010-10-29 16:22:46 +0000
@@ -73,6 +73,7 @@
MainWindow.setSizePolicy(sizePolicy)
MainIcon = build_icon(u':/icon/openlp-logo-16x16.png')
MainWindow.setWindowIcon(MainIcon)
+ self.setDockNestingEnabled(True)
# Set up the main container, which contains all the other form widgets
self.MainContent = QtGui.QWidget(MainWindow)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2010-10-24 06:26:07 +0000
+++ openlp/core/ui/slidecontroller.py 2010-10-29 16:22:46 +0000
@@ -434,8 +434,12 @@
request = unicode(self.sender().text())
slideno = self.slideList[request]
if slideno > self.PreviewListWidget.rowCount():
- self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount())
+ self.PreviewListWidget.selectRow(
+ self.PreviewListWidget.rowCount() - 1)
else:
+ if slideno + 1 < self.PreviewListWidget.rowCount():
+ self.PreviewListWidget.scrollToItem(
+ self.PreviewListWidget.item(slideno + 1, 0))
self.PreviewListWidget.selectRow(slideno)
self.onSlideSelected()
@@ -527,6 +531,9 @@
log.debug(u'addServiceManagerItem live = %s' % self.isLive)
# If service item is the same as the current on only change slide
if item.__eq__(self.serviceItem):
+ if slideno + 1 < self.PreviewListWidget.rowCount():
+ self.PreviewListWidget.scrollToItem(
+ self.PreviewListWidget.item(slideno + 1, 0))
self.PreviewListWidget.selectRow(slideno)
self.onSlideSelected()
return
@@ -608,8 +615,12 @@
self.PreviewListWidget.setColumnWidth(0,
self.PreviewListWidget.viewport().size().width())
if slideno > self.PreviewListWidget.rowCount():
- self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount())
+ self.PreviewListWidget.selectRow(
+ self.PreviewListWidget.rowCount() - 1)
else:
+ if slideno + 1 < self.PreviewListWidget.rowCount():
+ self.PreviewListWidget.scrollToItem(
+ self.PreviewListWidget.item(slideno + 1, 0))
self.PreviewListWidget.selectRow(slideno)
self.enableToolBar(serviceItem)
# Pass to display for viewing
@@ -668,6 +679,9 @@
[self.serviceItem, self.isLive, index])
self.updatePreview()
else:
+ if index + 1 < self.PreviewListWidget.rowCount():
+ self.PreviewListWidget.scrollToItem(
+ self.PreviewListWidget.item(index + 1, 0))
self.PreviewListWidget.selectRow(index)
self.onSlideSelected()
@@ -799,6 +813,9 @@
"""
The slide has been changed. Update the slidecontroller accordingly
"""
+ if row + 1 < self.PreviewListWidget.rowCount():
+ self.PreviewListWidget.scrollToItem(
+ self.PreviewListWidget.item(row + 1, 0))
self.PreviewListWidget.selectRow(row)
self.updatePreview()
Receiver.send_message(u'slidecontroller_%s_changed' % self.typePrefix,
@@ -844,6 +861,9 @@
else:
Receiver.send_message('servicemanager_next_item')
return
+ if row + 1 < self.PreviewListWidget.rowCount():
+ self.PreviewListWidget.scrollToItem(
+ self.PreviewListWidget.item(row + 1, 0))
self.PreviewListWidget.selectRow(row)
self.onSlideSelected()
@@ -867,6 +887,9 @@
row = self.PreviewListWidget.rowCount() - 1
else:
row = 0
+ if row + 1 < self.PreviewListWidget.rowCount():
+ self.PreviewListWidget.scrollToItem(
+ self.PreviewListWidget.item(row + 1, 0))
self.PreviewListWidget.selectRow(row)
self.onSlideSelected()
=== modified file 'openlp/plugins/custom/forms/editcustomform.py'
--- openlp/plugins/custom/forms/editcustomform.py 2010-10-27 15:30:30 +0000
+++ openlp/plugins/custom/forms/editcustomform.py 2010-10-29 16:22:46 +0000
@@ -162,12 +162,10 @@
sxml.add_verse_to_lyrics(u'custom', unicode(count),
unicode(self.slideListView.item(i).text()))
count += 1
- self.customSlide.title = unicode(self.titleEdit.displayText(), u'utf-8')
+ self.customSlide.title = unicode(self.titleEdit.text())
self.customSlide.text = unicode(sxml.extract_xml(), u'utf-8')
- self.customSlide.credits = unicode(self.creditEdit.displayText(),
- u'utf-8')
- self.customSlide.theme_name = unicode(self.themeComboBox.currentText(),
- u'utf-8')
+ self.customSlide.credits = unicode(self.creditEdit.text())
+ self.customSlide.theme_name = unicode(self.themeComboBox.currentText())
return self.manager.save_object(self.customSlide)
def onUpButtonPressed(self):
Follow ups