forked from openlp/openlp
Reformatted a comment; Renamed NT to WIN; Made OpenLPMixin constructor slightly more robust.
This commit is contained in:
parent
ceeb1b0118
commit
496c12b2db
@ -36,10 +36,9 @@ if __name__ == '__main__':
|
|||||||
"""
|
"""
|
||||||
Instantiate and run the application.
|
Instantiate and run the application.
|
||||||
"""
|
"""
|
||||||
# Mac OS X passes arguments like '-psn_XXXX' to gui application.
|
# Mac OS X passes arguments like '-psn_XXXX' to the application. This argument is actually a process serial number.
|
||||||
# This argument is process serial number. However, this causes
|
# However, this causes a conflict with other OpenLP arguments. Since we do not use this argument we can delete it
|
||||||
# conflict with other OpenLP arguments. Since we do not use this
|
# to avoid any potential conflicts.
|
||||||
# argument we can delete it to avoid any potential conflicts.
|
|
||||||
if sys.platform.startswith('darwin'):
|
if sys.platform.startswith('darwin'):
|
||||||
sys.argv = [x for x in sys.argv if not x.startswith('-psn')]
|
sys.argv = [x for x in sys.argv if not x.startswith('-psn')]
|
||||||
main()
|
main()
|
||||||
|
@ -59,7 +59,7 @@ __all__ = ['OpenLP', 'main']
|
|||||||
|
|
||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
|
|
||||||
NT_REPAIR_STYLESHEET = """
|
WIN_REPAIR_STYLESHEET = """
|
||||||
QMainWindow::separator
|
QMainWindow::separator
|
||||||
{
|
{
|
||||||
border: none;
|
border: none;
|
||||||
@ -127,7 +127,7 @@ class OpenLP(OpenLPMixin, QtGui.QApplication):
|
|||||||
'QTableWidget, QListWidget, QTreeWidget {alternate-background-color: ' + base_color.name() + ';}\n'
|
'QTableWidget, QListWidget, QTreeWidget {alternate-background-color: ' + base_color.name() + ';}\n'
|
||||||
application_stylesheet += alternate_rows_repair_stylesheet
|
application_stylesheet += alternate_rows_repair_stylesheet
|
||||||
if is_win():
|
if is_win():
|
||||||
application_stylesheet += NT_REPAIR_STYLESHEET
|
application_stylesheet += WIN_REPAIR_STYLESHEET
|
||||||
if application_stylesheet:
|
if application_stylesheet:
|
||||||
self.setStyleSheet(application_stylesheet)
|
self.setStyleSheet(application_stylesheet)
|
||||||
show_splash = Settings().value('core/show splash')
|
show_splash = Settings().value('core/show splash')
|
||||||
|
@ -33,6 +33,7 @@ import logging
|
|||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
from openlp.core.common import trace_error_handler
|
from openlp.core.common import trace_error_handler
|
||||||
|
|
||||||
DO_NOT_TRACE_EVENTS = ['timerEvent', 'paintEvent', 'drag_enter_event', 'drop_event', 'on_controller_size_changed',
|
DO_NOT_TRACE_EVENTS = ['timerEvent', 'paintEvent', 'drag_enter_event', 'drop_event', 'on_controller_size_changed',
|
||||||
'preview_size_changed', 'resizeEvent']
|
'preview_size_changed', 'resizeEvent']
|
||||||
|
|
||||||
@ -41,11 +42,8 @@ class OpenLPMixin(object):
|
|||||||
"""
|
"""
|
||||||
Base Calling object for OpenLP classes.
|
Base Calling object for OpenLP classes.
|
||||||
"""
|
"""
|
||||||
def __init__(self, parent):
|
def __init__(self, *args, **kwargs):
|
||||||
try:
|
super(OpenLPMixin, self).__init__(*args, **kwargs)
|
||||||
super(OpenLPMixin, self).__init__(parent)
|
|
||||||
except TypeError:
|
|
||||||
super(OpenLPMixin, self).__init__()
|
|
||||||
self.logger = logging.getLogger("%s.%s" % (self.__module__, self.__class__.__name__))
|
self.logger = logging.getLogger("%s.%s" % (self.__module__, self.__class__.__name__))
|
||||||
if self.logger.getEffectiveLevel() == logging.DEBUG:
|
if self.logger.getEffectiveLevel() == logging.DEBUG:
|
||||||
for name, m in inspect.getmembers(self, inspect.ismethod):
|
for name, m in inspect.getmembers(self, inspect.ismethod):
|
||||||
|
Loading…
Reference in New Issue
Block a user