forked from openlp/openlp
Merge errors
This commit is contained in:
commit
8c0144d1fc
@ -121,11 +121,15 @@ class OpenLP(QtGui.QApplication):
|
||||
if FirstTimeForm(screens).exec_() == QtGui.QDialog.Accepted:
|
||||
Settings().setValue(u'general/has run wizard', True)
|
||||
# Correct stylesheet bugs
|
||||
if os.name == u'nt':
|
||||
application_stylesheet = u''
|
||||
if not Settings().value(u'advanced/alternate rows'):
|
||||
base_color = self.palette().color(QtGui.QPalette.Active, QtGui.QPalette.Base)
|
||||
application_stylesheet = \
|
||||
alternate_rows_repair_stylesheet = \
|
||||
u'QTableWidget, QListWidget, QTreeWidget {alternate-background-color: ' + base_color.name() + ';}\n'
|
||||
application_stylesheet += alternate_rows_repair_stylesheet
|
||||
if os.name == u'nt':
|
||||
application_stylesheet += nt_repair_stylesheet
|
||||
if application_stylesheet:
|
||||
self.setStyleSheet(application_stylesheet)
|
||||
show_splash = Settings().value(u'general/show splash')
|
||||
if show_splash:
|
||||
|
@ -87,6 +87,7 @@ class Settings(QtCore.QSettings):
|
||||
"""
|
||||
__default_settings__ = {
|
||||
u'advanced/x11 bypass wm': X11_BYPASS_DEFAULT,
|
||||
u'advanced/alternate rows': not sys.platform.startswith(u'win'),
|
||||
u'advanced/default service enabled': True,
|
||||
u'advanced/enable exit confirmation': True,
|
||||
u'advanced/save current plugin': False,
|
||||
|
@ -229,14 +229,15 @@ class AdvancedTab(SettingsTab):
|
||||
self.next_item_radio_button.setObjectName(u'next_item_radio_button')
|
||||
self.slideLayout.addWidget(self.next_item_radio_button)
|
||||
self.rightLayout.addWidget(self.slide_group_box)
|
||||
self.x11_group_box = QtGui.QGroupBox(self.leftColumn)
|
||||
self.x11_group_box.setObjectName(u'x11_group_box')
|
||||
self.x11Layout = QtGui.QVBoxLayout(self.x11_group_box)
|
||||
self.x11Layout.setObjectName(u'x11Layout')
|
||||
self.x11_bypass_check_box = QtGui.QCheckBox(self.x11_group_box)
|
||||
self.x11_bypass_check_box.setObjectName(u'x11_bypass_check_box')
|
||||
self.x11Layout.addWidget(self.x11_bypass_check_box)
|
||||
self.rightLayout.addWidget(self.x11_group_box)
|
||||
# Display Workarounds
|
||||
self.display_workaround_group_box = QtGui.QGroupBox(self.leftColumn)
|
||||
self.display_workaround_group_box.setObjectName(u'display_workaround_group_box')
|
||||
self.display_workaround_layout = QtGui.QVBoxLayout(self.display_workaround_group_box)
|
||||
self.display_workaround_layout.setObjectName(u'display_workaround_layout')
|
||||
self.alternate_rows_check_box = QtGui.QCheckBox(self.display_workaround_group_box)
|
||||
self.alternate_rows_check_box.setObjectName(u'alternate_rows_check_box')
|
||||
self.display_workaround_layout.addWidget(self.alternate_rows_check_box)
|
||||
self.rightLayout.addWidget(self.display_workaround_group_box)
|
||||
self.rightLayout.addStretch()
|
||||
self.should_update_service_name_example = False
|
||||
QtCore.QObject.connect(self.service_name_check_box, QtCore.SIGNAL(u'toggled(bool)'),
|
||||
@ -255,8 +256,8 @@ class AdvancedTab(SettingsTab):
|
||||
self.on_default_browse_button_clicked)
|
||||
QtCore.QObject.connect(self.default_revert_button, QtCore.SIGNAL(u'clicked()'),
|
||||
self.on_default_revert_button_clicked)
|
||||
QtCore.QObject.connect(self.x11_bypass_check_box, QtCore.SIGNAL(u'toggled(bool)'),
|
||||
self.on_X11_bypass_check_box_toggled)
|
||||
QtCore.QObject.connect(self.alternate_rows_check_box,QtCore.SIGNAL(u'toggled(bool)'),
|
||||
self.on_alternate_rows_check_box_toggled)
|
||||
QtCore.QObject.connect(self.data_directory_browse_button, QtCore.SIGNAL(u'clicked()'),
|
||||
self.on_data_directory_browse_button_clicked)
|
||||
QtCore.QObject.connect(self.data_directory_default_button, QtCore.SIGNAL(u'clicked()'),
|
||||
@ -264,7 +265,7 @@ class AdvancedTab(SettingsTab):
|
||||
QtCore.QObject.connect(self.data_directory_cancel_button, QtCore.SIGNAL(u'clicked()'),
|
||||
self.on_data_directory_cancel_button_clicked)
|
||||
QtCore.QObject.connect(self.data_directory_copy_check_box, QtCore.SIGNAL(u'toggled(bool)'),
|
||||
self.on_data_directory_copy_check_box_toggled)
|
||||
self.on_data_directory_copy_check_box_toggled)
|
||||
QtCore.QObject.connect(self.end_slide_radio_button, QtCore.SIGNAL(u'clicked()'),
|
||||
self.on_end_slide_button_clicked)
|
||||
QtCore.QObject.connect(self.wrap_slide_radio_button, QtCore.SIGNAL(u'clicked()'),
|
||||
@ -272,6 +273,7 @@ class AdvancedTab(SettingsTab):
|
||||
QtCore.QObject.connect(self.next_item_radio_button, QtCore.SIGNAL(u'clicked()'),
|
||||
self.on_next_item_button_clicked)
|
||||
|
||||
|
||||
def retranslateUi(self):
|
||||
"""
|
||||
Setup the interface translation strings.
|
||||
@ -332,8 +334,8 @@ class AdvancedTab(SettingsTab):
|
||||
self.new_data_directory_has_files_label.setText(
|
||||
translate('OpenLP.AdvancedTab', '<strong>WARNING:</strong> New data directory location contains '
|
||||
'OpenLP data files. These files WILL be replaced during a copy.'))
|
||||
self.x11_group_box.setTitle(translate('OpenLP.AdvancedTab', 'X11'))
|
||||
self.x11_bypass_check_box.setText(translate('OpenLP.AdvancedTab','Bypass X11 Window Manager'))
|
||||
self.display_workaround_group_box.setTitle(translate('OpenLP.AdvancedTab', 'Display Workarounds'))
|
||||
self.alternate_rows_check_box.setText(translate('OpenLP.AdvancedTab', 'Use alternating row colours in lists'))
|
||||
# Slide Limits
|
||||
self.slide_group_box.setTitle(translate('OpenLP.GeneralTab', 'Service Item Slide Limits'))
|
||||
self.slide_label.setText(translate('OpenLP.GeneralTab', 'Behavior of next/previous on the last/first slide:'))
|
||||
@ -366,10 +368,13 @@ class AdvancedTab(SettingsTab):
|
||||
default_service_enabled = settings.value(u'default service enabled')
|
||||
self.service_name_check_box.setChecked(default_service_enabled)
|
||||
self.service_name_check_box_toggled(default_service_enabled)
|
||||
self.x11_bypass_check_box.setChecked(settings.value(u'x11 bypass wm'))
|
||||
self.default_color = settings.value(u'default color')
|
||||
self.default_file_edit.setText(settings.value(u'default image'))
|
||||
self.slide_limits = settings.value(u'slide limits')
|
||||
# Prevent the dialog displayed by the alternate_rows_check_box to display.
|
||||
self.alternate_rows_check_box.blockSignals(True)
|
||||
self.alternate_rows_check_box.setChecked(settings.value(u'alternate rows'))
|
||||
self.alternate_rows_check_box.blockSignals(False)
|
||||
if self.slide_limits == SlideLimits.End:
|
||||
self.end_slide_radio_button.setChecked(True)
|
||||
elif self.slide_limits == SlideLimits.Wrap:
|
||||
@ -437,6 +442,7 @@ class AdvancedTab(SettingsTab):
|
||||
settings.setValue(u'enable exit confirmation', self.enable_auto_close_check_box.isChecked())
|
||||
settings.setValue(u'hide mouse', self.hide_mouse_check_box.isChecked())
|
||||
settings.setValue(u'x11 bypass wm', self.x11_bypass_check_box.isChecked())
|
||||
settings.setValue(u'alternate rows', self.alternate_rows_check_box.isChecked())
|
||||
settings.setValue(u'default color', self.default_color)
|
||||
settings.setValue(u'default image', self.default_file_edit.text())
|
||||
settings.setValue(u'slide limits', self.slide_limits)
|
||||
@ -652,6 +658,17 @@ class AdvancedTab(SettingsTab):
|
||||
The state of the check box (boolean).
|
||||
"""
|
||||
self.display_changed = True
|
||||
|
||||
def on_alternate_rows_check_box_toggled(self, checked):
|
||||
"""
|
||||
Notify user about required restart.
|
||||
|
||||
``checked``
|
||||
The state of the check box (boolean).
|
||||
"""
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('OpenLP.AdvancedTab', 'Restart Required'),
|
||||
translate('OpenLP.AdvancedTab', 'This change will only take effect once OpenLP has been restarted.'))
|
||||
|
||||
def on_end_slide_button_clicked(self):
|
||||
"""
|
||||
|
@ -92,6 +92,14 @@ class SlideController(DisplayController):
|
||||
u'audioPauseItem',
|
||||
u'audioTimeLabel'
|
||||
]
|
||||
self.wideMenu = [
|
||||
u'blankScreenButton',
|
||||
u'themeScreenButton',
|
||||
u'desktopScreenButton'
|
||||
]
|
||||
self.hideMenuList = [
|
||||
u'hideMenu'
|
||||
]
|
||||
self.timer_id = 0
|
||||
self.songEdit = False
|
||||
self.selectedRow = 0
|
||||
@ -193,6 +201,19 @@ class SlideController(DisplayController):
|
||||
self.hideMenu.menu().addAction(self.blankScreen)
|
||||
self.hideMenu.menu().addAction(self.themeScreen)
|
||||
self.hideMenu.menu().addAction(self.desktopScreen)
|
||||
# Wide menu of display control buttons.
|
||||
self.blankScreenButton = QtGui.QToolButton(self.toolbar)
|
||||
self.blankScreenButton.setObjectName(u'blankScreenButton')
|
||||
self.toolbar.addToolbarWidget(self.blankScreenButton)
|
||||
self.blankScreenButton.setDefaultAction(self.blankScreen)
|
||||
self.themeScreenButton = QtGui.QToolButton(self.toolbar)
|
||||
self.themeScreenButton.setObjectName(u'themeScreenButton')
|
||||
self.toolbar.addToolbarWidget(self.themeScreenButton)
|
||||
self.themeScreenButton.setDefaultAction(self.themeScreen)
|
||||
self.desktopScreenButton = QtGui.QToolButton(self.toolbar)
|
||||
self.desktopScreenButton.setObjectName(u'desktopScreenButton')
|
||||
self.toolbar.addToolbarWidget(self.desktopScreenButton)
|
||||
self.desktopScreenButton.setDefaultAction(self.desktopScreen)
|
||||
self.toolbar.addToolbarAction(u'loopSeparator', separator=True)
|
||||
# Play Slides Menu
|
||||
self.playSlidesMenu = QtGui.QToolButton(self.toolbar)
|
||||
@ -344,6 +365,7 @@ class SlideController(DisplayController):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'slidecontroller_toggle_display'), self.toggleDisplay)
|
||||
self.toolbar.setWidgetVisible(self.loopList, False)
|
||||
self.toolbar.setWidgetVisible(self.wideMenu, False)
|
||||
else:
|
||||
QtCore.QObject.connect(self.previewListWidget,
|
||||
QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), self.onGoLiveClick)
|
||||
@ -562,7 +584,20 @@ class SlideController(DisplayController):
|
||||
width = self.parent().controlSplitter.sizes()[self.split]
|
||||
for framenumber in range(len(self.serviceItem.get_frames())):
|
||||
self.previewListWidget.setRowHeight(framenumber, width / self.ratio)
|
||||
self.onControllerSizeChanged(self.controller.width(), self.controller.height())
|
||||
|
||||
def onControllerSizeChanged(self, width, height):
|
||||
"""
|
||||
Change layout of display control buttons on controller size change
|
||||
"""
|
||||
if self.isLive:
|
||||
if width > 300 and self.hideMenu.isVisible():
|
||||
self.toolbar.setWidgetVisible(self.hideMenuList, False)
|
||||
self.toolbar.setWidgetVisible(self.wideMenu)
|
||||
elif width < 300 and not self.hideMenu.isVisible():
|
||||
self.toolbar.setWidgetVisible(self.wideMenu, False)
|
||||
self.toolbar.setWidgetVisible(self.hideMenuList)
|
||||
|
||||
def onSongBarHandler(self):
|
||||
request = self.sender().text()
|
||||
slide_no = self.slideList[request]
|
||||
|
Loading…
Reference in New Issue
Block a user