Code cleanups

This commit is contained in:
Ken Roberts 2014-10-21 14:50:35 -07:00
parent b38921a90b
commit 2b5b58379f
4 changed files with 6 additions and 33 deletions

View File

@ -49,7 +49,7 @@ from openlp.core.lib.projector.constants import PJLINK_PORT
class Ui_ProjectorEditForm(object):
"""
The :class:`~opelp.core.lib.ui.projector.editform.Ui_ProjectorEdiForm` class defines
The :class:`~openlp.core.lib.ui.projector.editform.Ui_ProjectorEditForm` class defines
the user interface for the ProjectorEditForm dialog.
"""
def setupUi(self, edit_projector_dialog):
@ -120,7 +120,7 @@ class Ui_ProjectorEditForm(object):
else:
title = translate('OpenLP.ProjectorEditForm', 'Edit Projector')
edit_projector_dialog.setWindowTitle(title)
self.ip_label.setText(translate('OpenLP.ProjetorEditForm', 'IP Address'))
self.ip_label.setText(translate('OpenLP.ProjectorEditForm', 'IP Address'))
self.ip_text.setText(self.projector.ip)
self.port_label.setText(translate('OpenLP.ProjectorEditForm', 'Port Number'))
self.port_text.setText(str(self.projector.port))

View File

@ -325,7 +325,7 @@ class ProjectorManager(OpenLPMixin, RegistryMixin, QWidget, Ui_ProjectorManager,
self.socket_timeout = settings.value('socket timeout')
self.source_select_dialog_type = settings.value('source dialog type')
settings.endGroup()
del(settings)
del settings
def context_menu(self, point):
"""
@ -922,7 +922,7 @@ class ProjectorManager(OpenLPMixin, RegistryMixin, QWidget, Ui_ProjectorManager,
"""
QtGui.QMessageBox.warning(self, translate('OpenLP.ProjectorManager',
'"%s" Authentication Error' % name),
'<br />There was an authentictaion error while trying to connect.'
'<br />There was an authentication error while trying to connect.'
'<br /><br />Please verify your PIN setting '
'for projector item "%s"' % name)

View File

@ -120,7 +120,7 @@ def Build_Tab(group, source_key, default):
group.addButton(itemwidget, int(key))
layout.addWidget(itemwidget)
layout.addStretch()
return (widget, button_count, buttonchecked)
return widget, button_count, buttonchecked
class FingerTabBarWidget(QTabBar):
@ -317,33 +317,6 @@ class SourceSelectSingle(QDialog):
selected = super(SourceSelectSingle, self).exec_()
return selected
title = QtGui.QLabel(translate('OpenLP.SourceSelectSingle', 'Select the input source below'))
self.layout.addWidget(title)
self.radio_buttons = []
source_list = self.projectordb.get_source_list(make=projector.link.manufacturer,
model=projector.link.model,
sources=projector.link.source_available)
sort = []
for item in source_list.keys():
sort.append(item)
sort.sort()
current = QtGui.QLabel(translate('OpenLP.SourceSelectSingle', 'Current source is %s' %
source_list[projector.link.source]))
layout.addWidget(current)
for item in sort:
button = self._select_input_widget(parent=self,
selected=projector.link.source,
code=item,
text=source_list[item])
layout.addWidget(button)
button_box = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok |
QtGui.QDialogButtonBox.Cancel)
button_box.accepted.connect(box.accept_me)
button_box.rejected.connect(box.reject_me)
layout.addWidget(button_box)
selected = super(SourceSelectSingle, self).exec_()
return selected
@pyqtSlot()
def accept_me(self):
"""

View File

@ -120,7 +120,7 @@ class ProjectorTab(SettingsTab):
def load(self):
"""
Load the projetor settings on startup
Load the projector settings on startup
"""
settings = Settings()
settings.beginGroup(self.settings_section)