forked from openlp/openlp
fix fields
This commit is contained in:
parent
257fba8548
commit
b860abb23b
@ -54,4 +54,4 @@ def check_directory_exists(directory, do_not_log=False):
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
from .applocation import AppLocation
|
||||
from .applocation import AppLocation
|
||||
|
@ -46,4 +46,4 @@
|
||||
"font_main_x": 10,
|
||||
"font_main_y": 10,
|
||||
"theme_name": ""
|
||||
}
|
||||
}
|
||||
|
@ -42,52 +42,6 @@ from openlp.core.lib import str_to_bool, ScreenList, get_text_file_string
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
BLANK_THEME_XML = \
|
||||
'''<?xml version="1.0" encoding="utf-8"?>
|
||||
<theme version="1.0">
|
||||
<name> </name>
|
||||
<background type="image">
|
||||
<filename></filename>
|
||||
<borderColor>#000000</borderColor>
|
||||
</background>
|
||||
<background type="gradient">
|
||||
<startColor>#000000</startColor>
|
||||
<endColor>#000000</endColor>
|
||||
<direction>vertical</direction>
|
||||
</background>
|
||||
<background type="solid">
|
||||
<color>#000000</color>
|
||||
</background>
|
||||
<font type="main">
|
||||
<name>Arial</name>
|
||||
<color>#FFFFFF</color>
|
||||
<size>40</size>
|
||||
<bold>False</bold>
|
||||
<italics>False</italics>
|
||||
<line_adjustment>0</line_adjustment>
|
||||
<shadow shadowColor="#000000" shadowSize="5">True</shadow>
|
||||
<outline outlineColor="#000000" outlineSize="2">False</outline>
|
||||
<location override="False" x="10" y="10" width="1004" height="690"/>
|
||||
</font>
|
||||
<font type="footer">
|
||||
<name>Arial</name>
|
||||
<color>#FFFFFF</color>
|
||||
<size>12</size>
|
||||
<bold>False</bold>
|
||||
<italics>False</italics>
|
||||
<line_adjustment>0</line_adjustment>
|
||||
<shadow shadowColor="#000000" shadowSize="5">True</shadow>
|
||||
<outline outlineColor="#000000" outlineSize="2">False</outline>
|
||||
<location override="False" x="10" y="690" width="1004" height="78"/>
|
||||
</font>
|
||||
<display>
|
||||
<horizontalAlign>0</horizontalAlign>
|
||||
<verticalAlign>0</verticalAlign>
|
||||
<slideTransition>False</slideTransition>
|
||||
</display>
|
||||
</theme>
|
||||
'''
|
||||
|
||||
|
||||
class ThemeLevel(object):
|
||||
"""
|
||||
@ -204,8 +158,6 @@ class VerticalType(object):
|
||||
|
||||
BOOLEAN_LIST = ['bold', 'italics', 'override', 'outline', 'shadow', 'slide_transition']
|
||||
|
||||
BOOLEAN_LIST2 = ['True', 'False']
|
||||
|
||||
INTEGER_LIST = ['size', 'line_adjustment', 'x', 'height', 'y', 'width', 'shadow_size', 'outline_size',
|
||||
'horizontal_align', 'vertical_align', 'wrap_style']
|
||||
|
||||
@ -221,7 +173,7 @@ class ThemeXML(object):
|
||||
"""
|
||||
Initialise the theme object.
|
||||
"""
|
||||
# Create the minidom document
|
||||
# basic theme object with defaults
|
||||
json_dir = os.path.join(AppLocation.get_directory(AppLocation.AppDir), 'core', 'lib', 'json')
|
||||
json_file = os.path.join(json_dir, 'theme.json')
|
||||
jsn = get_text_file_string(json_file)
|
||||
|
@ -36,7 +36,7 @@ import sys
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import SettingsTab, Settings, UiStrings, translate, build_icon
|
||||
from openlp.core.utils import format_time, get_images_filter
|
||||
from openlp.core.lib import SlideLimits
|
||||
|
@ -41,7 +41,7 @@ from configparser import SafeConfigParser
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import PluginStatus, Settings, Registry, build_icon, check_directory_exists, translate
|
||||
from openlp.core.utils import get_web_page
|
||||
from .firsttimewizard import Ui_FirstTimeWizard, FirstTimePage
|
||||
|
@ -47,7 +47,7 @@ from openlp.core.lib.ui import UiStrings, create_action
|
||||
from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, ThemeManager, SlideController, PluginForm, \
|
||||
MediaDockManager, ShortcutListForm, FormattingTagForm
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.ui.media import MediaController
|
||||
from openlp.core.utils import LanguageManager, add_actions, get_application_version
|
||||
from openlp.core.utils.actions import ActionList, CategoryOrder
|
||||
|
@ -42,7 +42,7 @@ log = logging.getLogger(__name__)
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import OpenLPToolbar, ServiceItem, ItemCapabilities, Settings, PluginStatus, Registry, \
|
||||
UiStrings, build_icon, translate, str_to_bool, check_directory_exists
|
||||
from openlp.core.lib.theme import ThemeLevel
|
||||
|
@ -38,7 +38,7 @@ import re
|
||||
from xml.etree.ElementTree import ElementTree, XML
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import ImageSource, OpenLPToolbar, Registry, Settings, UiStrings, get_text_file_string, \
|
||||
build_icon, translate, check_item_selected, check_directory_exists, create_thumb, validate_thumb
|
||||
from openlp.core.lib.theme import ThemeXML, BackgroundType
|
||||
|
@ -32,9 +32,9 @@ The bible import functions for OpenLP
|
||||
import logging
|
||||
import os
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Settings, UiStrings, translate
|
||||
from openlp.core.lib.db import delete_database
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
|
@ -36,7 +36,7 @@ from tempfile import gettempdir
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Registry, Settings, UiStrings, translate, check_directory_exists
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings
|
||||
|
@ -38,7 +38,7 @@ from sqlalchemy import Column, ForeignKey, Table, or_, types, func
|
||||
from sqlalchemy.orm import class_mapper, mapper, relation
|
||||
from sqlalchemy.orm.exc import UnmappedClassError
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Registry, translate
|
||||
from openlp.core.lib.db import BaseModel, init_db, Manager
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
|
@ -30,7 +30,7 @@
|
||||
import logging
|
||||
import os
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Registry, Settings, translate
|
||||
from openlp.core.utils import delete_file
|
||||
from openlp.plugins.bibles.lib import parse_reference, get_reference_separator, LanguageSelection
|
||||
|
@ -32,7 +32,7 @@ import os
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import ItemCapabilities, MediaManagerItem, Registry, ServiceItemContext, Settings, \
|
||||
StringContent, TreeWidgetWithDnD, UiStrings, build_icon, check_directory_exists, check_item_selected, \
|
||||
create_thumb, translate, validate_thumb
|
||||
|
@ -32,7 +32,7 @@ import os
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import ItemCapabilities, MediaManagerItem,MediaType, Registry, ServiceItem, ServiceItemContext, \
|
||||
Settings, UiStrings, build_icon, check_item_selected, check_directory_exists, translate
|
||||
from openlp.core.lib.ui import critical_error_message_box, create_horizontal_adjusting_combo_box
|
||||
|
@ -33,7 +33,7 @@ import shutil
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Registry, Settings, check_directory_exists, create_thumb, validate_thumb
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
@ -35,7 +35,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||
from openlp.plugins.presentations.lib import PresentationController, PresentationMediaItem, PresentationTab
|
||||
|
||||
|
@ -124,7 +124,7 @@ from urllib.parse import urlparse, parse_qs
|
||||
from mako.template import Template
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Registry, Settings, PluginStatus, StringContent, image_to_byte
|
||||
from openlp.core.utils import translate
|
||||
|
||||
|
@ -40,7 +40,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Settings
|
||||
|
||||
from openlp.plugins.remotes.lib import HttpRouter
|
||||
|
@ -31,7 +31,7 @@ import os.path
|
||||
|
||||
from PyQt4 import QtCore, QtGui, QtNetwork
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Settings, SettingsTab, translate
|
||||
|
||||
ZERO_URL = '0.0.0.0'
|
||||
|
@ -35,7 +35,6 @@ import os
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.lib import Registry, translate
|
||||
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings
|
||||
from openlp.plugins.songs.lib import delete_song
|
||||
@ -45,6 +44,7 @@ from openlp.plugins.songs.lib.songcompare import songs_probably_equal
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DuplicateSongRemovalForm(OpenLPWizard):
|
||||
"""
|
||||
This is the Duplicate Song Removal Wizard. It provides functionality to
|
||||
|
@ -38,7 +38,7 @@ import shutil
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Registry, PluginStatus, MediaType, UiStrings, translate, create_separated_list, \
|
||||
check_directory_exists
|
||||
from openlp.core.lib.ui import set_case_insensitive_completer, critical_error_message_box, find_and_set_in_combo_box
|
||||
|
@ -36,7 +36,7 @@ import re
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.utils import CONTROL_CHARS
|
||||
from openlp.plugins.songs.lib.db import MediaFile, Song
|
||||
|
@ -35,7 +35,7 @@ import shutil
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from sqlalchemy.sql import or_
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Registry, MediaManagerItem, ItemCapabilities, PluginStatus, ServiceItemContext, Settings, \
|
||||
UiStrings, translate, check_item_selected, create_separated_list, check_directory_exists
|
||||
from openlp.core.lib.ui import create_widget_action
|
||||
|
@ -34,7 +34,7 @@ import os
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from openlp.core.lib import Registry, translate, check_directory_exists
|
||||
from openlp.core.ui.wizard import WizardStrings
|
||||
from openlp.plugins.songs.lib import clean_song, VerseType
|
||||
|
@ -32,7 +32,7 @@ Functional tests to test the AppLocation class and related methods.
|
||||
import copy
|
||||
from unittest import TestCase
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common import AppLocation
|
||||
from tests.functional import patch
|
||||
|
||||
FILE_LIST = ['file1', 'file2', 'file3.txt', 'file4.txt', 'file5.mp3', 'file6.mp3']
|
||||
|
Loading…
Reference in New Issue
Block a user