forked from openlp/openlp
clean up
This commit is contained in:
parent
6c5330b0e8
commit
711c246687
@ -64,8 +64,7 @@ class Ui_PrintServiceDialog(object):
|
|||||||
'Options'))
|
'Options'))
|
||||||
self.optionsButton.setToolButtonStyle(
|
self.optionsButton.setToolButtonStyle(
|
||||||
QtCore.Qt.ToolButtonTextBesideIcon)
|
QtCore.Qt.ToolButtonTextBesideIcon)
|
||||||
self.optionsButton.setIcon(QtGui.QIcon(
|
self.optionsButton.setIcon(build_icon(u':/system/system_configure.png'))
|
||||||
build_icon(u':/system/system_configure.png')))
|
|
||||||
self.optionsButton.setCheckable(True)
|
self.optionsButton.setCheckable(True)
|
||||||
self.toolbar.addWidget(self.optionsButton)
|
self.toolbar.addWidget(self.optionsButton)
|
||||||
self.closeButton = self.toolbar.addAction(
|
self.closeButton = self.toolbar.addAction(
|
||||||
@ -80,24 +79,23 @@ class Ui_PrintServiceDialog(object):
|
|||||||
translate('OpenLP.PrintServiceForm', 'Copy as HTML'))
|
translate('OpenLP.PrintServiceForm', 'Copy as HTML'))
|
||||||
self.toolbar.addSeparator()
|
self.toolbar.addSeparator()
|
||||||
self.zoomInButton = QtGui.QToolButton(self.toolbar)
|
self.zoomInButton = QtGui.QToolButton(self.toolbar)
|
||||||
self.zoomInButton.setIcon(QtGui.QIcon(
|
self.zoomInButton.setIcon(build_icon(u':/general/general_zoom_in.png'))
|
||||||
build_icon(u':/general/general_zoom_in.png')))
|
|
||||||
self.zoomInButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
self.zoomInButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||||
'Zoom In'))
|
'Zoom In'))
|
||||||
self.zoomInButton.setObjectName(u'zoomInButton')
|
self.zoomInButton.setObjectName(u'zoomInButton')
|
||||||
self.zoomInButton.setIconSize(QtCore.QSize(22, 22))
|
self.zoomInButton.setIconSize(QtCore.QSize(22, 22))
|
||||||
self.toolbar.addWidget(self.zoomInButton)
|
self.toolbar.addWidget(self.zoomInButton)
|
||||||
self.zoomOutButton = QtGui.QToolButton(self.toolbar)
|
self.zoomOutButton = QtGui.QToolButton(self.toolbar)
|
||||||
self.zoomOutButton.setIcon(QtGui.QIcon(
|
self.zoomOutButton.setIcon(
|
||||||
build_icon(u':/general/general_zoom_out.png')))
|
build_icon(u':/general/general_zoom_out.png'))
|
||||||
self.zoomOutButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
self.zoomOutButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||||
'Zoom Out'))
|
'Zoom Out'))
|
||||||
self.zoomOutButton.setObjectName(u'zoomOutButton')
|
self.zoomOutButton.setObjectName(u'zoomOutButton')
|
||||||
self.zoomOutButton.setIconSize(QtCore.QSize(22, 22))
|
self.zoomOutButton.setIconSize(QtCore.QSize(22, 22))
|
||||||
self.toolbar.addWidget(self.zoomOutButton)
|
self.toolbar.addWidget(self.zoomOutButton)
|
||||||
self.zoomOriginalButton = QtGui.QToolButton(self.toolbar)
|
self.zoomOriginalButton = QtGui.QToolButton(self.toolbar)
|
||||||
self.zoomOriginalButton.setIcon(QtGui.QIcon(
|
self.zoomOriginalButton.setIcon(
|
||||||
build_icon(u':/general/general_zoom_original.png')))
|
build_icon(u':/general/general_zoom_original.png'))
|
||||||
self.zoomOriginalButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
self.zoomOriginalButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||||
'Zoom Original'))
|
'Zoom Original'))
|
||||||
self.zoomOriginalButton.setObjectName(u'zoomOriginalButton')
|
self.zoomOriginalButton.setObjectName(u'zoomOriginalButton')
|
||||||
|
@ -44,7 +44,7 @@ if sys.platform != u'win32' and sys.platform != u'darwin':
|
|||||||
XDG_BASE_AVAILABLE = False
|
XDG_BASE_AVAILABLE = False
|
||||||
|
|
||||||
import openlp
|
import openlp
|
||||||
from openlp.core.lib import Receiver, translate
|
from openlp.core.lib import Receiver, translate, check_directory_exists
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
IMAGES_FILTER = None
|
IMAGES_FILTER = None
|
||||||
@ -146,8 +146,7 @@ class AppLocation(object):
|
|||||||
Return the path OpenLP stores all its data under.
|
Return the path OpenLP stores all its data under.
|
||||||
"""
|
"""
|
||||||
path = AppLocation.get_directory(AppLocation.DataDir)
|
path = AppLocation.get_directory(AppLocation.DataDir)
|
||||||
if not os.path.exists(path):
|
check_directory_exists(path)
|
||||||
os.makedirs(path)
|
|
||||||
return path
|
return path
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -157,8 +156,7 @@ class AppLocation(object):
|
|||||||
"""
|
"""
|
||||||
data_path = AppLocation.get_data_path()
|
data_path = AppLocation.get_data_path()
|
||||||
path = os.path.join(data_path, section)
|
path = os.path.join(data_path, section)
|
||||||
if not os.path.exists(path):
|
check_directory_exists(path)
|
||||||
os.makedirs(path)
|
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def _get_os_dir_path(dir_type):
|
def _get_os_dir_path(dir_type):
|
||||||
|
Loading…
Reference in New Issue
Block a user