Commit Graph

703 Commits

Author SHA1 Message Date
Isaiah Odhner
35893c987d Unify to double quotes 2023-07-22 01:12:13 -04:00
Isaiah Odhner
03c910af31 Ensure spaces at start of comments 2023-07-22 01:07:05 -04:00
Isaiah Odhner
2b9e377d7d Check spelling of wallpaper setting code 2023-07-22 01:06:04 -04:00
Isaiah Odhner
7481750633 Fix dumb string interpolation 2023-07-22 00:43:28 -04:00
Isaiah Odhner
6af1497771 Note gsettings CLI fallback works on Ubuntu 2023-07-22 00:43:28 -04:00
Isaiah Odhner
0193773928 Avoid shell code injection in some disabled code 2023-07-22 00:13:30 -04:00
Isaiah Odhner
440fab6a53 Protect against command injection in osascript fallback 2023-07-22 00:05:35 -04:00
Isaiah Odhner
4ae4d71075 Fix osascript fallback for setting wallpaper on macOS 2023-07-21 23:55:34 -04:00
Isaiah Odhner
da0e5e52da Make watchdog properly optional 2023-07-21 21:31:40 -04:00
Isaiah Odhner
9f0ea03114 Skip .gpl files during --recode-samples 2023-07-21 16:35:08 -04:00
Isaiah Odhner
b4f425ee3f Prepare for first release 2023-07-21 16:30:49 -04:00
Isaiah Odhner
a44d5b7695 Use alternative tool icons for Windows Terminal 2023-07-21 13:08:36 -04:00
Isaiah Odhner
4383a882ee Use alternative tool icons for iTerm2 2023-07-20 19:44:47 -04:00
Isaiah Odhner
9f305a2f44 Ignore missing appscript dependency (outside macOS) in a different way 2023-07-20 18:05:23 -04:00
Isaiah Odhner
4d52257497 Clarify what feature is affected by font fallback
Truetype fonts are used for rasterizing ANSI art for Set As Wallpaper.
There are also FIGlet fonts in this app, for magnification.
2023-07-20 17:52:38 -04:00
Isaiah Odhner
ebab889eaf Ignore 'Type of "get_current_worker" is partially unknown'
$ PYRIGHT_PYTHON_FORCE_VERSION=1.1.316 pyright
WARNING: there is a new pyright version available (v1.1.316 -> v1.1.317).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`

/home/io/Projects/textual-paint/src/textual_paint/paint.py
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:39:28 - error: Type of "get_current_worker" is partially unknown
    Type of "get_current_worker" is "() -> Worker[Unknown]" (reportUnknownVariableType)
1 error, 0 warnings, 0 informations
2023-07-20 17:52:38 -04:00
Isaiah Odhner
e0e0ce3cb1 Fix deprecation warning, when specifying text layout engine 2023-07-20 17:50:16 -04:00
Isaiah Odhner
9aadcd7db3 Use Size type, just for fun, in get_screen_size 2023-07-20 16:47:16 -04:00
Isaiah Odhner
86c99b9186 Merge Quartz import statements 2023-07-20 16:41:48 -04:00
Isaiah Odhner
6864790efb Improve error message when opening binary file in Get Colors dialog 2023-07-20 16:40:23 -04:00
Isaiah Odhner
f666bfb704 Center image in View Bitmap mode, and restore scroll position
- Center the canvas (when it's smaller than the viewport).
- Adjust the scroll position when entering View Bitmap mode to anchor
  the top/left (when the image is larger than the viewport).
- Restore the scroll position when exiting View Bitmap mode.
2023-07-20 02:34:36 -04:00
Isaiah Odhner
68b92ff946 Zoom out temporarily for View Bitmap mode 2023-07-20 01:59:09 -04:00
Isaiah Odhner
7eff7d0476 Add meta-glyph rendering for corner triangle characters 2023-07-19 22:57:04 -04:00
Isaiah Odhner
3269d545c1 Note more alternatives 2023-07-19 22:30:49 -04:00
Isaiah Odhner
8b79dd98a9 Tweak grid style to be more like MS Paint
Avoid the cell background showing past the left/top of the border of the cell, by using left/top-aligned characters (▛▌▀) rather than centered border characters (┼┆┄).
2023-07-19 22:28:19 -04:00
Isaiah Odhner
507470ad10 Make grid more subtle by showing cell background underneath border 2023-07-19 22:15:15 -04:00
Isaiah Odhner
6a9e8703a6 Improve grid style 2023-07-19 21:59:47 -04:00
Isaiah Odhner
bf7fdac01d Implement View > Zoom > Show Grid 2023-07-19 21:53:10 -04:00
Isaiah Odhner
52a9425b36 Try to allow canceling Set As Wallpaper (probably silly) 2023-07-19 20:45:25 -04:00
Isaiah Odhner
f865acd56c Fix error handling for Set As Wallpaper worker thread 2023-07-19 13:58:31 -04:00
Isaiah Odhner
8e7113e1b5 Match font names case-insensitively and ignoring spaces 2023-07-19 01:44:20 -04:00
Isaiah Odhner
ec7986f9dd Add font names for Windows 2023-07-19 01:31:57 -04:00
Isaiah Odhner
b63f303cf4 Set wallpaper in a worker, to keep UI responsive 2023-07-19 01:26:33 -04:00
Isaiah Odhner
1c64fdb78c Fix Python rocket icon showing in dock on macOS after Set As Wallpaper 2023-07-18 18:32:32 -04:00
Isaiah Odhner
5c7272db91 Clean up Tk root widget
I was hoping this would fix the Python rocket icon showing in the dock on macOS, but it doesn't. It still stays until the program exits.
Might still be good to do though.
2023-07-18 18:32:32 -04:00
Isaiah Odhner
e2308c2a91 Add font names for macOS 2023-07-18 14:15:36 -04:00
Isaiah Odhner
10ed661022 Use unique IDs to actually reliably update wallpaper 2023-07-18 14:15:36 -04:00
Isaiah Odhner
3106a311eb Alternate between files to reliably update wallpaper 2023-07-18 14:15:36 -04:00
Isaiah Odhner
eb0f781ca8 Get screen size with tkinter instead
screeninfo caused a bouncing python rocket in the dock on mac, and didn't work.
2023-07-18 14:15:36 -04:00
Isaiah Odhner
7f3fe53d3e Get screen size properly, with screeninfo module 2023-07-18 14:03:51 -04:00
Isaiah Odhner
fd7f3e8fcc Get screen size in the simplest way that could possibly work 2023-07-18 14:03:51 -04:00
Isaiah Odhner
8fb561f457 Implement tiling vs centering wallpaper 2023-07-18 14:03:51 -04:00
Isaiah Odhner
00e6dd70b0 Set dark mode wallpaper as well on Ubuntu
This gets it working on my machine! And the last of the big three!
2023-07-18 14:03:51 -04:00
Isaiah Odhner
5fd214182c DRY gsettings schema/key 2023-07-18 14:03:51 -04:00
Isaiah Odhner
fece1c48c6 Rasterize before setting as wallpaper
This makes Set As Wallpaper work on Windows 10 and macOS 10.14
2023-07-18 14:03:51 -04:00
Isaiah Odhner
2966ebf6da Be consistent about encoding name 2023-07-17 20:04:25 -04:00
Isaiah Odhner
fc395e2db9 Specify UTF-8 encoding, since it's not default on Windows
https://peps.python.org/pep-0597/#using-the-default-encoding-is-a-common-mistake
2023-07-17 20:04:24 -04:00
Isaiah Odhner
033e86f4e7 Make psutil optional
It's hard to install on Windows, and this seems to be misleading:

    ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects
2023-07-17 19:18:31 -04:00
Isaiah Odhner
300291fcae Indicate non-regex raw string (conventionally)
Some tools highlight regex syntax when a lowercase `r` is used.
2023-07-17 13:49:41 -04:00
Isaiah Odhner
82dd98d8cb Fix invalid assertion on mac
os.name == "posix" (!)
2023-07-17 12:31:48 -04:00
Isaiah Odhner
321dd1284f Move "type: ignore" comment now serving a different purpose
Before this was presumably suppressing the `self.app` bogus error.
2023-07-17 12:25:33 -04:00
Isaiah Odhner
a0f837aad7 Remove unnecessary "type: ignore" comments 2023-07-16 01:06:24 -04:00
Isaiah Odhner
15b35eaf5c Fix new errors after updating pyright (v1.1.314 -> v1.1.317)
→ PYRIGHT_PYTHON_FORCE_VERSION=latest pyright

added 1 package, and audited 2 packages in 4s

found 0 vulnerabilities
/home/io/Projects/textual-paint/src/textual_paint/paint.py
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1173:64 - error: Condition will always evaluate to True since the types "Never" and "None" have no overlap (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1214:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1217:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1220:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1223:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1229:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
  /home/io/Projects/textual-paint/src/textual_paint/paint.py:1233:26 - error: Pattern will never be matched for subject type "Never" (reportUnnecessaryComparison)
7 errors, 0 warnings, 0 informations
2023-07-15 23:32:18 -04:00
Isaiah Odhner
f21899fd1d Use LineFilter to avoid private _segments access
This fixes the last pyright error (on pyright v1.1.314)
2023-07-15 23:24:56 -04:00
Isaiah Odhner
f6a40028e8 Update and clarify help text 2023-07-15 23:05:41 -04:00
Isaiah Odhner
b62a92a782 Simplify using Segment.apply_style 2023-07-15 22:45:52 -04:00
Isaiah Odhner
96b2d08789 Ignore all but one last Pyright error
(on pyright v1.1.314)
2023-07-15 22:27:49 -04:00
Isaiah Odhner
26cf8c3e64 Annotate instruction from stransi 2023-07-15 22:26:41 -04:00
Isaiah Odhner
d5669f434f Fix type mismatch in unused code
error: Incompatible types in assignment (expression has type "None", variable has type "bool")  [assignment]
2023-07-15 21:52:47 -04:00
Isaiah Odhner
0a6fb29e10 Reorder None case for mypy
While Pyright can narrow down the type of format_id from `str | None` to `str` based on `format_id in Image.SAVE` (where `Image.SAVE` is `dict[str, Any]`), mypy does not.
2023-07-15 21:47:43 -04:00
Isaiah Odhner
641a46e368 Add type hints for mypy 2023-07-15 21:43:50 -04:00
Isaiah Odhner
3ff0b47650 Fix strange default for Window.title reactive var 2023-07-15 21:29:59 -04:00
Isaiah Odhner
eb81d5e934 Add missing annotations, needed for mypy 2023-07-15 21:22:25 -04:00
Isaiah Odhner
1c737fada2 Avoid shell=True and fix mypy errors about mismatching type for args 2023-07-15 21:09:08 -04:00
Isaiah Odhner
1ce0487a52 Fix reportOptionalMemberAccess errors for width/height 2023-07-15 21:09:08 -04:00
Isaiah Odhner
87f1f50f06 Fix some stupid pyright errors 2023-07-15 20:27:20 -04:00
Isaiah Odhner
f50aef18e7 None pizza with left beef 2023-07-15 19:44:05 -04:00
Isaiah Odhner
16f4bc0a88 Fix some mypy errors (and a couple pyright errors) 2023-07-15 19:44:05 -04:00
Isaiah Odhner
dd4fea1e78 Add py.typed for mypy 2023-07-15 19:44:05 -04:00
Isaiah Odhner
4fc5a6e8e5 Clarify a comment
"optional" is ambiguous, between optional arguments (i.e. parameters with a default value), and a union with `None` (i.e. `Optional`, or `| None`)
2023-07-15 19:44:05 -04:00
Isaiah Odhner
cbcf22c4d7 Clean up old _expanding_directory_tree flag, and logging 2023-07-15 19:44:05 -04:00
Isaiah Odhner
54f29eabf1 Fix false positives and false negatives for when to populate file name
When opening the Open dialog, it shouldn't populate the file name input,
but when clicking a file, it should fill in the clicked file's name.

The `_expanding_directory_tree` flag gave false positives:
- When opening a file in a directory the program doesn't have permissions to via the CLI,
  such as with `python -m src.textual_paint.paint /root/nonexistent`,
  opening the Open dialog, and clicking a file, it wasn't populating the filename input,
  because the flag was never cleared if it couldn't find (access) the
  directories and file matching any of the path parts, working down the directory structure.
  
  This was broken in [b3ca55a3b1] "Use new callback to remove race condition"
  but before, it just cleared the flag after a delay, so it wasn't a good solution,

It also gave false negatives:
- When opening the Open dialog, it was populating the name input field
  with the file selected programmatically with `expand_to_path`,
  instead of leaving it blank.
  
  The automatic expansion was broken in [e9755637d6] "Update Textual to 0.26.0"
  due to changes 0.25.0, since directory contents are now loaded in a worker.
  This flag's behavior was broken since rewriting the code to handle asynchronous directory loading in
  [4e1f11ab23] "Fix expanding directory tree to current folder, in file dialogs"

An alternative I considered was to create a new message such as `EnhancedDirectoryTree.NodeHighlighted`, but let's call it `EnhancedNodeHighlighted`, then to have `on_tree_node_highlighted` in `EnhancedDirectoryTree` which sends `EnhancedNodeHighlighted` always with `from_expand_to_path=False`, and then do:

    | # Suppress EnhancedNodeHighlighted with from_expand_to_path=False
    | with self.prevent(self.EnhancedNodeHighlighted):
    | 	self.select_node(node)
    | # Send it with the flag set
    | self.post_message(self.EnhancedNodeHighlighted(..., from_expand_to_path=True))

The solution I settled on was to add an `on_tree_node_highlighted` method to my `EnhancedDirectoryTree` for the purpose of clearing the flag, with still a further delay so that the app's `on_tree_node_highlighted` can use the flag before its cleared.

(I left `_expanding_directory_tree` in at this commit for comparison of the behavior. For a fair estimate of the complexity of this change, include the following cleanup in the diff.)
2023-07-15 19:44:05 -04:00
Isaiah Odhner
1b8b07def9 Move callback outside try block 2023-07-14 00:08:08 -04:00
Isaiah Odhner
f6607195e8 Clarify docstring association 2023-07-13 22:19:55 -04:00
Isaiah Odhner
c97203e882 Add more error handling to Get Colors 2023-07-13 20:03:23 -04:00
Isaiah Odhner
489bd95a20 Ignore permission errors when deleting backup
and improve error message in the general (fallback) case
2023-07-13 19:43:15 -04:00
Isaiah Odhner
6a4351d824 Handle arbitrary exceptions when deleting backup 2023-07-13 19:35:25 -04:00
Isaiah Odhner
67b4ec8ac4 Return to custom zoom level when zooming out and back in 2023-07-12 02:16:24 -04:00
Isaiah Odhner
9876a3c15c Repeat first color in palette when loading a palette
This ensures all colors are part of the palette.
It would be better to allow the number of color wells to change.
2023-07-12 01:51:57 -04:00
Isaiah Odhner
3713e9ed00 Switch color palette to mIRC's palette when saving/opening as mIRC code format 2023-07-12 01:51:57 -04:00
Isaiah Odhner
618fe00d81 Simplify IRC palette data structure, to match regular palette 2023-07-12 01:51:57 -04:00
Isaiah Odhner
967801cf17 Prevent digits in document from merging with mIRC color codes
If digits were present in the document, they were concatenated after
the color codes, and they ran together indistinguishably.
This changed the color index numbers that were read back, to potentially
invalid color indices, and lost the digits as part of the document.
It needs the delimiter of the ending escape code to separate the digits.
2023-07-12 01:51:57 -04:00
Isaiah Odhner
878bf45ea3 Fix nearest color finding 2023-07-11 18:51:12 -04:00
Isaiah Odhner
0eea55e7f6 Make saved mIRC files openable 2023-07-11 18:25:49 -04:00
Isaiah Odhner
645f1ec127 Add missing duplicate error handling for Paste From 2023-07-11 17:19:08 -04:00
Isaiah Odhner
da85d319e4 Add mIRC code export support 2023-07-11 04:00:22 -04:00
Isaiah Odhner
b885436966 Fix drag and drop of files with CharInput focused 2023-07-11 02:02:18 -04:00
Isaiah Odhner
85ba439cbd Fix pasting into CharInput not affecting brush 2023-07-11 02:02:18 -04:00
Isaiah Odhner
2c1069d619 Fix contrast of fieldsets in dark mode 2023-07-11 00:02:39 -04:00
Isaiah Odhner
da0abcbf1e Add stretch/skew icons to dialog 2023-07-10 23:57:48 -04:00
Isaiah Odhner
2d9ba1ae5f Implement stretch/skew 2023-07-10 21:32:17 -04:00
Isaiah Odhner
b5e52a1463 Conditionally enable angle radio buttons 2023-07-10 19:30:18 -04:00
Isaiah Odhner
f979090b42 Fix layout (Container caused contents to collapse) 2023-07-10 19:10:18 -04:00
Isaiah Odhner
7a81446558 WIP: merge flip/rotate and rotate dialogs 2023-07-10 19:10:18 -04:00
Isaiah Odhner
7d8dddb97f Implement rotate by angle 2023-07-10 18:47:11 -04:00
Isaiah Odhner
2a7d88b10c Implement flip horizontal/vertical 2023-07-10 17:28:19 -04:00
Isaiah Odhner
755a92fce0 DRY adding undos to the stack and clearing redos 2023-07-10 17:28:19 -04:00
Isaiah Odhner
5939c85ea4 Maybe this is cleaner, because it's type-checked 2023-07-10 17:28:19 -04:00
Isaiah Odhner
3a0552ada6 Fix wrapping focus within dialog windows (with Tab)
(broken in last commit)
2023-07-10 17:28:19 -04:00
Isaiah Odhner
c944a74f8d Make Ctrl+I work, distinguished from Tab heuristically 2023-07-10 17:28:19 -04:00
Isaiah Odhner
c1998c52f7 Fix lack of undo state for paste+stamp 2023-07-10 17:28:19 -04:00
Isaiah Odhner
46c52fcaf1 Fix arrow keys not moving selected data if not moved with mouse first 2023-07-10 17:28:19 -04:00
Isaiah Odhner
505cb389f2 Invert only within Free-Form Select's polygon
It turns out this isn't actually how MS Paint works (in Windows 98, my go-to reference), but, isn't it better this way?
2023-07-10 17:28:19 -04:00
Isaiah Odhner
a3e7a2d8b9 Extract method for selection extraction 2023-07-08 01:31:02 -04:00
Isaiah Odhner
54c9f6a500 Implement Image > Invert Colors 2023-07-08 01:14:40 -04:00
Isaiah Odhner
71dd8b50df Implement Image > Clear Image 2023-07-08 00:24:51 -04:00
Isaiah Odhner
2f7182d8c3 Fix structural validity of saved HTML 2023-06-30 21:49:41 -04:00
Isaiah Odhner
6c7d48e49f Disable saving in ICNS format, and update format support list 2023-06-30 21:00:42 -04:00
Isaiah Odhner
6c51b8fba0 Refactor format disabling
- confirm_information_loss and encode_to_format no longer need syncing
- other formats can be disabled easily
2023-06-30 20:10:24 -04:00
Isaiah Odhner
d886e31930 Configure ICO format saving 2023-06-30 19:42:16 -04:00
Isaiah Odhner
f64d75df3c Fix unnecessary backup saving due to reload_after_save 2023-06-30 19:05:06 -04:00
Isaiah Odhner
a2000e7374 Recover from backup file after Save As; fix backup files left behind
Note: "the backup file will be deleted on close" was no longer true since making it check `self.backup_checked_for`.
2023-06-30 18:49:50 -04:00
Isaiah Odhner
12d579592e Fix exception handler catching wrong exception 2023-06-30 17:14:42 -04:00
Isaiah Odhner
2e022bdfe1 Disable saving as JPEG because of low quality 2023-06-30 16:52:13 -04:00
Isaiah Odhner
b419b8ec7d Remove unused import
I had to use base64 instead of html.escape
2023-06-30 16:26:11 -04:00
Isaiah Odhner
5f3a7f259d Fix type signature 2023-06-30 16:23:09 -04:00
Isaiah Odhner
cd1161d454 Disable writing debug.svg 2023-06-30 14:19:39 -04:00
Isaiah Odhner
46e7e9bb30 Embed ANSI data in SVG for perfect round-trip 2023-06-30 14:04:45 -04:00
Isaiah Odhner
46017aca7b Show how to exit in status bar if you hit Ctrl+C with no selection 2023-06-29 21:48:12 -04:00
Isaiah Odhner
b6bea36590 Simplify: avoid passing fake format ID for unknown format case 2023-06-29 00:17:12 -04:00
Isaiah Odhner
6b9c01f196 Fix handling of read-only formats (like .cur)
When attempting to save in a format only supported for opening,
it tripped the assertion here, which I'm removing.
(This code was a little complicated to reason about, and I thought I was
oversimplifying, when restructuring to handle the overlap of warnings,
but I couldn't place what case I was missing, until testing this.)
2023-06-29 00:17:12 -04:00
Isaiah Odhner
e43eb7149c Clarify return value / callback argument 2023-06-28 21:35:19 -04:00
Isaiah Odhner
4750c1212d Handle overlap of warnings (information loss and write-only warnings) 2023-06-28 21:35:19 -04:00
Isaiah Odhner
f194583760 Fix error due to trying to reload after saving non-openable format 2023-06-28 21:32:30 -04:00
Isaiah Odhner
53a484f978 WIP: confirm saving into non-openable formats 2023-06-27 23:36:39 -04:00
Isaiah Odhner
9525ddc583 Handle NoScreen during auto-restart 2023-06-27 20:28:12 -04:00
Isaiah Odhner
87e2ff9b5f Move one-off scripts outside of package
(breaking relative paths)
2023-06-27 18:58:47 -04:00
Isaiah Odhner
ee2fce3166 Implement View Bitmap 2023-06-27 17:15:54 -04:00
Isaiah Odhner
2334e168be Disable tracking untranslated strings 2023-06-27 15:33:56 -04:00
Isaiah Odhner
ca68cb54a7 Move fonts inside of package folder 2023-06-27 15:15:00 -04:00
Isaiah Odhner
0ce80396a8 Handle NoScreen when window closed immediately upon opening 2023-06-27 13:41:24 -04:00
Isaiah Odhner
b3ca55a3b1 Use new callback to remove race condition 2023-06-27 13:37:08 -04:00
Isaiah Odhner
38a31bd1e4 Now that's what I call... back! (the functionality AND the function) 2023-06-27 13:27:03 -04:00
Isaiah Odhner
6db2b53830 No future for this approach... 2023-06-27 13:26:21 -04:00
Isaiah Odhner
e1111a24c6 Consolidate timers when scrolling to and selecting a node 2023-06-27 12:58:06 -04:00
Isaiah Odhner
14475154b9 If you type a folder's path in a file dialog, expand it 2023-06-27 12:29:18 -04:00
Isaiah Odhner
d0385556d1 Allow ~user and env var substitutions in file dialogs
(The todo removed was already satisfied, as it turns out.)
2023-06-20 00:38:53 -04:00
Isaiah Odhner
99b598c0dc Improve window constraints 2023-06-19 22:15:02 -04:00
Isaiah Odhner
7c420416c3 Prevent prepopulating file name in Copy To and Paste From dialogs 2023-06-19 22:15:02 -04:00
Isaiah Odhner
75928bc1da Clean up 2023-06-19 22:14:06 -04:00
Isaiah Odhner
27e1bbe264 Refactor: use new autofocus handling for file dialogs 2023-06-19 22:14:06 -04:00
Isaiah Odhner
e62eb42bd9 Set default focus in Attributes, Custom Zoom, and Edit Colors windows 2023-06-19 22:14:06 -04:00
Isaiah Odhner
3600bea25d Load/save color palettes 2023-06-17 19:41:00 -04:00
Isaiah Odhner
93f98a89e7 Add todos and clarifying notes 2023-06-15 17:46:19 -04:00
Isaiah Odhner
7b32452066 Abort if error occurred when reloading to show information loss during save
I'm not sure about this...
2023-06-14 00:15:53 -04:00
Isaiah Odhner
572d60076f Duplicate error handling for reloading after information loss on save 2023-06-14 00:13:30 -04:00
Isaiah Odhner
faa41d07b2 Confirm discarding information during Save/Open/New, not just Save As 2023-06-13 23:46:30 -04:00
Isaiah Odhner
29e9e7a384 Refactor some encode_based_on_file_extension into encode_to_format
This avoids duplicately detecting the format from the file extension
in one case, and in the other case, avoids using a bogus file name to
implement a default fallback file format.
2023-06-13 19:44:08 -04:00
Isaiah Odhner
737115a00b Refactor confirming information loss 2023-06-13 19:25:44 -04:00
Isaiah Odhner
0a176fc1a4 Prevent unloading document if save fails 2023-06-13 19:14:35 -04:00