Minor bug fixes

This commit is contained in:
Tim Bentley 2009-08-02 17:13:59 +01:00
parent fa606e19a9
commit 13f016cf5f
5 changed files with 9 additions and 34 deletions

View File

@ -161,7 +161,7 @@ class ThemeXML(object):
#Create Filename element
self.child_element(background, u'filename', filename)
def add_font(self, name, color, proportion, override, fonttype=u'main', weight=50, italics=0,
def add_font(self, name, color, proportion, override, fonttype=u'main', weight=u'50', italics=u'0',
xpos=0, ypos=0, width=0, height=0):
"""
Add a Font.

View File

@ -300,7 +300,7 @@ class ServiceManager(QtGui.QWidget):
Used when moving items as the move takes place in supporting array,
and when regenerating all the items due to theme changes
"""
#Correct order of idems in array
#Correct order of items in array
count = 1
for item in self.serviceItems:
item[u'order'] = count
@ -398,7 +398,7 @@ class ServiceManager(QtGui.QWidget):
"""
Set the theme for the current service
"""
self.service_theme = self.ThemeComboBox.currentText()
self.service_theme = unicode(self.ThemeComboBox.currentText())
self.parent.RenderManager.set_service_theme(self.service_theme)
self.config.set_config(u'theme service theme', self.service_theme)
self.regenerateServiceItems()

View File

@ -100,6 +100,10 @@ class ThemeManager(QtGui.QWidget):
except:
#if not present do not worry
pass
#As we do not reload the themes push out the change
self.parent.EventManager.post_event(Event(EventType.ThemeListChanged))
self.parent.ServiceManagerContents.updateThemeList(self.getThemes())
self.parent.settingsForm.ThemesTab.updateThemeList(self.getThemes())
def onExportTheme(self):
pass

View File

@ -155,6 +155,8 @@ class MigrateSongs():
if bb is None:
author = Author()
author.display_name = authors_temp.authorname
author.first_name = u''
author.last_name = u''
else:
id = int(bb[0])
author = self.session.query(Author).get(bb[0])

View File

@ -48,16 +48,12 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
QtCore.SIGNAL(u'clicked()'), self.onAuthorRemovefromSongItemClicked)
QtCore.QObject.connect(self.AuthorsListView,
QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onAuthorsListViewPressed)
# QtCore.QObject.connect(self.AddTopicButton,
# QtCore.SIGNAL(u'clicked()'), self.onAddTopicButtonClicked)
QtCore.QObject.connect(self.AddTopicsToSongButton,
QtCore.SIGNAL(u'clicked()'), self.onTopicAddtoSongItemClicked)
QtCore.QObject.connect(self.TopicRemoveItem,
QtCore.SIGNAL(u'clicked()'), self.onTopicRemovefromSongItemClicked)
QtCore.QObject.connect(self.TopicsListView,
QtCore.SIGNAL(u'itemClicked(QListWidgetItem*)'), self.onTopicListViewPressed)
# QtCore.QObject.connect(self.AddSongBookButton,
# QtCore.SIGNAL(u'clicked()'), self.onAddSongBookButtonClicked)
QtCore.QObject.connect(self.CopyrightInsertItem,
QtCore.SIGNAL(u'clicked()'), self.onCopyrightInsertItemTriggered)
QtCore.QObject.connect(self.AddButton,
@ -75,9 +71,6 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
# Create other objects and forms
self.songmanager = songmanager
self.eventmanager = eventmanager
# self.authors_form = AuthorsForm(self.songmanager)
# self.topics_form = TopicsForm(self.songmanager)
# self.song_book_form = SongBookForm(self.songmanager)
self.verse_form = EditVerseForm()
self.initialise()
self.AuthorsListView.setSortingEnabled(False)
@ -253,30 +246,6 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
row = self.TopicsListView.row(item)
self.TopicsListView.takeItem(row)
# def onAddAuthorsButtonClicked(self):
# """
# Slot documentation goes here.
# """
# self.authors_form.load_form()
# self.authors_form.exec_()
# self.loadAuthors()
#
# def onAddTopicButtonClicked(self):
# """
# Slot documentation goes here.
# """
# self.topics_form.load_form()
# self.topics_form.exec_()
# self.loadTopics()
#
# def onAddSongBookButtonClicked(self):
# """
# Slot documentation goes here.
# """
# self.song_book_form.load_form()
# self.song_book_form.exec_()
# self.loadBooks()
def onSongBookComboChanged(self, item):
if item == 0:
self.song.song_book_id = 0