about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-09-03 17:20:11 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-09-03 17:20:11 -0700
commitc6f88dccfa9ef6922fa19885f3d5569e809414ed (patch)
treee0b5cd1ea536d0fc8c2f2e4575de008b9620c5d4
parent5cada8cc9e0ac94ef6fdc1e7eb7be906ae367cd6 (diff)
downloadtext.love-c6f88dccfa9ef6922fa19885f3d5569e809414ed.tar.gz
set window title within each app
The main app shows the file being edited, but the programming environment does not.
-rw-r--r--main.lua2
-rw-r--r--source.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/main.lua b/main.lua
index 72bfff3..7b2da57 100644
--- a/main.lua
+++ b/main.lua
@@ -88,7 +88,6 @@ function App.initialize(arg)
   else
     assert(false, 'unknown app "'..Current_app..'"')
   end
-  love.window.setTitle('lines.love - '..Current_app)
 end
 
 function App.resize(w,h)
@@ -110,7 +109,6 @@ function App.filedropped(file)
   else
     assert(false, 'unknown app "'..Current_app..'"')
   end
-  love.window.setTitle('lines.love - '..Current_app)
 end
 
 function App.focus(in_focus)
diff --git a/source.lua b/source.lua
index 6f2b131..d346b8f 100644
--- a/source.lua
+++ b/source.lua
@@ -69,6 +69,7 @@ function source.initialize()
   Menu_status_bar_height = 5 + Editor_state.line_height + 5
   Editor_state.top = Editor_state.top + Menu_status_bar_height
   Log_browser_state.top = Log_browser_state.top + Menu_status_bar_height
+  love.window.setTitle('lines.love - source')
 end
 
 -- environment for a mutable file of bifolded text
@@ -196,6 +197,7 @@ function source.filedropped(file)
   Text.redraw_all(Editor_state)
   Editor_state.screen_top1 = {line=1, pos=1}
   Editor_state.cursor1 = {line=1, pos=1}
+  love.window.setTitle('lines.love - source')
 end
 
 -- a copy of source.filedropped when given a filename