forked from openlp/openlp
Strange problems with events firing early.
Fixed bugs to stop errors by chaning initilistion order and defining varables. Changing method names following last review.
This commit is contained in:
parent
47884bc340
commit
7becc9cb56
@ -64,6 +64,7 @@ class RenderManager:
|
|||||||
self.calculate_default(self.screen_list[self.current_display]['size'])
|
self.calculate_default(self.screen_list[self.current_display]['size'])
|
||||||
self.theme = u''
|
self.theme = u''
|
||||||
self.service_theme = u''
|
self.service_theme = u''
|
||||||
|
self.global_style = u''
|
||||||
|
|
||||||
def update_display(self, screen_number):
|
def update_display(self, screen_number):
|
||||||
"""
|
"""
|
||||||
|
@ -75,12 +75,12 @@ class MainWindow(object):
|
|||||||
# hook methods have to happen after find_plugins. Find plugins needs the
|
# hook methods have to happen after find_plugins. Find plugins needs the
|
||||||
# controllershence the hooks have moved from setupUI() to here
|
# controllershence the hooks have moved from setupUI() to here
|
||||||
|
|
||||||
# Find and insert media manager items
|
|
||||||
log.info(u'hook media')
|
|
||||||
self.plugin_manager.hook_media_manager(self.MediaToolBox)
|
|
||||||
# Find and insert settings tabs
|
# Find and insert settings tabs
|
||||||
log.info(u'hook settings')
|
log.info(u'hook settings')
|
||||||
self.plugin_manager.hook_settings_tabs(self.settingsForm)
|
self.plugin_manager.hook_settings_tabs(self.settingsForm)
|
||||||
|
# Find and insert media manager items
|
||||||
|
log.info(u'hook media')
|
||||||
|
self.plugin_manager.hook_media_manager(self.MediaToolBox)
|
||||||
# Call the hook method to pull in import menus.
|
# Call the hook method to pull in import menus.
|
||||||
log.info(u'hook menus')
|
log.info(u'hook menus')
|
||||||
self.plugin_manager.hook_import_menu(self.FileImportMenu)
|
self.plugin_manager.hook_import_menu(self.FileImportMenu)
|
||||||
|
@ -124,7 +124,7 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
# Was OSIS and is not any more stops lostFocus running mad
|
# Was OSIS and is not any more stops lostFocus running mad
|
||||||
if self.bible_type == u'OSIS':
|
if self.bible_type == u'OSIS':
|
||||||
self.bible_type = None
|
self.bible_type = None
|
||||||
self.freeAll()
|
self.resetScreenFieldStates()
|
||||||
|
|
||||||
def onBooksLocationEditLostFocus(self):
|
def onBooksLocationEditLostFocus(self):
|
||||||
self.checkOsis()
|
self.checkOsis()
|
||||||
@ -209,9 +209,9 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
str(self.PermisionEdit.displayText()))
|
str(self.PermisionEdit.displayText()))
|
||||||
self.bible_type = None
|
self.bible_type = None
|
||||||
# free the screen state restrictions
|
# free the screen state restrictions
|
||||||
self.freeAll()
|
self.resetScreenFieldStates()
|
||||||
# reset all the screen fields
|
# reset all the screen fields
|
||||||
self.resetAll()
|
self.resetEntryFields()
|
||||||
|
|
||||||
def checkOsis(self):
|
def checkOsis(self):
|
||||||
if len(self.BooksLocationEdit.displayText()) > 0 or len(self.VerseLocationEdit.displayText()) > 0:
|
if len(self.BooksLocationEdit.displayText()) > 0 or len(self.VerseLocationEdit.displayText()) > 0:
|
||||||
@ -220,7 +220,7 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
# Was CSV and is not any more stops lostFocus running mad
|
# Was CSV and is not any more stops lostFocus running mad
|
||||||
if self.bible_type == u'CSV':
|
if self.bible_type == u'CSV':
|
||||||
self.bible_type = None
|
self.bible_type = None
|
||||||
self.freeAll()
|
self.resetScreenFieldStates()
|
||||||
|
|
||||||
def checkHttp(self):
|
def checkHttp(self):
|
||||||
if self.BibleComboBox.currentIndex() != 0 : # First slot is blank so no bible
|
if self.BibleComboBox.currentIndex() != 0 : # First slot is blank so no bible
|
||||||
@ -229,7 +229,7 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
# Was HTTP and is not any more stops lostFocus running mad
|
# Was HTTP and is not any more stops lostFocus running mad
|
||||||
if self.bible_type == u'HTTP':
|
if self.bible_type == u'HTTP':
|
||||||
self.bible_type = None
|
self.bible_type = None
|
||||||
self.freeAll()
|
self.resetScreenFieldStates()
|
||||||
|
|
||||||
def blockCsv(self):
|
def blockCsv(self):
|
||||||
self.BooksLocationEdit.setReadOnly(True)
|
self.BooksLocationEdit.setReadOnly(True)
|
||||||
@ -247,7 +247,7 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
self.blockHttp()
|
self.blockHttp()
|
||||||
|
|
||||||
def setOsis(self):
|
def setOsis(self):
|
||||||
self.bible_type = 'OSIS'
|
self.bible_type = u'OSIS'
|
||||||
self.OSISLocationEdit.setReadOnly(False)
|
self.OSISLocationEdit.setReadOnly(False)
|
||||||
self.OsisFileButton.setEnabled(True)
|
self.OsisFileButton.setEnabled(True)
|
||||||
self.blockCsv()
|
self.blockCsv()
|
||||||
@ -268,8 +268,9 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
self.LocationComboBox.setEnabled(False)
|
self.LocationComboBox.setEnabled(False)
|
||||||
self.BibleComboBox.setEnabled(False)
|
self.BibleComboBox.setEnabled(False)
|
||||||
|
|
||||||
def freeAll(self):
|
def resetScreenFieldStates(self):
|
||||||
if self.bible_type == None: # only reset if no bible type set.
|
# only reset if no bible type set.
|
||||||
|
if self.bible_type == None:
|
||||||
self.BooksLocationEdit.setReadOnly(False)
|
self.BooksLocationEdit.setReadOnly(False)
|
||||||
self.VerseLocationEdit.setReadOnly(False)
|
self.VerseLocationEdit.setReadOnly(False)
|
||||||
self.BooksFileButton.setEnabled(True)
|
self.BooksFileButton.setEnabled(True)
|
||||||
@ -279,7 +280,7 @@ class BibleImportForm(QtGui.QDialog, Ui_BibleImportDialog):
|
|||||||
self.LocationComboBox.setEnabled(True)
|
self.LocationComboBox.setEnabled(True)
|
||||||
self.BibleComboBox.setEnabled(True)
|
self.BibleComboBox.setEnabled(True)
|
||||||
|
|
||||||
def resetAll(self):
|
def resetEntryFields(self):
|
||||||
self.BooksLocationEdit.setText(u'')
|
self.BooksLocationEdit.setText(u'')
|
||||||
self.VerseLocationEdit.setText(u'')
|
self.VerseLocationEdit.setText(u'')
|
||||||
self.OSISLocationEdit.setText(u'')
|
self.OSISLocationEdit.setText(u'')
|
||||||
|
@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License along with
|
|||||||
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
"""
|
"""
|
||||||
|
import logging
|
||||||
|
|
||||||
from PyQt4 import Qt, QtCore, QtGui
|
from PyQt4 import Qt, QtCore, QtGui
|
||||||
|
|
||||||
@ -27,6 +28,10 @@ class BiblesTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
BiblesTab is the Bibles settings tab in the settings dialog.
|
BiblesTab is the Bibles settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
|
global log
|
||||||
|
log = logging.getLogger(u'BibleTab')
|
||||||
|
log.info(u'Bible Tab loaded')
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.paragraph_style = True
|
self.paragraph_style = True
|
||||||
self.show_new_chapters = False
|
self.show_new_chapters = False
|
||||||
@ -67,14 +72,12 @@ class BiblesTab(SettingsTab):
|
|||||||
self.NewChaptersCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
|
self.NewChaptersCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
|
||||||
self.NewChaptersCheckBox.setObjectName("NewChaptersCheckBox")
|
self.NewChaptersCheckBox.setObjectName("NewChaptersCheckBox")
|
||||||
self.VerseDisplayLayout.addWidget(self.NewChaptersCheckBox, 1, 0, 1, 1)
|
self.VerseDisplayLayout.addWidget(self.NewChaptersCheckBox, 1, 0, 1, 1)
|
||||||
|
|
||||||
self.DisplayStyleWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
|
self.DisplayStyleWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
|
||||||
self.DisplayStyleWidget.setObjectName(u'DisplayStyleWidget')
|
self.DisplayStyleWidget.setObjectName(u'DisplayStyleWidget')
|
||||||
self.DisplayStyleLayout = QtGui.QHBoxLayout(self.DisplayStyleWidget)
|
self.DisplayStyleLayout = QtGui.QHBoxLayout(self.DisplayStyleWidget)
|
||||||
self.DisplayStyleLayout.setSpacing(8)
|
self.DisplayStyleLayout.setSpacing(8)
|
||||||
self.DisplayStyleLayout.setMargin(0)
|
self.DisplayStyleLayout.setMargin(0)
|
||||||
self.DisplayStyleLayout.setObjectName(u'DisplayStyleLayout')
|
self.DisplayStyleLayout.setObjectName(u'DisplayStyleLayout')
|
||||||
|
|
||||||
self.DisplayStyleLabel = QtGui.QLabel(self.DisplayStyleWidget)
|
self.DisplayStyleLabel = QtGui.QLabel(self.DisplayStyleWidget)
|
||||||
self.DisplayStyleLabel.setObjectName(u'DisplayStyleLabel')
|
self.DisplayStyleLabel.setObjectName(u'DisplayStyleLabel')
|
||||||
self.DisplayStyleLayout.addWidget(self.DisplayStyleLabel)
|
self.DisplayStyleLayout.addWidget(self.DisplayStyleLabel)
|
||||||
@ -86,14 +89,12 @@ class BiblesTab(SettingsTab):
|
|||||||
self.DisplayStyleComboBox.addItem(QtCore.QString())
|
self.DisplayStyleComboBox.addItem(QtCore.QString())
|
||||||
self.DisplayStyleLayout.addWidget(self.DisplayStyleComboBox)
|
self.DisplayStyleLayout.addWidget(self.DisplayStyleComboBox)
|
||||||
self.VerseDisplayLayout.addWidget(self.DisplayStyleWidget, 2, 0, 1, 1)
|
self.VerseDisplayLayout.addWidget(self.DisplayStyleWidget, 2, 0, 1, 1)
|
||||||
|
|
||||||
self.BibleThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
|
self.BibleThemeWidget = QtGui.QWidget(self.VerseDisplayGroupBox)
|
||||||
self.BibleThemeWidget.setObjectName(u'BibleThemeWidget')
|
self.BibleThemeWidget.setObjectName(u'BibleThemeWidget')
|
||||||
self.BibleThemeLayout = QtGui.QHBoxLayout(self.BibleThemeWidget)
|
self.BibleThemeLayout = QtGui.QHBoxLayout(self.BibleThemeWidget)
|
||||||
self.BibleThemeLayout.setSpacing(8)
|
self.BibleThemeLayout.setSpacing(8)
|
||||||
self.BibleThemeLayout.setMargin(0)
|
self.BibleThemeLayout.setMargin(0)
|
||||||
self.BibleThemeLayout.setObjectName(u'BibleThemeLayout')
|
self.BibleThemeLayout.setObjectName(u'BibleThemeLayout')
|
||||||
|
|
||||||
self.BibleThemeLabel = QtGui.QLabel(self.BibleThemeWidget)
|
self.BibleThemeLabel = QtGui.QLabel(self.BibleThemeWidget)
|
||||||
self.BibleThemeLabel.setObjectName(u'BibleThemeLabel')
|
self.BibleThemeLabel.setObjectName(u'BibleThemeLabel')
|
||||||
self.BibleThemeLayout.addWidget(self.BibleThemeLabel)
|
self.BibleThemeLayout.addWidget(self.BibleThemeLabel)
|
||||||
@ -102,7 +103,6 @@ class BiblesTab(SettingsTab):
|
|||||||
self.BibleThemeComboBox.addItem(QtCore.QString())
|
self.BibleThemeComboBox.addItem(QtCore.QString())
|
||||||
self.BibleThemeLayout.addWidget(self.BibleThemeComboBox)
|
self.BibleThemeLayout.addWidget(self.BibleThemeComboBox)
|
||||||
self.VerseDisplayLayout.addWidget(self.BibleThemeWidget, 3, 0, 1, 1)
|
self.VerseDisplayLayout.addWidget(self.BibleThemeWidget, 3, 0, 1, 1)
|
||||||
|
|
||||||
self.ChangeNoteLabel = QtGui.QLabel(self.VerseDisplayGroupBox)
|
self.ChangeNoteLabel = QtGui.QLabel(self.VerseDisplayGroupBox)
|
||||||
self.ChangeNoteLabel.setObjectName(u'ChangeNoteLabel')
|
self.ChangeNoteLabel.setObjectName(u'ChangeNoteLabel')
|
||||||
self.VerseDisplayLayout.addWidget(self.ChangeNoteLabel, 4, 0, 1, 1)
|
self.VerseDisplayLayout.addWidget(self.ChangeNoteLabel, 4, 0, 1, 1)
|
||||||
@ -111,7 +111,6 @@ class BiblesTab(SettingsTab):
|
|||||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||||
self.BibleLeftLayout.addItem(self.BibleLeftSpacer)
|
self.BibleLeftLayout.addItem(self.BibleLeftSpacer)
|
||||||
self.BibleLayout.addWidget(self.BibleLeftWidget)
|
self.BibleLayout.addWidget(self.BibleLeftWidget)
|
||||||
|
|
||||||
self.BibleRightWidget = QtGui.QWidget(self)
|
self.BibleRightWidget = QtGui.QWidget(self)
|
||||||
self.BibleRightWidget.setObjectName(u'BibleRightWidget')
|
self.BibleRightWidget.setObjectName(u'BibleRightWidget')
|
||||||
self.BibleRightLayout = QtGui.QVBoxLayout(self.BibleRightWidget)
|
self.BibleRightLayout = QtGui.QVBoxLayout(self.BibleRightWidget)
|
||||||
@ -176,13 +175,15 @@ class BiblesTab(SettingsTab):
|
|||||||
def onNewChaptersCheckBoxChanged(self):
|
def onNewChaptersCheckBoxChanged(self):
|
||||||
check_state = self.NewChaptersCheckBox.checkState()
|
check_state = self.NewChaptersCheckBox.checkState()
|
||||||
self.show_new_chapters = False
|
self.show_new_chapters = False
|
||||||
if check_state == 2: # we have a set value convert to True/False
|
# we have a set value convert to True/False
|
||||||
|
if check_state == 2:
|
||||||
self.show_new_chapters = True
|
self.show_new_chapters = True
|
||||||
|
|
||||||
def onBibleSearchCheckBoxChanged(self):
|
def onBibleSearchCheckBoxChanged(self):
|
||||||
check_state = self.BibleSearchCheckBox.checkState()
|
check_state = self.BibleSearchCheckBox.checkState()
|
||||||
self.bible_search = False
|
self.bible_search = False
|
||||||
if check_state == 2: # we have a set value convert to True/False
|
# we have a set value convert to True/False
|
||||||
|
if check_state == 2:
|
||||||
self.bible_search = True
|
self.bible_search = True
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
|
@ -42,9 +42,7 @@ class BibleList(QtGui.QListView):
|
|||||||
mimeData = QtCore.QMimeData()
|
mimeData = QtCore.QMimeData()
|
||||||
drag.setMimeData(mimeData)
|
drag.setMimeData(mimeData)
|
||||||
mimeData.setText(u'Bibles')
|
mimeData.setText(u'Bibles')
|
||||||
|
|
||||||
dropAction = drag.start(QtCore.Qt.CopyAction)
|
dropAction = drag.start(QtCore.Qt.CopyAction)
|
||||||
|
|
||||||
if dropAction == QtCore.Qt.CopyAction:
|
if dropAction == QtCore.Qt.CopyAction:
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
@ -90,7 +88,6 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
translate(u'BibleMediaItem',u'Add the selected Bible(s) to the service'),
|
translate(u'BibleMediaItem',u'Add the selected Bible(s) to the service'),
|
||||||
u':/system/system_add.png',
|
u':/system/system_add.png',
|
||||||
self.onBibleAddClick, u'BibleAddItem')
|
self.onBibleAddClick, u'BibleAddItem')
|
||||||
|
|
||||||
# Create the tab widget
|
# Create the tab widget
|
||||||
self.SearchTabWidget = QtGui.QTabWidget(self)
|
self.SearchTabWidget = QtGui.QTabWidget(self)
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
@ -99,7 +96,6 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
sizePolicy.setHeightForWidth(self.SearchTabWidget.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(self.SearchTabWidget.sizePolicy().hasHeightForWidth())
|
||||||
self.SearchTabWidget.setSizePolicy(sizePolicy)
|
self.SearchTabWidget.setSizePolicy(sizePolicy)
|
||||||
self.SearchTabWidget.setObjectName(u'SearchTabWidget')
|
self.SearchTabWidget.setObjectName(u'SearchTabWidget')
|
||||||
|
|
||||||
# Add the Quick Search tab
|
# Add the Quick Search tab
|
||||||
self.QuickTab = QtGui.QWidget()
|
self.QuickTab = QtGui.QWidget()
|
||||||
self.QuickTab.setObjectName(u'QuickTab')
|
self.QuickTab.setObjectName(u'QuickTab')
|
||||||
@ -138,7 +134,6 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
QuickSpacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
QuickSpacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||||
QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Expanding)
|
||||||
self.QuickLayout.addItem(QuickSpacerItem, 4, 2, 1, 1)
|
self.QuickLayout.addItem(QuickSpacerItem, 4, 2, 1, 1)
|
||||||
|
|
||||||
# Add the Advanced Search tab
|
# Add the Advanced Search tab
|
||||||
self.AdvancedTab = QtGui.QWidget()
|
self.AdvancedTab = QtGui.QWidget()
|
||||||
self.AdvancedTab.setObjectName(u'AdvancedTab')
|
self.AdvancedTab.setObjectName(u'AdvancedTab')
|
||||||
@ -170,45 +165,37 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.AdvancedToLabel = QtGui.QLabel(self.AdvancedTab)
|
self.AdvancedToLabel = QtGui.QLabel(self.AdvancedTab)
|
||||||
self.AdvancedToLabel.setObjectName(u'AdvancedToLabel')
|
self.AdvancedToLabel.setObjectName(u'AdvancedToLabel')
|
||||||
self.AdvancedLayout.addWidget(self.AdvancedToLabel, 4, 0, 1, 1)
|
self.AdvancedLayout.addWidget(self.AdvancedToLabel, 4, 0, 1, 1)
|
||||||
|
|
||||||
self.AdvancedFromChapter = QtGui.QComboBox(self.AdvancedTab)
|
self.AdvancedFromChapter = QtGui.QComboBox(self.AdvancedTab)
|
||||||
self.AdvancedFromChapter.setObjectName(u'AdvancedFromChapter')
|
self.AdvancedFromChapter.setObjectName(u'AdvancedFromChapter')
|
||||||
self.AdvancedLayout.addWidget(self.AdvancedFromChapter, 3, 2, 1, 1)
|
self.AdvancedLayout.addWidget(self.AdvancedFromChapter, 3, 2, 1, 1)
|
||||||
self.AdvancedFromVerse = QtGui.QComboBox(self.AdvancedTab)
|
self.AdvancedFromVerse = QtGui.QComboBox(self.AdvancedTab)
|
||||||
self.AdvancedFromVerse.setObjectName(u'AdvancedFromVerse')
|
self.AdvancedFromVerse.setObjectName(u'AdvancedFromVerse')
|
||||||
self.AdvancedLayout.addWidget(self.AdvancedFromVerse, 3, 3, 1, 1)
|
self.AdvancedLayout.addWidget(self.AdvancedFromVerse, 3, 3, 1, 1)
|
||||||
|
|
||||||
self.AdvancedToChapter = QtGui.QComboBox(self.AdvancedTab)
|
self.AdvancedToChapter = QtGui.QComboBox(self.AdvancedTab)
|
||||||
self.AdvancedToChapter.setObjectName(u'AdvancedToChapter')
|
self.AdvancedToChapter.setObjectName(u'AdvancedToChapter')
|
||||||
self.AdvancedLayout.addWidget(self.AdvancedToChapter, 4, 2, 1, 1)
|
self.AdvancedLayout.addWidget(self.AdvancedToChapter, 4, 2, 1, 1)
|
||||||
self.AdvancedToVerse = QtGui.QComboBox(self.AdvancedTab)
|
self.AdvancedToVerse = QtGui.QComboBox(self.AdvancedTab)
|
||||||
self.AdvancedToVerse.setObjectName(u'AdvancedToVerse')
|
self.AdvancedToVerse.setObjectName(u'AdvancedToVerse')
|
||||||
self.AdvancedLayout.addWidget(self.AdvancedToVerse, 4, 3, 1, 1)
|
self.AdvancedLayout.addWidget(self.AdvancedToVerse, 4, 3, 1, 1)
|
||||||
|
|
||||||
self.AdvancedClearLabel = QtGui.QLabel(self.QuickTab)
|
self.AdvancedClearLabel = QtGui.QLabel(self.QuickTab)
|
||||||
self.AdvancedClearLabel.setObjectName(u'QuickSearchLabel')
|
self.AdvancedClearLabel.setObjectName(u'QuickSearchLabel')
|
||||||
self.AdvancedLayout.addWidget(self.AdvancedClearLabel, 5, 0, 1, 1)
|
self.AdvancedLayout.addWidget(self.AdvancedClearLabel, 5, 0, 1, 1)
|
||||||
self.ClearAdvancedSearchComboBox = QtGui.QComboBox(self.QuickTab)
|
self.ClearAdvancedSearchComboBox = QtGui.QComboBox(self.QuickTab)
|
||||||
self.ClearAdvancedSearchComboBox.setObjectName(u'ClearAdvancedSearchComboBox')
|
self.ClearAdvancedSearchComboBox.setObjectName(u'ClearAdvancedSearchComboBox')
|
||||||
self.AdvancedLayout.addWidget(self.ClearAdvancedSearchComboBox, 5, 2, 1, 1)
|
self.AdvancedLayout.addWidget(self.ClearAdvancedSearchComboBox, 5, 2, 1, 1)
|
||||||
|
|
||||||
self.AdvancedSearchButton = QtGui.QPushButton(self.AdvancedTab)
|
self.AdvancedSearchButton = QtGui.QPushButton(self.AdvancedTab)
|
||||||
self.AdvancedSearchButton.setObjectName(u'AdvancedSearchButton')
|
self.AdvancedSearchButton.setObjectName(u'AdvancedSearchButton')
|
||||||
self.AdvancedLayout.addWidget(self.AdvancedSearchButton, 5, 3, 1, 1)
|
self.AdvancedLayout.addWidget(self.AdvancedSearchButton, 5, 3, 1, 1)
|
||||||
self.SearchTabWidget.addTab(self.AdvancedTab, u'Advanced')
|
self.SearchTabWidget.addTab(self.AdvancedTab, u'Advanced')
|
||||||
|
|
||||||
# Add the search tab widget to the page layout
|
# Add the search tab widget to the page layout
|
||||||
self.PageLayout.addWidget(self.SearchTabWidget)
|
self.PageLayout.addWidget(self.SearchTabWidget)
|
||||||
|
|
||||||
self.BibleListView = BibleList()
|
self.BibleListView = BibleList()
|
||||||
self.BibleListView.setAlternatingRowColors(True)
|
self.BibleListView.setAlternatingRowColors(True)
|
||||||
self.BibleListData = TextListData()
|
self.BibleListData = TextListData()
|
||||||
self.BibleListView.setModel(self.BibleListData)
|
self.BibleListView.setModel(self.BibleListData)
|
||||||
self.BibleListView.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
|
self.BibleListView.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
|
||||||
self.BibleListView.setDragEnabled(True)
|
self.BibleListView.setDragEnabled(True)
|
||||||
|
|
||||||
self.PageLayout.addWidget(self.BibleListView)
|
self.PageLayout.addWidget(self.BibleListView)
|
||||||
|
|
||||||
# Combo Boxes
|
# Combo Boxes
|
||||||
QtCore.QObject.connect(self.AdvancedVersionComboBox,
|
QtCore.QObject.connect(self.AdvancedVersionComboBox,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedVersionComboBox)
|
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedVersionComboBox)
|
||||||
@ -226,7 +213,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
QtCore.QObject.connect(self.QuickSearchButton,
|
QtCore.QObject.connect(self.QuickSearchButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onQuickSearchButton)
|
QtCore.SIGNAL(u'pressed()'), self.onQuickSearchButton)
|
||||||
QtCore.QObject.connect(self.BibleListView,
|
QtCore.QObject.connect(self.BibleListView,
|
||||||
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onBiblePreviewClick())
|
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onBiblePreviewClick)
|
||||||
# Context Menus
|
# Context Menus
|
||||||
self.BibleListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
self.BibleListView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||||
self.BibleListView.addAction(self.contextMenuAction(
|
self.BibleListView.addAction(self.contextMenuAction(
|
||||||
@ -273,7 +260,8 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
# load bibles into the combo boxes
|
# load bibles into the combo boxes
|
||||||
for bible in bibles:
|
for bible in bibles:
|
||||||
self.QuickVersionComboBox.addItem(bible)
|
self.QuickVersionComboBox.addItem(bible)
|
||||||
bibles = self.parent.biblemanager.get_bibles(u'partial') # Without HTTP
|
# Without HTT
|
||||||
|
bibles = self.parent.biblemanager.get_bibles(u'partial')
|
||||||
first = True
|
first = True
|
||||||
# load bibles into the combo boxes
|
# load bibles into the combo boxes
|
||||||
for bible in bibles:
|
for bible in bibles:
|
||||||
@ -363,7 +351,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.parent.preview_controller.addServiceItem(service_item)
|
self.parent.preview_controller.addServiceItem(service_item)
|
||||||
|
|
||||||
def generateSlideData(self, service_item):
|
def generateSlideData(self, service_item):
|
||||||
log.debug(u'Bible Preview Button pressed')
|
log.debug(u'generating slide data')
|
||||||
items = self.BibleListView.selectedIndexes()
|
items = self.BibleListView.selectedIndexes()
|
||||||
old_chapter = u''
|
old_chapter = u''
|
||||||
raw_slides=[]
|
raw_slides=[]
|
||||||
@ -455,7 +443,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
end_chapter = ''
|
end_chapter = ''
|
||||||
start_verse = ''
|
start_verse = ''
|
||||||
end_verse = ''
|
end_verse = ''
|
||||||
search = search.replace(u' ', ' ').strip()
|
search = search.replace(u' ', u' ').strip()
|
||||||
original = search
|
original = search
|
||||||
message = None
|
message = None
|
||||||
# Remove book beware 0 index arrays
|
# Remove book beware 0 index arrays
|
||||||
|
Loading…
Reference in New Issue
Block a user