Mercurial Hosting > editor
comparison src/luan_editor/window.luan @ 53:d5681da8ece8
add website
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 24 May 2025 21:52:13 -0600 |
parents | 3f4c3722b78b |
children |
comparison
equal
deleted
inserted
replaced
52:3f4c3722b78b | 53:d5681da8ece8 |
---|---|
30 local run_later = Swing.run_later or error() | 30 local run_later = Swing.run_later or error() |
31 local File_chooser = require "luan:swing/File_chooser.luan" | 31 local File_chooser = require "luan:swing/File_chooser.luan" |
32 local choose_file = File_chooser.awt_choose_file or error() | 32 local choose_file = File_chooser.awt_choose_file or error() |
33 local Option_pane = require "luan:swing/Option_pane.luan" | 33 local Option_pane = require "luan:swing/Option_pane.luan" |
34 local show_message_dialog = Option_pane.show_message_dialog or error() | 34 local show_message_dialog = Option_pane.show_message_dialog or error() |
35 local Java = require "classpath:luan_editor/Java.luan" | |
35 local Logging = require "luan:logging/Logging.luan" | 36 local Logging = require "luan:logging/Logging.luan" |
36 local logger = Logging.logger "editor/window" | 37 local logger = Logging.logger "editor/window" |
37 | 38 |
38 | 39 |
39 local n_windows = 0 | 40 local n_windows = 0 |
45 else | 46 else |
46 return default | 47 return default |
47 end | 48 end |
48 end | 49 end |
49 | 50 |
50 local config_file = Io.uri("file:"..Swing.home_dir.."/.luan_editor/config.json") | 51 local config_file = Io.uri("file:"..Java.home_dir.."/.luan_editor/config.json") |
51 local config = {} | 52 local config = {} |
52 if config_file.exists() then | 53 if config_file.exists() then |
53 try | 54 try |
54 config = json_parse(config_file.read_text()) | 55 config = json_parse(config_file.read_text()) |
55 catch e | 56 catch e |