forked from openlp/openlp
fixed songusage, clean ups
This commit is contained in:
parent
374a426340
commit
175b01621d
@ -124,7 +124,7 @@ class Settings(QtCore.QSettings):
|
||||
return setting.toStringList()
|
||||
if isinstance(defaultValue, QtCore.QPoint):
|
||||
return setting.toPoint()
|
||||
if isinstance(defaultValue, datetime.date):
|
||||
if isinstance(defaultValue, (datetime.date, QtCore.QDate)):
|
||||
return setting.toDate()
|
||||
print u'No!', type(defaultValue)
|
||||
raise MissingTypeConversion(u'Setting could not be converted')
|
||||
|
@ -132,7 +132,6 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
||||
for lang in bible_languages:
|
||||
language = unicode(self.config.get(
|
||||
u'bibles_%s' % lang, u'title'), u'utf8')
|
||||
# FIXME
|
||||
langItem = QtGui.QTreeWidgetItem(
|
||||
self.biblesTreeWidget, language)
|
||||
bibles = self.config.get(u'bibles_%s' % lang, u'translations')
|
||||
|
@ -135,7 +135,6 @@ class ThemesTab(SettingsTab):
|
||||
settings = Settings()
|
||||
settings.beginGroup(self.settingsSection)
|
||||
self.theme_level = settings.value(u'theme level', ThemeLevel.Song)
|
||||
# TODO: check empty string (logic).
|
||||
self.global_theme = settings.value(u'global theme', u'')
|
||||
settings.endGroup()
|
||||
if self.theme_level == ThemeLevel.Global:
|
||||
|
@ -158,7 +158,6 @@ class AlertsTab(SettingsTab):
|
||||
self.font_color = settings.value(u'font color', u'#ffffff')
|
||||
self.font_size = settings.value(u'font size', 40)
|
||||
self.bg_color = settings.value(u'background color', u'#660000')
|
||||
# TODO: isinstance needed?
|
||||
self.font_face = settings.value(u'font face', QtGui.QFont().family())
|
||||
self.location = settings.value(u'location', AlertLocation.Bottom)
|
||||
settings.endGroup()
|
||||
|
@ -419,7 +419,6 @@ class BiblesTab(SettingsTab):
|
||||
self.show_new_chapters = settings.value(u'display new chapter', False)
|
||||
self.display_style = settings.value(u'display brackets', 0)
|
||||
self.layout_style = settings.value(u'verse layout style', 0)
|
||||
#TODO: Check
|
||||
self.bible_theme = settings.value(u'bible theme', u'')
|
||||
self.second_bibles = settings.value(u'second bibles', True)
|
||||
self.newChaptersCheckBox.setChecked(self.show_new_chapters)
|
||||
|
@ -132,7 +132,6 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.searchTextEdit.setFocus()
|
||||
|
||||
def configUpdated(self):
|
||||
# TODO: Check .toBool()
|
||||
self.searchAsYouType = Settings().value(
|
||||
self.settingsSection + u'/search as type', False)
|
||||
self.updateServiceOnEdit = Settings().value(
|
||||
|
@ -59,11 +59,10 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
|
||||
year = QtCore.QDate().currentDate().year()
|
||||
if QtCore.QDate().currentDate().month() < 9:
|
||||
year -= 1
|
||||
# TODO: check toDate()
|
||||
toDate = Settings().value(self.plugin.settingsSection +
|
||||
u'/to date', QtCore.QDate(year, 8, 31)).toDate()
|
||||
u'/to date', QtCore.QDate(year, 8, 31))
|
||||
fromDate = Settings().value(self.plugin.settingsSection +
|
||||
u'/from date', QtCore.QDate(year - 1, 9, 1)).toDate()
|
||||
u'/from date', QtCore.QDate(year - 1, 9, 1))
|
||||
self.fromDate.setSelectedDate(fromDate)
|
||||
self.toDate.setSelectedDate(toDate)
|
||||
self.fileLineEdit.setText(
|
||||
|
Loading…
Reference in New Issue
Block a user