- When creating/editing a custom slide give the title edit the focus (and not only when creating a new)

- fixed long lines
- simplification

bzr-revno: 1670
This commit is contained in:
Andreas Preikschat 2011-06-30 16:59:30 +02:00
commit a60fc8ea23
2 changed files with 6 additions and 6 deletions

View File

@ -93,7 +93,6 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
self.titleEdit.setText(u'')
self.creditEdit.setText(u'')
self.themeComboBox.setCurrentIndex(0)
self.titleEdit.setFocus(QtCore.Qt.OtherFocusReason)
else:
self.customSlide = self.manager.get_object(CustomSlide, id)
self.titleEdit.setText(self.customSlide.title)
@ -104,10 +103,9 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
self.slideListView.addItem(slide[1])
theme = self.customSlide.theme_name
find_and_set_in_combo_box(self.themeComboBox, theme)
self.titleEdit.setFocus(QtCore.Qt.OtherFocusReason)
# If not preview hide the preview button.
self.previewButton.setVisible(False)
if preview:
self.previewButton.setVisible(True)
self.previewButton.setVisible(preview)
def reject(self):
Receiver.send_message(u'custom_edit_clear')

View File

@ -209,9 +209,11 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.alternativeEdit.setText(u'')
if self.song.song_book_id != 0:
book_name = self.manager.get_object(Book, self.song.song_book_id)
find_and_set_in_combo_box(self.songBookComboBox, unicode(book_name.name))
find_and_set_in_combo_box(
self.songBookComboBox, unicode(book_name.name))
if self.song.theme_name:
find_and_set_in_combo_box(self.themeComboBox, unicode(self.song.theme_name))
find_and_set_in_combo_box(
self.themeComboBox, unicode(self.song.theme_name))
if self.song.copyright:
self.copyrightEdit.setText(self.song.copyright)
else: