forked from openlp/openlp
dead code, not used variables, docs, unused imports
This commit is contained in:
parent
53d830b737
commit
8fb086134e
@ -296,8 +296,7 @@ def create_separated_list(string_list):
|
||||
|
||||
:param string_list: List of unicode strings
|
||||
"""
|
||||
if LooseVersion(Qt.PYQT_VERSION_STR) >= LooseVersion('4.9') and \
|
||||
LooseVersion(Qt.qVersion()) >= LooseVersion('4.8'):
|
||||
if LooseVersion(Qt.PYQT_VERSION_STR) >= LooseVersion('4.9') and LooseVersion(Qt.qVersion()) >= LooseVersion('4.8'):
|
||||
return QtCore.QLocale().createSeparatedList(string_list)
|
||||
if not string_list:
|
||||
return ''
|
||||
|
@ -63,8 +63,7 @@ class ScreenList(object):
|
||||
"""
|
||||
Initialise the screen list.
|
||||
|
||||
``desktop``
|
||||
A ``QDesktopWidget`` object.
|
||||
:param desktop: A QDesktopWidget object.
|
||||
"""
|
||||
screen_list = cls()
|
||||
screen_list.desktop = desktop
|
||||
@ -153,9 +152,9 @@ class ScreenList(object):
|
||||
:param screen: A dict with the screen properties::
|
||||
|
||||
{
|
||||
u'primary': True,
|
||||
u'number': 0,
|
||||
u'size': PyQt4.QtCore.QRect(0, 0, 1024, 768)
|
||||
'primary': True,
|
||||
'number': 0,
|
||||
'size': PyQt4.QtCore.QRect(0, 0, 1024, 768)
|
||||
}
|
||||
"""
|
||||
log.info('Screen %d found with resolution %s' % (screen['number'], screen['size']))
|
||||
|
@ -30,7 +30,7 @@
|
||||
The About dialog.
|
||||
"""
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from .aboutdialog import Ui_AboutDialog
|
||||
from openlp.core.lib import translate
|
||||
|
@ -30,7 +30,7 @@
|
||||
The GUI widgets of the exception dialog.
|
||||
"""
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
|
@ -170,6 +170,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard, RegistryProperties):
|
||||
elif self.currentId() == FirstTimePage.Progress:
|
||||
return -1
|
||||
elif self.currentId() == FirstTimePage.NoInternet:
|
||||
print(1111)
|
||||
return FirstTimePage.Progress
|
||||
elif self.currentId() == FirstTimePage.Themes:
|
||||
self.application.set_busy_cursor()
|
||||
@ -199,8 +200,8 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard, RegistryProperties):
|
||||
self.no_internet_label.setText(self.no_internet_text + self.cancelWizardText)
|
||||
elif page_id == FirstTimePage.Defaults:
|
||||
self.theme_combo_box.clear()
|
||||
for iter in range(self.themes_list_widget.count()):
|
||||
item = self.themes_list_widget.item(iter)
|
||||
for index in range(self.themes_list_widget.count()):
|
||||
item = self.themes_list_widget.item(index)
|
||||
if item.checkState() == QtCore.Qt.Checked:
|
||||
self.theme_combo_box.addItem(item.text())
|
||||
if self.has_run_wizard:
|
||||
@ -292,13 +293,9 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard, RegistryProperties):
|
||||
"""
|
||||
themes = self.config.get('themes', 'files')
|
||||
themes = themes.split(',')
|
||||
for theme in themes:
|
||||
filename = self.config.get('theme_%s' % theme, 'filename')
|
||||
for index, theme in enumerate(themes):
|
||||
screenshot = self.config.get('theme_%s' % theme, 'screenshot')
|
||||
for index in range(self.themes_list_widget.count()):
|
||||
item = self.themes_list_widget.item(index)
|
||||
if item.data(QtCore.Qt.UserRole) == filename:
|
||||
break
|
||||
item = self.themes_list_widget.item(index)
|
||||
item.setIcon(build_icon(os.path.join(gettempdir(), 'openlp', screenshot)))
|
||||
|
||||
def _get_file_size(self, url):
|
||||
|
@ -29,8 +29,6 @@
|
||||
"""
|
||||
The :mod:`~openlp.core.ui.media.mediaplayer` module contains the MediaPlayer class.
|
||||
"""
|
||||
import os
|
||||
|
||||
from openlp.core.common import RegistryProperties
|
||||
from openlp.core.ui.media import MediaState
|
||||
|
||||
|
@ -33,10 +33,8 @@ import logging
|
||||
import mimetypes
|
||||
from datetime import datetime
|
||||
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4.phonon import Phonon
|
||||
|
||||
from openlp.core.common import Settings
|
||||
from openlp.core.lib import translate
|
||||
|
||||
from openlp.core.ui.media import MediaState
|
||||
|
@ -54,19 +54,19 @@ class BibleFormat(object):
|
||||
WebDownload = 3
|
||||
|
||||
@staticmethod
|
||||
def get_class(format):
|
||||
def get_class(bible_format):
|
||||
"""
|
||||
Return the appropriate implementation class.
|
||||
|
||||
:param format: The Bible format.
|
||||
:param bible_format: The Bible format.
|
||||
"""
|
||||
if format == BibleFormat.OSIS:
|
||||
if bible_format == BibleFormat.OSIS:
|
||||
return OSISBible
|
||||
elif format == BibleFormat.CSV:
|
||||
elif bible_format == BibleFormat.CSV:
|
||||
return CSVBible
|
||||
elif format == BibleFormat.OpenSong:
|
||||
elif bible_format == BibleFormat.OpenSong:
|
||||
return OpenSongBible
|
||||
elif format == BibleFormat.WebDownload:
|
||||
elif bible_format == BibleFormat.WebDownload:
|
||||
return HTTPBible
|
||||
else:
|
||||
return None
|
||||
|
@ -837,7 +837,6 @@ class BibleMediaItem(MediaManagerItem):
|
||||
# If there are no more items we check whether we have to add bible_text.
|
||||
if bible_text:
|
||||
raw_slides.append(bible_text.lstrip())
|
||||
bible_text = ''
|
||||
# Service Item: Capabilities
|
||||
if self.settings.layout_style == LayoutStyle.Continuous and not second_bible:
|
||||
# Split the line but do not replace line breaks in renderer.
|
||||
|
@ -197,7 +197,6 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
|
||||
self.slide_list_view.clear()
|
||||
self.slide_list_view.addItems(slides)
|
||||
else:
|
||||
old_slides = []
|
||||
old_row = self.slide_list_view.currentRow()
|
||||
# Create a list with all (old/unedited) slides.
|
||||
old_slides = [self.slide_list_view.item(row).text() for row in range(self.slide_list_view.count())]
|
||||
|
@ -31,7 +31,7 @@ The :mod:`db` module provides the database and schema that is the backend for th
|
||||
"""
|
||||
|
||||
from sqlalchemy import Column, ForeignKey, Table, types
|
||||
from sqlalchemy.orm import mapper, relation, reconstructor
|
||||
from sqlalchemy.orm import mapper
|
||||
|
||||
from openlp.core.lib.db import BaseModel, init_db
|
||||
|
||||
|
@ -314,7 +314,6 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
def get_list(self, type=MediaType.Audio):
|
||||
media = Settings().value(self.settings_section + '/media files')
|
||||
media.sort(key=lambda filename: get_locale_key(os.path.split(str(filename))[1]))
|
||||
extension = []
|
||||
if type == MediaType.Audio:
|
||||
extension = self.media_controller.audio_extensions_list
|
||||
else:
|
||||
|
@ -319,8 +319,6 @@ class SongSelectForm(QtGui.QDialog, Ui_SongSelectDialog):
|
||||
def on_search_finished(self):
|
||||
"""
|
||||
Slot which is called when the search is completed.
|
||||
|
||||
:param songs:
|
||||
"""
|
||||
self.application.process_events()
|
||||
self.search_progress_bar.setVisible(False)
|
||||
|
Loading…
Reference in New Issue
Block a user