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