@@ -266,10 +266,9 @@ def __init__(self, parent, name=None, run_workbox=False, standalone=False):
266266
267267 self .dont_ask_again = []
268268
269- # Load any plugins that modify the LoggerWindow
270- self .plugins = {}
271- for name , plugin in plugins .loggerwindow ():
272- self .plugins [name ] = plugin (self )
269+ # Load any plugins, and set window title
270+ self .loadPlugins ()
271+ self .setWindowTitle (self .defineWindowTitle ())
273272
274273 self .restorePrefs ()
275274
@@ -282,17 +281,6 @@ def __init__(self, parent, name=None, run_workbox=False, standalone=False):
282281 action .triggered .connect (partial (self .setStyleSheet , style_name ))
283282
284283 self .uiConsoleTOOLBAR .show ()
285- loggerName = QApplication .instance ().translate (
286- 'PrEditorWindow' , DEFAULT_CORE_NAME
287- )
288- self .setWindowTitle (
289- '{} - {} - {} {}-bit' .format (
290- loggerName ,
291- self .name ,
292- '{}.{}.{}' .format (* sys .version_info [:3 ]),
293- osystem .getPointerSize (),
294- )
295- )
296284
297285 self .setWorkboxFontBasedOnConsole ()
298286 self .setEditorChooserFontBasedOnConsole ()
@@ -333,6 +321,29 @@ def apply_options(self):
333321
334322 self .update_workbox_stack ()
335323
324+ def loadPlugins (self ):
325+ """Load any plugins that modify the LoggerWindow."""
326+ self .plugins = {}
327+ for name , plugin in plugins .loggerwindow ():
328+ if name not in self .plugins :
329+ self .plugins [name ] = plugin (self )
330+
331+ def defineWindowTitle (self ):
332+ """Define the window title, including and info plugins may add."""
333+
334+ # Define the title
335+ loggerName = QApplication .instance ().translate (
336+ 'PrEditorWindow' , DEFAULT_CORE_NAME
337+ )
338+ pyVersion = '{}.{}.{}' .format (* sys .version_info [:3 ])
339+ size = osystem .getPointerSize ()
340+ title = f"{ loggerName } - { self .name } - { pyVersion } { size } -bit"
341+
342+ # Add any info plugins may add to title
343+ for _name , plugin in self .plugins .items ():
344+ title = plugin .updateWindowTitle (title )
345+ return title
346+
336347 def comment_toggle (self ):
337348 self .current_workbox ().__comment_toggle__ ()
338349
0 commit comments