forked from openlp/openlp
Minor cleanups
This commit is contained in:
parent
cc4b8e4242
commit
eb8864f569
@ -484,8 +484,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
|
||||
projector = list_item.data(QtCore.Qt.UserRole)
|
||||
try:
|
||||
projector.link.connect_to_host()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
def on_delete_projector(self, opt=None):
|
||||
|
@ -912,11 +912,11 @@ class PJLink(QtNetwork.QTcpSocket, PJLinkCommands):
|
||||
# Check for connection errors first
|
||||
if self.error_status != S_OK:
|
||||
log.debug('({ip}) Signalling error code'.format(ip=self.entry.name))
|
||||
(code, message) = self._get_status(self.error_status)
|
||||
code, message = self._get_status(self.error_status)
|
||||
status = self.error_status
|
||||
else:
|
||||
log.debug('({ip}) Signalling status code'.format(ip=self.entry.name))
|
||||
(code, message) = self._get_status(status)
|
||||
code, message = self._get_status(status)
|
||||
if msg is not None:
|
||||
message = msg
|
||||
elif message is None:
|
||||
|
@ -455,7 +455,7 @@ class AdvancedTab(SettingsTab):
|
||||
Service Name options changed
|
||||
"""
|
||||
self.service_name_day.setEnabled(default_service_enabled)
|
||||
time_enabled = default_service_enabled and self.service_name_day.currentIndex() is not 7
|
||||
time_enabled = default_service_enabled and self.service_name_day.currentIndex() != 7
|
||||
self.service_name_time.setEnabled(time_enabled)
|
||||
self.service_name_edit.setEnabled(default_service_enabled)
|
||||
self.service_name_revert_button.setEnabled(default_service_enabled)
|
||||
@ -497,7 +497,7 @@ class AdvancedTab(SettingsTab):
|
||||
"""
|
||||
React to the day of the service name changing.
|
||||
"""
|
||||
self.service_name_time.setEnabled(service_day is not 7)
|
||||
self.service_name_time.setEnabled(service_day != 7)
|
||||
self.update_service_name_example(None)
|
||||
|
||||
def on_service_name_revert_button_clicked(self):
|
||||
|
@ -206,7 +206,7 @@ class ThemesTab(SettingsTab):
|
||||
find_and_set_in_combo_box(self.default_combo_box, self.global_theme)
|
||||
# self.renderer.set_global_theme()
|
||||
self.renderer.set_theme_level(self.theme_level)
|
||||
if self.global_theme is not '':
|
||||
if self.global_theme != '':
|
||||
self._preview_global_theme()
|
||||
|
||||
def _preview_global_theme(self):
|
||||
|
Loading…
Reference in New Issue
Block a user