Mercurial Hosting > editor
comparison src/luan_editor/Window.luan @ 69:3867e9e1b94c
list to_front
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 10 Jun 2025 20:47:20 -0600 |
| parents | 694359b01e06 |
| children | e972fb08a574 |
comparison
equal
deleted
inserted
replaced
| 68:694359b01e06 | 69:3867e9e1b94c |
|---|---|
| 97 function Window.show_list_window() | 97 function Window.show_list_window() |
| 98 local location = config.list_window.location | 98 local location = config.list_window.location |
| 99 if location ~= nil then | 99 if location ~= nil then |
| 100 list_window.location = location | 100 list_window.location = location |
| 101 end | 101 end |
| 102 list_window.visible = true | 102 list_window.is_visible = true |
| 103 list_scroll_pane.scroll_to_right() | 103 list_scroll_pane.scroll_to_right() |
| 104 end | 104 end |
| 105 | 105 |
| 106 local function add_list_window_item(item) | 106 local function add_list_window_item(item) |
| 107 list_view.add_element(item) | 107 list_view.add_element(item) |
| 205 documents[title] = nil | 205 documents[title] = nil |
| 206 end | 206 end |
| 207 end) | 207 end) |
| 208 frame.add_window_focus_listener(function() | 208 frame.add_window_focus_listener(function() |
| 209 list_view.selected_value = list_window_item | 209 list_view.selected_value = list_window_item |
| 210 if list_window.is_visible then | |
| 211 list_window.to_front() | |
| 212 end | |
| 210 end) | 213 end) |
| 211 frame.add_resize_stopped_listener( 200, function() | 214 frame.add_resize_stopped_listener( 200, function() |
| 212 --logger.info(stringify(frame.size)) | 215 --logger.info(stringify(frame.size)) |
| 213 config.size = frame.size | 216 config.size = frame.size |
| 214 save_config() | 217 save_config() |
| 368 frame.pack() | 371 frame.pack() |
| 369 local location = config.location | 372 local location = config.location |
| 370 if location ~= nil then | 373 if location ~= nil then |
| 371 frame.location = location | 374 frame.location = location |
| 372 end | 375 end |
| 373 frame.visible = true | 376 frame.is_visible = true |
| 374 text_area.request_focus_in_window() | 377 text_area.request_focus_in_window() |
| 375 n_windows = n_windows + 1 | 378 n_windows = n_windows + 1 |
| 376 return window | 379 return window |
| 377 end | 380 end |
| 378 Window.new_window = new_window | 381 Window.new_window = new_window |
