The code clean-up went pretty well. There are still parts of the code that are less than great, but on the whole it’s much better. (And I found quite a few bugs while working on that.)
Some stats:
- Total LOC of 1.8: 7280
- Total LOC of 1.9: 6240
- Total LOC removed: 1040
So I was able to remove about 14% of the code. And that doesn’t even take into account all of the changes that did not necessarily result in less code, just cleaner and clearer code.
Now that this is out of the way, I can start working on the data subsets, which I had planned for 1.9 but will now end up as 1.10.
What’s Changed?
- Minor improvements:
- The entire list of data is no longer refreshed when a new row is added.
- Fixed bug where Edit wouldn’t save the data.
- Import will now only prompt for overwrite confirmation if the current profile isn’t blank.
- Rearranged a few menu items.
- Fixed bug with Import as New Profile where the title would not be updated.
- JSON files are now the default when choosing a file to import.
- Exported JSON is no longer indented.
- Fixed bug with Import where the title would not be updated.
- Fixed bug where Import, Import and Merge, and Import as New Profile would not save the data.
- Fixed bug with Add Profile where the name would have whitespace stripped after it was checked to see if the name was valid. This caused issues where it would not catch that the profile already existed.
- Improved consistency of some dialogs.
- Code improvements:
- Moved launch and setup code into a new file
- Added function to update the title, so the code to do it each time can be simplified.
- Created file io.py for reading and writing profile files. Changes all functions that did these to use the new functions.
- Renamed import_append() to import_merge().
- Cleaned up lots and lots of code.
- Merged a whole bunch of the dialog classes.
Download
Downloads can be found on the SourceForge page, and the code is available on Github.