Skip to content

Commit 8514a07

Browse files
committed
Default to the configured core name if not specified for LoggerWindow
1 parent 9372dd7 commit 8514a07

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

preditor/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ def configure(name, parent_callback=None, excepthook=True, logging=True, streams
113113
preditor.debug.BlurExcepthook.install()
114114

115115

116+
def get_core_name():
117+
"""Returns the configured core_name or DEFAULT_CORE_NAME."""
118+
return _global_config.get('core_name', DEFAULT_CORE_NAME)
119+
120+
116121
def launch(run_workbox=False, app_id=None, name=None, standalone=False):
117122
"""Launches the preditor gui creating the QApplication instance if not
118123
already created.

preditor/gui/loggerwindow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
about_preditor,
3131
core,
3232
debug,
33+
get_core_name,
3334
osystem,
3435
plugins,
3536
prefs,
@@ -60,7 +61,7 @@ class LoggerWindow(Window):
6061

6162
def __init__(self, parent, name=None, run_workbox=False, standalone=False):
6263
super(LoggerWindow, self).__init__(parent=parent)
63-
self.name = name if name else DEFAULT_CORE_NAME
64+
self.name = name if name else get_core_name()
6465
self.aboutToClearPathsEnabled = False
6566
self._stylesheet = 'Bright'
6667

0 commit comments

Comments
 (0)