forked from openlp/openlp
Style fixes
This commit is contained in:
parent
ccb54e4faf
commit
8e4f69383c
@ -53,7 +53,7 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
|
|
||||||
def insertTab(self, tab, location):
|
def insertTab(self, tab, location):
|
||||||
log.debug(u'Inserting %s tab' % tab.title())
|
log.debug(u'Inserting %s tab' % tab.title())
|
||||||
#13 : There are 3 tables currently and lcations starts at -10
|
#13 : There are 3 tables currently and locations starts at -10
|
||||||
self.SettingsTabWidget.insertTab(location + 13, tab, tab.title())
|
self.SettingsTabWidget.insertTab(location + 13, tab, tab.title())
|
||||||
|
|
||||||
def removeTab(self, name):
|
def removeTab(self, name):
|
||||||
|
@ -50,6 +50,8 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
self.bible_type = None
|
self.bible_type = None
|
||||||
self.barmax = 0
|
self.barmax = 0
|
||||||
self.tabWidget.setCurrentIndex(0)
|
self.tabWidget.setCurrentIndex(0)
|
||||||
|
self.cwBibleVersions = {}
|
||||||
|
self.bgBibleVersions = {}
|
||||||
self.AddressEdit.setText(self.config.get_config(u'proxy_address', u''))
|
self.AddressEdit.setText(self.config.get_config(u'proxy_address', u''))
|
||||||
self.UsernameEdit.setText(self.config.get_config(u'proxy_username',u''))
|
self.UsernameEdit.setText(self.config.get_config(u'proxy_username',u''))
|
||||||
self.PasswordEdit.setText(self.config.get_config(u'proxy_password',u''))
|
self.PasswordEdit.setText(self.config.get_config(u'proxy_password',u''))
|
||||||
@ -57,20 +59,24 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
filepath = os.path.split(os.path.abspath(__file__))[0]
|
filepath = os.path.split(os.path.abspath(__file__))[0]
|
||||||
filepath = os.path.abspath(os.path.join(filepath, u'..',
|
filepath = os.path.abspath(os.path.join(filepath, u'..',
|
||||||
u'resources', u'crosswalkbooks.csv'))
|
u'resources', u'crosswalkbooks.csv'))
|
||||||
|
try:
|
||||||
fbibles = open(filepath, 'r')
|
fbibles = open(filepath, 'r')
|
||||||
self.cwBibleVersions = {}
|
|
||||||
for line in fbibles:
|
for line in fbibles:
|
||||||
p = line.split(u',')
|
p = line.split(u',')
|
||||||
self.cwBibleVersions[p[0]] = p[1].replace(u'\n', u'')
|
self.cwBibleVersions[p[0]] = p[1].replace(u'\n', u'')
|
||||||
|
except:
|
||||||
|
log.exception(u'Crosswalk resources missing')
|
||||||
#Load and store BibleGateway Bibles
|
#Load and store BibleGateway Bibles
|
||||||
filepath = os.path.split(os.path.abspath(__file__))[0]
|
filepath = os.path.split(os.path.abspath(__file__))[0]
|
||||||
filepath = os.path.abspath(os.path.join(filepath, u'..',
|
filepath = os.path.abspath(os.path.join(filepath, u'..',
|
||||||
u'resources', u'biblegateway.csv'))
|
u'resources', u'biblegateway.csv'))
|
||||||
|
try:
|
||||||
fbibles = open(filepath, 'r')
|
fbibles = open(filepath, 'r')
|
||||||
self.bgBibleVersions = {}
|
|
||||||
for line in fbibles:
|
for line in fbibles:
|
||||||
p = line.split(u',')
|
p = line.split(u',')
|
||||||
self.bgBibleVersions[p[0]] = p[1].replace(u'\n', u'')
|
self.bgBibleVersions[p[0]] = p[1].replace(u'\n', u'')
|
||||||
|
except:
|
||||||
|
log.exception(u'Biblegateway resources missing')
|
||||||
self.loadBibleCombo(self.cwBibleVersions)
|
self.loadBibleCombo(self.cwBibleVersions)
|
||||||
self.cwActive = True
|
self.cwActive = True
|
||||||
|
|
||||||
@ -117,7 +123,8 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
|
|
||||||
def onVersesFileButtonClicked(self):
|
def onVersesFileButtonClicked(self):
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(
|
filename = QtGui.QFileDialog.getOpenFileName(
|
||||||
self, self.trUtf8(u'Open file'), self.config.get_last_dir(1))
|
self, self.trUtf8(u'Open Bible Verses file'),
|
||||||
|
self.config.get_last_dir(1))
|
||||||
if filename != u'':
|
if filename != u'':
|
||||||
self.VerseLocationEdit.setText(filename)
|
self.VerseLocationEdit.setText(filename)
|
||||||
self.config.set_last_dir(filename, 1)
|
self.config.set_last_dir(filename, 1)
|
||||||
@ -125,7 +132,8 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
|
|
||||||
def onBooksFileButtonClicked(self):
|
def onBooksFileButtonClicked(self):
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(
|
filename = QtGui.QFileDialog.getOpenFileName(
|
||||||
self, self.trUtf8(u'Open file'), self.config.get_last_dir(2))
|
self, self.trUtf8(u'Open Bible Books file'),
|
||||||
|
self.config.get_last_dir(2))
|
||||||
if filename != u'':
|
if filename != u'':
|
||||||
self.BooksLocationEdit.setText(filename)
|
self.BooksLocationEdit.setText(filename)
|
||||||
self.config.set_last_dir(filename, 2)
|
self.config.set_last_dir(filename, 2)
|
||||||
@ -133,7 +141,8 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
|
|
||||||
def onOsisFileButtonClicked(self):
|
def onOsisFileButtonClicked(self):
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(
|
filename = QtGui.QFileDialog.getOpenFileName(
|
||||||
self, self.trUtf8(u'Open file'), self.config.get_last_dir(3))
|
self, self.trUtf8(u'Open OSIS import file'),
|
||||||
|
self.config.get_last_dir(3))
|
||||||
if filename != u'':
|
if filename != u'':
|
||||||
self.OSISLocationEdit.setText(filename)
|
self.OSISLocationEdit.setText(filename)
|
||||||
self.config.set_last_dir(filename, 3)
|
self.config.set_last_dir(filename, 3)
|
||||||
|
Loading…
Reference in New Issue
Block a user