Commits

Geoffrey French committed 8388c02

Fixed bugs in application window title acquisition.

  • Participants
  • Parent commits 5db39b6
  • Tags 0.1.31o-alpha

Comments (0)

Files changed (2)

File larch/Britefury/Windows/Window.py

 
 		
 class Window (object):
-	def __init__(self, windowManager, commandConsoleFactory, subject):
+	def __init__(self, windowManager, commandConsoleFactory, subject, windowTitle):
 		self._windowManager = windowManager
 
 
 				pass
 
 
-		# Invoke the Larch Hook getLarchWindowTitle to get the application's window title
-		windowTitle = 'Larch'
-		try:
-			getLarchWindowTitle = subject.getFocus().getLarchWindowTitle
-		except AttributeError:
-			pass
-		else:
-			windowTitle = getLarchWindowTitle()
-
-
 		self.__frame = JFrame( windowTitle )
 
 		self.__frame.setJMenuBar( menuBar )

File larch/Britefury/Windows/WindowManager.py

 		
 		self.__appState = world.rootSubject.getFocus()
 
-		self.__rootWindow = Window( self, createCommandConsole, world.rootSubject )
+
+		# Invoke the Larch Hook getLarchWindowTitle to get the application's window title
+		self.__windowTitle = 'Larch'
+		try:
+			getLarchWindowTitle = self.__appState.getLarchWindowTitle
+		except AttributeError:
+			pass
+		else:
+			self.__windowTitle = getLarchWindowTitle()
+
+
+		self.__rootWindow = Window( self, createCommandConsole, world.rootSubject, self.__windowTitle )
 		self.__rootWindow.onCloseRequestListener = self.__onWindowCloseRequest
 		self.__openWindows = { self.__rootWindow }
 		
 			pass
 		else:
 			onAppInit(self)
+
+
+
 		
 
 		
 
 		
 	def _createNewWindow(self, subject):
-		newWindow = Window( self, self.__createCommandConsole, subject )
+		newWindow = Window( self, self.__createCommandConsole, subject, self.__windowTitle )
 		newWindow.onCloseRequestListener = self.__onWindowCloseRequest
 		newWindow.show()
 		self.__openWindows.add( newWindow )