fixes for merge

This commit is contained in:
Andreas Preikschat 2010-10-10 17:59:11 +02:00
parent bab38de43e
commit 373597120b
3 changed files with 14 additions and 13 deletions

View File

@ -26,7 +26,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate, SpellTextEdit
from openlp.core.lib import build_icon, translate
class Ui_CustomEditDialog(object):
def setupUi(self, customEditDialog):

View File

@ -75,7 +75,7 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
QtCore.SIGNAL(u'theme_update_list'), self.loadThemes)
# Create other objects and forms.
self.custommanager = custommanager
self.slide_form = EditCustomSlideForm(self)
self.editSlideForm = EditCustomSlideForm(self)
self.initialise()
def onPreview(self, button):
@ -190,16 +190,16 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
self.editButton.setEnabled(True)
def onAddButtonPressed(self):
self.slide_form.setText(u'')
if self.slide_form.exec_():
for slide in self.slide_form.getText():
self.editSlideForm.setText(u'')
if self.editSlideForm.exec_():
for slide in self.editSlideForm.getText():
self.slideListView.addItem(slide)
self.editAllButton.setEnabled(True)
def onEditButtonPressed(self):
self.slide_form.setText(self.slideListView.currentItem().text())
if self.slide_form.exec_():
self.updateSlideList(self.slide_form.getText())
self.editSlideForm.setText(self.slideListView.currentItem().text())
if self.editSlideForm.exec_():
self.updateSlideList(self.editSlideForm.getText())
def onEditAllButtonPressed(self):
"""
@ -212,9 +212,9 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
slide_list += item.text()
if row != self.slideListView.count() - 1:
slide_list += u'\n[---]\n'
self.slide_form.setText(slide_list)
if self.slide_form.exec_():
self.updateSlideList(self.slide_form.getText(), True)
self.editSlideForm.setText(slide_list)
if self.editSlideForm.exec_():
self.updateSlideList(self.editSlideForm.getText(), True)
def updateSlideList(self, slides, edit_all=False):
"""
@ -241,7 +241,7 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
range(0, self.slideListView.count())]
self.slideListView.clear()
old_slides.pop(old_row)
# Insert all slides in the old_slides list, to make the list complete.
# Insert all slides to make the old_slides list complete.
for slide in slides:
old_slides.insert(old_row, slide)
for slide in old_slides:

View File

@ -26,7 +26,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib import translate, SpellTextEdit
class Ui_CustomSlideEditDialog(object):
def setupUi(self, customSlideEditDialog):
@ -39,6 +39,7 @@ class Ui_CustomSlideEditDialog(object):
QtGui.QDialogButtonBox.Save)
self.buttonBox.setObjectName(u'buttonBox')
self.slideTextEdit = QtGui.QTextEdit(customSlideEditDialog)
self.slideTextEdit = SpellTextEdit(self)
self.slideTextEdit.setGeometry(QtCore.QRect(8, 8, 458, 349))
self.slideTextEdit.setObjectName(u'slideTextEdit')
self.splitButton = QtGui.QPushButton(customSlideEditDialog)